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


#ifndef BD_LOBBY_FILE_HEADER_H
#define BD_LOBBY_FILE_HEADER_H

#include <bdCore/bdCore.h>
#include <bdLobby/bdLobbyCommon/bdLobbyServicesCommon.h>
#include <bdCore/bdReference/bdReferencable.h>

BD_REFERENCE(bdLobbyFileHeader);

class bdLobbyFileHeader : public bdReferencable
{
	public:
		BD_DECLARE_NEW_AND_DELETE_OPERATORS

		enum bdOwnerType
		{
			BD_OWNER_USER,
			BD_OWNER_PUBLISHER,
			BD_MAX_OWNER_TYPE
		};

		enum bdVisibility
		{
			BD_VISIBLE_PUBLIC,
			BD_VISIBLE_PRIVATE,
			BD_MAX_VISIBILITY_TYPE
		};

		bdLobbyFileHeader();
		~bdLobbyFileHeader();

		bdBool deserialize(bdBitBufferRef buffer);
		void setFileSize(bdUInt32 fileSize);

		bdUInt64 getFileID() const;
		bdUInt32 getCreationTime() const;
		bdUInt32 getModifiedTime() const;
		bdOwnerType getOwnerType() const;
		bdVisibility getVisibility() const;
		const bdNChar8* getFileName() const;
		bdUInt32 getFileSize() const;
		
	protected:


		bdUInt64 m_fileID;
		bdUInt32 m_createTime; 
		bdUInt32 m_modifedTime; 
		bdOwnerType m_ownerType;
		bdVisibility m_visibility;
		bdUInt64 m_ownerID;
		bdNChar8 m_fileName[BD_MAX_FILE_NAME_LENGTH];
		bdUInt32 m_fileSize;
};

#endif // BD_LOBBY_FILE_HEADER_H
