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

// PURPOSE: Result set container for bdTeams::getTeamMembers tasks.

#ifndef BD_GET_TEAM_MEMBERS_RESULT_H
#define BD_GET_TEAM_MEMBERS_RESULT_H

#include <bdLobby/bdLobbyCommon/bdLobbyServicesCommon.h>
#include <bdLobby/bdLobbyCommon/bdQueryResult.h>

/// Result set container for bdTeams::getTeamMembers tasks.
/// An instance of this class should be passed to bdTeams::handleTask upon 
/// successful completion of a bdTeams::getTeamMembers task.
class bdGetTeamMembersResult : public bdQueryResult
{
	public:
		BD_DECLARE_NEW_AND_DELETE_OPERATORS
		
		enum bdTeamMemberStatus
		{
			BD_ORDINARY		= 0,
			BD_ADMIN		= 1,
			BD_OWNER		= 2
		};

		class bdTeamMember
		{
			public:
				BD_DECLARE_NEW_AND_DELETE_OPERATORS
				~bdTeamMember(){};
				bdOnlineUserID m_userID;
				bdNChar8 m_userName[BD_MAX_USERNAME_LENGTH];
				bdBool m_isOnline;
				bdUByte8 m_status;
		};

		bdGetTeamMembersResult();

		virtual ~bdGetTeamMembersResult();

		virtual bdBool handleResult(const bdUInt numResults, 
									bdBitBufferRef buffer);

		/// Following a call to bdTeams::handleTask with an instance of this 
		/// class, this will contain an array of the members of the team.
		bdArray<bdTeamMember> m_members;
};

#endif // BD_GET_TEAM_MEMBERS_RESULT_H
