// DWBS ------------------------------------------------------------------ DWBS
//
// PLATFORM		: ALL
// PRODUCT		: BIT_DEMON
// VISIBILITY	: PUBLIC
//
// DWBS ------------------------------------------------------------------ DWBS

#include <bdLobby/bdMessageStore/bdMessageTypes/bdUserNotificationMessage.h>
#include <bdLobby/bdMessageStore/bdMessageTypes/bdLobbyMessageTypes.h>

template <bdUInt T> inline 
bdUserNotificationMessage<T>::bdUserNotificationMessage()
:	bdLobbyMessage(T),
	m_originatorID(0)
{
	bdMemset(m_originatorName, '\0', BD_MAX_USERNAME_LENGTH);
}

template <bdUInt T> inline 
bdUserNotificationMessage<T>::~bdUserNotificationMessage()
{
}

template <bdUInt T> inline 
bdBool bdUserNotificationMessage<T>::deserialize(bdBitBufferRef buffer)
{
	bdBool ok = bdLobbyMessage::deserialize(buffer);
	ok = ok && buffer->readUInt64(m_originatorID);
	ok = ok && buffer->readString(m_originatorName, BD_MAX_USERNAME_LENGTH);
	
	return ok;
}
