00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __CODEX_QUORUM_MESSAGE_H__
00019 #define __CODEX_QUORUM_MESSAGE_H__
00020
00021 #include <vector>
00022 #include <string>
00023
00024 using namespace std;
00025
00026 namespace CODEX_Quorum
00027 {
00032 class Message
00033 {
00034 public :
00036 typedef vector<unsigned char> BufferType;
00037
00039 Message();
00041 Message( const BufferType& buff );
00043 Message( const string& aString );
00045 Message( const unsigned char* buff, int len );
00047 Message( const Message& aMessage );
00048
00050 void fill( const Message& aMessage );
00052 void fill( const BufferType& buff );
00054 void fill( const string& aString );
00056 void fill( const unsigned char* buff, int len );
00058 void fill( unsigned char a );
00059
00061 const unsigned char* buffer() const;
00063 unsigned int length() const;
00065 string messageString() const;
00066
00067 private :
00068 BufferType m_buffer;
00069 };
00070
00072 typedef Message Response;
00073
00074 }
00075
00076 #endif