00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __CODEX_QUORUM_MESSAGE_H__
00022 #define __CODEX_QUORUM_MESSAGE_H__
00023
00024 #include <vector>
00025 #include <string>
00026
00027 using namespace std;
00028
00029 namespace CODEX_Quorum
00030 {
00035 class Message
00036 {
00037 public :
00039 typedef vector<unsigned char> BufferType;
00040
00042 Message();
00044 Message( const BufferType& buff );
00046 Message( const string& aString );
00048 Message( const unsigned char* buff, int len );
00050 Message( const Message& aMessage );
00051
00053 void fill( const Message& aMessage );
00055 void fill( const BufferType& buff );
00057 void fill( const string& aString );
00059 void fill( const unsigned char* buff, int len );
00061 void fill( unsigned char a );
00062
00064 const unsigned char* buffer() const;
00066 unsigned int length() const;
00068 string messageString() const;
00069
00070 private :
00071 BufferType m_buffer;
00072 };
00073
00075 typedef Message Response;
00076
00077 }
00078
00079 #endif