#ifndef _VCHAT_SERVER_API_STRINGS_H_
#define _VCHAT_SERVER_API_STRINGS_H_

#include <map>
#include <string>
#include "VChatAPI.h"
#include "messages.h"
#include "common.h"


namespace VChatSystem
{

    typedef std::pair<unsigned, std::string> Id2Text_t;
    typedef std::map<unsigned,std::string> Id2TextMap_t;

    //////////////////////////////////////////////////////////////////////////////////
    // ResultString
    //
    static const Id2Text_t _resultString[] = 
    {  
		Id2Text_t(RESULT_SUCCESS,								"RESULT_SUCCESS"),
		Id2Text_t(RESULT_TIMEOUT,								"RESULT_TIMEOUT"),
		Id2Text_t(RESULT_FAILURE,								"RESULT_SYSTEM_ERROR"),
		Id2Text_t(RESULT_INVALID_PARAM,							"RESULT_INVALID_PARAM"),
		Id2Text_t(RESULT_DATABASE_FAILURE,						"RESULT_DATABASE_FAILURE"),
		Id2Text_t(RESULT_NETWORK_FAILURE,						"RESULT_NETWORK_FAILURE"),
		Id2Text_t(RESULT_NOT_IMPLEMENTED,						"RESULT_NOT_IMPLEMENTED"),
		Id2Text_t(RESULT_NOT_SUPPORTED,							"RESULT_NOT_SUPPORTED"),		
		Id2Text_t(RESULT_TCP_CONNECTION_NOT_AVAILABLE,			"RESULT_TCP_CONNECTION_NOT_AVAILABLE"),		
		Id2Text_t(RESULT_RESPONSE_XML_INVALID,					"RESULT_RESPONSE_XML_INVALID"),
		Id2Text_t(RESULT_RESPONSE_VIVOX_FAILURE,				"RESULT_RESPONSE_VIVOX_FAILURE"),
		Id2Text_t(RESULT_USER_ACCOUNT_BANNED,					"RESULT_USER_ACCOUNT_BANNED"),
		Id2Text_t(RESULT_NAME_EXCEEDS_VIVOX_LIMIT,				"RESULT_NAME_EXCEEDS_VIVOX_LIMIT"),
		Id2Text_t(RESULT_NO_CHANNELS_FOUND_FOR_CHARACTER,		"RESULT_NO_CHANNELS_FOUND_FOR_CHARACTER"),
		
		Id2Text_t(RESULT_VIVOX_WRONG_USER_CREDENTIALS,			"RESULT_VIVOX_WRONG_USER_CREDENTIALS"),
		Id2Text_t(RESULT_VIVOX_EXPIRED_USER_CREDENTIALS,		"RESULT_VIVOX_EXPIRED_USER_CREDENTIALS"),
		Id2Text_t(RESULT_VIVOX_MISSING_USER_CREDENTIALS,		"RESULT_VIVOX_MISSING_USER_CREDENTIALS"),
		Id2Text_t(RESULT_VIVOX_USER_NOT_LOGGED_IN,				"RESULT_VIVOX_USER_NOT_LOGGED_IN"),
		Id2Text_t(RESULT_VIVOX_ACCOUNT_CANT_PERFORM_OP,			"RESULT_VIVOX_ACCOUNT_CANT_PERFORM_OP"),
		Id2Text_t(RESULT_VIVOX_FAILED_RETRIEVING_DIR,			"RESULT_VIVOX_FAILED_RETRIEVING_DIR"),

		Id2Text_t(RESULT_VIVOX_PARAMS_MISSING,					"RESULT_VIVOX_PARAMS_MISSING"),
		Id2Text_t(RESULT_VIVOX_UNKNOWN_MODE,					"RESULT_VIVOX_UNKNOWN_MODE"),
		Id2Text_t(RESULT_VIVOX_UNABLE_TO_PARSE_ARG,				"RESULT_VIVOX_UNABLE_TO_PARSE_ARG"),

		Id2Text_t(RESULT_VIVOX_ACCOUNT_CREATION_FAILED,			"RESULT_VIVOX_ACCOUNT_CREATION_FAILED"),
		Id2Text_t(RESULT_VIVOX_ACCOUNT_DEACTIVATE_FAILED,		"RESULT_VIVOX_ACCOUNT_DEACTIVATE_FAILED"),
		Id2Text_t(RESULT_VIVOX_ACCOUNT_ACTIVATE_FAILED,			"RESULT_VIVOX_ACCOUNT_ACTIVATE_FAILED"),
		Id2Text_t(RESULT_VIVOX_ACCOUNT_DOESNT_EXIST,			"RESULT_VIVOX_ACCOUNT_DOESNT_EXIST"),
		Id2Text_t(RESULT_VIVOX_ACCOUNT_RETRIEVAL_FAILED,		"RESULT_VIVOX_ACCOUNT_RETRIEVAL_FAILED"),
		Id2Text_t(RESULT_VIVOX_ACCOUNT_UPDATE_FAILED,			"RESULT_VIVOX_ACCOUNT_UPDATE_FAILED"),
		Id2Text_t(RESULT_VIVOX_ACCOUNT_DELETE_FAILED,			"RESULT_VIVOX_ACCOUNT_DELETE_FAILED"),

		Id2Text_t(RESULT_VIVOX_RETRIEVING_SRC_USER,				"RESULT_VIVOX_RETRIEVING_SRC_USER"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_ADD_FAILED,				"RESULT_VIVOX_CHANNEL_ADD_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_UPDATE_FAILED,			"RESULT_VIVOX_CHANNEL_UPDATE_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_RETRIEVE_FAILED,			"RESULT_VIVOX_CHANNEL_RETRIEVE_FAILED"),

		Id2Text_t(RESULT_VIVOX_FEATURE_NAME_UNKNOWN,			"RESULT_VIVOX_FEATURE_NAME_UNKNOWN"),
		Id2Text_t(RESULT_VIVOX_FEATURE_RETRIEVAL_FAILED,		"RESULT_VIVOX_FEATURE_RETRIEVAL_FAILED"),
		Id2Text_t(RESULT_VIVOX_FEATURE_SET_FAILED,				"RESULT_VIVOX_FEATURE_SET_FAILED"),
		Id2Text_t(RESULT_VIVOX_FEATURE_UPDATE_FAILED,			"RESULT_VIVOX_FEATURE_UPDATE_FAILED"),
		Id2Text_t(RESULT_VIVOX_FEATURE_DELETE_FAILED,			"RESULT_VIVOX_FEATURE_DELETE_FAILED"),
		Id2Text_t(RESULT_VIVOX_RETRIEVE_USER_FAILED,			"RESULT_VIVOX_RETRIEVE_USER_FAILED"),
		Id2Text_t(RESULT_VIVOX_RETRIEVE_FEATURE_LIST_FAILED,	"RESULT_VIVOX_RETRIEVE_FEATURE_LIST_FAILED"),

		Id2Text_t(RESULT_VIVOX_CHANNEL_RETRIEVE_USERS_FAILED,	"RESULT_VIVOX_CHANNEL_RETRIEVE_USERS_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_MUTE_ALL_FAILED,			"RESULT_VIVOX_CHANNEL_MUTE_ALL_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_UNMUTE_ALL_FAILED,		"RESULT_VIVOX_CHANNEL_UNMUTE_ALL_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_INVITE_FAILED,			"RESULT_VIVOX_CHANNEL_INVITE_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_RETRIEVING_ACL_FAILED,	"RESULT_VIVOX_CHANNEL_RETRIEVING_ACL_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_DELETE_ACL_FAILED,		"RESULT_VIVOX_CHANNEL_DELETE_ACL_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_LOCKING_FAILED,			"RESULT_VIVOX_CHANNEL_LOCKING_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_UNLOCKING_FAILED,		"RESULT_VIVOX_CHANNEL_UNLOCKING_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_CREATING_FAILED,			"RESULT_VIVOX_CHANNEL_CREATING_FAILED"),
		Id2Text_t(RESULT_VIVOX_CHANNEL_RETRIEVE_FAILED_EX,		"RESULT_VIVOX_CHANNEL_RETRIEVE_FAILED_EX"),
		Id2Text_t(RESULT_VIVOX_USER_NOT_ON_CHANNEL,				"RESULT_VIVOX_USER_NOT_ON_CHANNEL"),
		Id2Text_t(RESULT_VIVOX_UNABLE_TO_COMPLETE_CHANNEL_LOOKUP,	"RESULT_VIVOX_UNABLE_TO_COMPLETE_CHANNEL_LOOKUP"),
	
		Id2Text_t(RESULT_END,				"RESULT_END")
	};
	static const int _ResultCount = sizeof(_resultString) / sizeof(Id2Text_t);
    static Id2TextMap_t ResultString((const Id2TextMap_t::value_type *)&_resultString[0],(const Id2TextMap_t::value_type *)&_resultString[_ResultCount]);

    //////////////////////////////////////////////////////////////////////////////////
    // CommandString
    //
    static const Id2Text_t _commandString[] = 
    {  			
		Id2Text_t(MESSAGE_CONNECT,								"MSG_CONNECT"),
		Id2Text_t(MESSAGE_GET_ACCOUNT_REQUEST,					"MESSAGE_GET_ACCOUNT_REQUEST"),
		Id2Text_t(MESSAGE_GET_CHANNEL_REQUEST,					"MESSAGE_GET_CHANNEL_REQUEST"),
		Id2Text_t(MESSAGE_GET_PROXIMITY_CHANNEL_REQUEST,		"MESSAGE_GET_PROXIMITY_CHANNEL_REQUEST"),
		Id2Text_t(MESSAGE_CHANNEL_COMMAND_REQUEST,				"MESSAGE_CHANNEL_COMMAND_REQUEST"),
		Id2Text_t(MESSAGE_DEACTIVATE_ACCOUNT_REQUEST,			"MESSAGE_DEACTIVATE_ACCOUNT_REQUEST"),
		Id2Text_t(MESSAGE_CHANGE_PASSWORD_REQUEST,				"MESSAGE_CHANGE_PASSWORD_REQUEST"),
		Id2Text_t(MESSAGE_GET_ALL_CHANNELS_REQUEST,				"MESSAGE_GET_ALL_CHANNELS_REQUEST"),
		Id2Text_t(MESSAGE_DELETE_CHANNEL_REQUEST,				"MESSAGE_DELETE_CHANNEL_REQUEST"),
		Id2Text_t(MESSAGE_SET_USER_DATA_REQUEST,				"MESSAGE_SET_USER_DATA_REQUEST"),
		Id2Text_t(MESSAGE_SET_BAN_STATUS_REQUEST,				"MESSAGE_SET_BAN_STATUS_REQUEST"),
		Id2Text_t(MESSAGE_GET_CHANNEL_INFO_REQUEST,				"MESSAGE_GET_CHANNEL_INFO_REQUEST"),
		Id2Text_t(MESSAGE_GET_CHANNEL_REQUEST_V2,				"MESSAGE_GET_CHANNEL_REQUEST_V2"),
		Id2Text_t(MESSAGE_ADD_CHARACTER_CHANNEL,				"MESSAGE_ADD_CHARACTER_CHANNEL"),
		Id2Text_t(MESSAGE_REMOVE_CHARACTER_CHANNEL,				"MESSAGE_REMOVE_CHARACTER_CHANNEL"),
		Id2Text_t(MESSAGE_GET_CHARACTER_CHANNEL,				"MESSAGE_GET_CHARACTER_CHANNEL"),
		Id2Text_t(MESSAGE_UPDATE_CHARACTER_CHANNEL,				"MESSAGE_UPDATE_CHARACTER_CHANNEL")
		
	};

	static const int _CommandCount = sizeof(_commandString) / sizeof(Id2Text_t);
    static Id2TextMap_t CommandString((const Id2TextMap_t::value_type *)&_commandString[0],(const Id2TextMap_t::value_type *)&_commandString[_CommandCount]);



	//////////////////////////////////////////////////////////////////////////////////
	// ChannelCommandString
	//
	static const Id2Text_t _channelCommandString[] = 
	{  			
		Id2Text_t(COMMAND_MUTE,				"mute"),
		Id2Text_t(COMMAND_UNMUTE,			"unmute"),
		Id2Text_t(COMMAND_KICK,				"kick"),
		Id2Text_t(COMMAND_HANGUP,			"hangup"),
		Id2Text_t(COMMAND_INVITE,			"invite"),
		Id2Text_t(COMMAND_BAN,				"ban"),
		Id2Text_t(COMMAND_UNBAN,			"unban"),
		Id2Text_t(COMMAND_CHAN_LOCK,		"chan_lock"),
		Id2Text_t(COMMAND_CHAN_UNLOCK,		"chan_unlock"),
		Id2Text_t(COMMAND_MUTE_ALL,			"mute_all"),
		Id2Text_t(COMMAND_UNMUTE_ALL,		"unmute_all"),
		Id2Text_t(COMMAND_ADD_MODERATOR,	"mod_addu"),
		Id2Text_t(COMMAND_DELETE_MODERATOR,	"mod_delu"),
		Id2Text_t(COMMAND_ADD_ACL,			"acl_add"),
		Id2Text_t(COMMAND_DELETE_ACL,		"acl_delete"),
		Id2Text_t(COMMAND_DROP_ALL,			"drop_all"),
		Id2Text_t(COMMAND_END,				"COMMAND_END")
	};

	static const int _ChannelCommandCount = sizeof(_channelCommandString) / sizeof(Id2Text_t);
	static Id2TextMap_t ChannelCommandString((const Id2TextMap_t::value_type *)&_channelCommandString[0],(const Id2TextMap_t::value_type *)&_channelCommandString[_ChannelCommandCount]);


}


#endif	//_VCHAT_SERVER_API_STRINGS_H_

