Fix syntax error in the remote.sh UDEV script
[remote/remote-mci.git] / protocols / client_server / ClientMsg.h
blob380ce4e7475d523ff8b8d1201d825079f9e063a5
1 #ifndef CLIENTMSG_H_
2 #define CLIENTMSG_H_
3 #include "tcputil.h"
4 #include "BaseMsg.h"
5 #include "MsgClientRequest.h"
6 #include "MsgClientConfirm.h"
7 #include "MsgSession.h"
10 namespace remote { namespace protocols { namespace client_server {
12 enum ClientMsgType
14 CLIENTMSG_SESSION = 0,
15 CLIENTMSG_CLIENTREQUEST = 1,
16 CLIENTMSG_CLIENTCONFIRM = 2
19 class ClientMsg : public BaseMsg
21 static const uint32_t CurrentProtocolVersion = 1;
22 public:
23 ClientMsg(uint8_t*& buffer, uint32_t& buflen);
24 ClientMsg(MsgSession& message);
25 ClientMsg(MsgClientRequest& message);
26 ClientMsg(MsgClientConfirm& message);
27 ~ClientMsg();
29 uint32_t getLength();
31 uint8_t* write(uint8_t* buffer, uint32_t& buflen);
32 void print(FILE* s);
34 uint8_t getType();
35 uint32_t getProtocolVersion();
37 MsgSession& getSession();
38 MsgClientRequest& getClientRequest();
39 MsgClientConfirm& getClientConfirm();
41 protected:
42 uint8_t* read(uint8_t* buffer, uint32_t& buflen);
43 uint8_t type;
44 uint32_t protocolVersion;
45 BaseMsg* message;
46 bool deleteMsg;
49 }}}
51 #endif /*CLIENTMSG_H_*/