2 * Copyright (C) ARM Limited 2010-2013. All rights reserved.
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.
9 #ifndef __STREAMLINE_SETUP_H__
10 #define __STREAMLINE_SETUP_H__
12 #include "OlySocket.h"
14 // Commands from Streamline
16 COMMAND_REQUEST_XML = 0,
17 COMMAND_DELIVER_XML = 1,
18 COMMAND_APC_START = 2,
20 COMMAND_DISCONNECT = 4,
24 class StreamlineSetup {
26 StreamlineSetup(OlySocket *socket);
31 char* readCommand(int*);
32 void handleRequest(char* xml);
33 void handleDeliver(char* xml);
34 void sendData(const char* data, uint32_t length, char type);
35 void sendString(const char* string, int type) {sendData(string, strlen(string), type);}
37 void sendConfiguration();
40 void writeConfiguration(char* xml);
42 // Intentionally unimplemented
43 StreamlineSetup(const StreamlineSetup &);
44 StreamlineSetup &operator=(const StreamlineSetup &);
47 #endif //__STREAMLINE_SETUP_H__