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
{
14 CLIENTMSG_SESSION
= 0,
15 CLIENTMSG_CLIENTREQUEST
= 1,
16 CLIENTMSG_CLIENTCONFIRM
= 2
19 class ClientMsg
: public BaseMsg
21 static const uint32_t CurrentProtocolVersion
= 1;
23 ClientMsg(uint8_t*& buffer
, uint32_t& buflen
);
24 ClientMsg(MsgSession
& message
);
25 ClientMsg(MsgClientRequest
& message
);
26 ClientMsg(MsgClientConfirm
& message
);
31 uint8_t* write(uint8_t* buffer
, uint32_t& buflen
);
35 uint32_t getProtocolVersion();
37 MsgSession
& getSession();
38 MsgClientRequest
& getClientRequest();
39 MsgClientConfirm
& getClientConfirm();
42 uint8_t* read(uint8_t* buffer
, uint32_t& buflen
);
44 uint32_t protocolVersion
;