62 const CString & aCString,
66 char messageIdHex[35];
68 WideCharToMultiByte( aCodePage, 0, aCString, -1, messageIdHex, 34, NULL, NULL );
71 if( strncmp( messageIdHex,
"0x", 2 ) == 0 )
89 bool MessageId::operator<
109 if(
this != &aRightSide )
112 memset(
mId, 0,
sizeof(
mId ) );
125 bool MessageId::operator==
171 TCHAR messageIdWide[35];
175 memset( messageId, 0, 35 );
178 strncpy( messageId, (
const char *)
mId,
mIdSize );
182 strcpy( messageId,
"0x" );
185 MultiByteToWideChar( aCodePage, 0, messageId, -1, messageIdWide, 35 );
186 messageIdWide[34] =
'\0';
187 formattedId.Format( _T(
" %s"), messageIdWide );
MessageId()
Default constructor.
codepage_type
The code page used for encoding of text fields sent to or received from the client.
CString toCString(codepage_type aCodePage) const
CString representation of the message ID.
uint8 mId[16]
The message ID.
#define minval(_x, _y)
The smaller of _x and _y.
uint16 UTIL_hex_to_uint8(const char *aHexString, uint8 *aBinaryData, uint16 aMaxBytes)
Convert a hexadecimal ASCII string to an array of uint8.
void UTIL_uint8_to_hex(const uint8 *aData, char *aOutput, uint8 aNumBytes)
Convert from binary to a hexadecimal string.
bool UTIL_data_is_printable(const char *aData, int aLength)
Determine whether an array of characters consists only of printable ASCII.
uint8 mIdSize
Number of significant bytes of mId.
const uint8 * getId() const
Return a reference to the bytes of the message ID.
unsigned char uint8
8-bit unsigned integer
uint8 getIdSize() const
Return the size of the message ID.
Encapsulation of a message ID.