]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/arm-ds5-gator.git/blob - daemon/Sender.h
gator-driver: Revert #error about lack of CONFIG_PERF_EVENTS
[android-sdk/arm-ds5-gator.git] / daemon / Sender.h
1 /**
2  * Copyright (C) ARM Limited 2010-2012. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
9 #ifndef __SENDER_H__
10 #define __SENDER_H__
12 #include <stdio.h>
13 #include <pthread.h>
14 #include "OlySocket.h"
16 enum {
17         RESPONSE_XML = 1,
18         RESPONSE_APC_DATA = 3,
19         RESPONSE_ACK = 4,
20         RESPONSE_NAK = 5,
21         RESPONSE_ERROR = 0xFF
22 };
24 class Sender {
25 public:
26         Sender(OlySocket* socket);
27         ~Sender();
28         void writeData(const char* data, int length, int type);
29         void createDataFile(char* apcDir);
30 private:
31         OlySocket* mDataSocket;
32         FILE* mDataFile;
33         char* mDataFileName;
34         pthread_mutex_t mSendMutex;
35 };
37 #endif  //__SENDER_H__