diff options
author | Jon Medhurst <tixy@linaro.org> | 2012-10-24 17:57:28 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2012-11-13 09:24:52 +0000 |
commit | 610039a796ef8b40df03c93cae9498bbad0939e8 (patch) | |
tree | aee871c4173d9f7d92d8dbd1f3d378442d4b0bf3 /tools/gator/daemon/Sender.h | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) |
gator: Version 5.12
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'tools/gator/daemon/Sender.h')
-rw-r--r-- | tools/gator/daemon/Sender.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/gator/daemon/Sender.h b/tools/gator/daemon/Sender.h new file mode 100644 index 00000000000..ceab343af9f --- /dev/null +++ b/tools/gator/daemon/Sender.h @@ -0,0 +1,37 @@ +/** + * Copyright (C) ARM Limited 2010-2012. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __SENDER_H__ +#define __SENDER_H__ + +#include <stdio.h> +#include <pthread.h> +#include "OlySocket.h" + +enum { + RESPONSE_XML = 1, + RESPONSE_APC_DATA = 3, + RESPONSE_ACK = 4, + RESPONSE_NAK = 5, + RESPONSE_ERROR = 0xFF +}; + +class Sender { +public: + Sender(OlySocket* socket); + ~Sender(); + void writeData(const char* data, int length, int type); + void createDataFile(char* apcDir); +private: + OlySocket* mDataSocket; + FILE* mDataFile; + char* mDataFileName; + pthread_mutex_t mSendMutex; +}; + +#endif //__SENDER_H__ |