/** @file message.h
 *  EAMessage type for UX
 *	@author Chris Burns (cburns@ea.com)
 *
 *	Core Technology UI
 *	(c) 2012 Electronic Arts Inc. 
 */

#ifndef EABASETYPESMESSAGE_TYPES_MESSAGE_H_
#define EABASETYPESMESSAGE_TYPES_MESSAGE_H_

#include "eamessage/eamessage.h"
#include "coreallocator/icoreallocatormacros.h"

#include "EABaseTypes/datatypes.h"
#include "EABaseTypesMessage/deletable.h"
#include "EABaseTypesPlus/vrefcountedica.h"
#include "EABaseTypesPlus/bytestream.h"

namespace EA
{
	namespace Types
	{
		/*!
		*	@class	Message
		*	@brief	Generic type for UX Messages using EAMessage
		*/
		class Message : public VRefCountedICA< Deletable< EA::Messaging::IMessageRC > >
		{
		public:

			Message(EA::Allocator::ICoreAllocator* allocator,
					BaseTypeIn metadata):
				VRefCountedICA< Deletable< EA::Messaging::IMessageRC > >(allocator),
				mMetadata(metadata),
				mData(allocator)
			{
			}

			BaseTypeRef mMetadata;
			ByteStream	mData;
		};
	}
}

#endif /* EABASETYPESMESSAGE_TYPES_MESSAGE_H_ */
