Protocols: Fix includes to use the explicit path of the header files
[remote/remote-mci.git] / protocols / client_server / ClientMsg.h
blob20f0194257c2819d1020eb00efb5a9376f75ac2e
1 #ifndef REMOTE_PROTOCOLS_CLIENT_SERVER_CLIENTMSG_H
2 #define REMOTE_PROTOCOLS_CLIENT_SERVER_CLIENTMSG_H
4 #include "protocols/BaseMsg.h"
5 #include "protocols/client_server/MsgClientConfirm.h"
6 #include "protocols/client_server/MsgClientRequest.h"
7 #include "protocols/client_server/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