Exemple #1
0
void CGameBrowser::ConfigurationCallback(ECryLobbyService service, SConfigurationParams *requestedParams, uint32 paramCount)
{
	uint32 a;
	for (a=0;a<paramCount;++a)
	{
		switch (requestedParams[a].m_fourCCID)
		{
		case CLCC_LAN_USER_NAME:
			{
				uint32 userIndex = g_pGame->GetExclusiveControllerDeviceIndex();

				IPlatformOS *pPlatformOS = gEnv->pSystem->GetPlatformOS();
				IPlatformOS::TUserName tUserName = "";
				if(pPlatformOS)
				{
					pPlatformOS->UserGetName(userIndex, tUserName);
				}
			
				// this will null terminate for us if necessary	
				cry_strncpy(s_profileName, tUserName.c_str(), CRYLOBBY_USER_NAME_LENGTH);
				int instance = gEnv->pSystem->GetApplicationInstance();
				if (instance>0)
				{
					size_t length = strlen(s_profileName);
					if (length + 3 < CRYLOBBY_USER_NAME_LENGTH)
					{
						s_profileName[length] = '(';
						s_profileName[length+1] = '0' + instance;
						s_profileName[length+2] = ')';
						s_profileName[length+3] = 0;
					}
				}

				requestedParams[a].m_pData = s_profileName;
			}
			break;

#if defined(PS3) || defined(ORBIS) || USE_STEAM
		case CLCC_CRYLOBBY_PRESENCE_CONVERTER:
			{
				SCryLobbyPresenceConverter* pConverter = (SCryLobbyPresenceConverter*)requestedParams[a].m_pData;
				if (pConverter)
				{
					//-- Use the pConverter->m_numData data items in pConverter->m_pData to create a string in pConverter->m_pStringBuffer
					//-- Use the initial value of pConverter->sizeOfStringBuffer as a maximum string length allowed, but
					//-- update pConverter->sizeOfStringBuffer to the correct length when the string is filled in.
					//-- Set pConverter->sizeOfStringBuffer = 0 to invalidate bad data so it isn't sent to PSN.
					CryFixedStringT<MAX_PRESENCE_STRING_SIZE> strPresence;
					if(CreatePresenceString(strPresence, pConverter->m_pData, pConverter->m_numData))
					{
						CryLog("[RichPresence] Succeeded %s", strPresence.c_str());
						sprintf((char*)pConverter->m_pStringBuffer, "%s", strPresence.c_str());
						pConverter->m_sizeOfStringBuffer = strlen((char*)pConverter->m_pStringBuffer);

#if defined(PS3)
						if (g_pGame)
						{
							pConverter->m_sessionId = g_pGame->GetPendingRichPresenceSessionID();
						}
#endif
					}
					else
					{
						CryLog("[RichPresence] Failed to create rich presence string");
						pConverter->m_sizeOfStringBuffer = 0;
					}
				}
			}
			break;
#endif

#if defined(XENON)
		case CLCC_LIVE_TITLE_ID:
			requestedParams[a].m_32 = LIVE_TITLE_ID;
			break;
#endif//XENON

#if defined(PS3)
		case CLCC_PSN_COMMUNICATION_ID:
			requestedParams[a].m_pData = (void*)&s_communication_id;
			break;
		case CLCC_PSN_COMMUNICATION_PASSPHRASE:
			requestedParams[a].m_pData = (void*)&s_communication_passphrase;
			break;
		case CLCC_PSN_COMMUNICATION_SIGNATURE:
			requestedParams[a].m_pData = (void*)&s_communication_signature;
			break;
		case CLCC_PSN_CUSTOM_MENU_GAME_INVITE_STRING:
			GetXMBString("@xmb_invite_button", (SCryLobbyXMBString*)requestedParams[a].m_pData);			// <= SCE_NP_CUSTOM_MENU_ACTION_CHARACTER_MAX (max 21 chars + nul)	
			break;
		case CLCC_PSN_CUSTOM_MENU_GAME_JOIN_STRING:
			GetXMBString("@xmb_join_button", (SCryLobbyXMBString*)requestedParams[a].m_pData);				// <= SCE_NP_CUSTOM_MENU_ACTION_CHARACTER_MAX (max 21 chars + nul)	
			break;
		case CLCC_PSN_INVITE_SUBJECT_STRING:
			GetXMBString("@xmb_invite_sub", (SCryLobbyXMBString*)requestedParams[a].m_pData);					// < SCE_NP_BASIC_SUBJECT_CHARACTER_MAX (max 17 chars + nul)
			break;
		case CLCC_PSN_INVITE_BODY_STRING:
			GetXMBString("@xmb_invite_body", (SCryLobbyXMBString*)requestedParams[a].m_pData);				// < SCE_NP_BASIC_BODY_CHARACTER_MAX (max 511 chars + nul)																
			break;
		case CLCC_PSN_FRIEND_REQUEST_SUBJECT_STRING:
			GetXMBString("@xmb_friendrq_sub", (SCryLobbyXMBString*)requestedParams[a].m_pData);				// < SCE_NP_BASIC_SUBJECT_CHARACTER_MAX (max 17 chars + nul)																
			break;
		case CLCC_PSN_FRIEND_REQUEST_BODY_STRING:
			GetXMBString("@xmb_friendrq_body", (SCryLobbyXMBString*)requestedParams[a].m_pData);			// < SCE_NP_BASIC_BODY_CHARACTER_MAX	(max 511 chars + nul)																
			break;
		case CLCC_PSN_AGE_LIMIT:
			{
				SAgeData *pAgeData = (SAgeData*)requestedParams[a].m_pData;

				int userRegion = (pAgeData->countryCode[0] << 8) + pAgeData->countryCode[1];
				g_pGame->SetUserRegion(userRegion);

				if (strncmp(gPS3Env->sTitleID,"BLES",4)==0)
				{
					if (strncmp(pAgeData->countryCode,"de",2)==0)
					{
						// GERMANY
						requestedParams[a].m_32 = 18;
					}
					else if(strncmp(pAgeData->countryCode,"au",2)==0)
					{
						// AUSTRALIA
						requestedParams[a].m_32 = 15;
					}
					else
					{
						// EUROPE EXCLUDING GERMANY AND AUSTRALIA
						requestedParams[a].m_32 = 16;
					}
				}
				else
				{
					// US AND JAPAN (and any unknown).
					requestedParams[a].m_32 = 17;
				}
			}
			break;
		case CLCC_PSN_STORE_ID:
			if (strncmp(gPS3Env->sTitleID,"BLES",4)==0)
			{
				requestedParams[a].m_pData = (void*)s_sceeStore_id;
				break;
			}
			if (strncmp(gPS3Env->sTitleID,"BLUS",4)==0)
			{
				requestedParams[a].m_pData = (void*)s_sceaStore_id;
				break;
			}
			if (strncmp(gPS3Env->sTitleID,"BLJM",4)==0)
			{
				requestedParams[a].m_pData = (void*)s_scejStore_id;
				break;
			}
			requestedParams[a].m_pData = (void*)s_testStore_id;
			break;
		case CLCC_PSN_IS_DLC_INSTALLED:
			if (g_pGame && g_pGame->GetDLCManager() && g_pGame->GetDLCManager()->IsDLCLoaded(requestedParams[a].m_8))
			{
				requestedParams[a].m_8 = 1;
			}
			else
			{
				requestedParams[a].m_8 = 0;
			}
			break;
#endif//PS3

		case CLCC_CRYSTATS_ENCRYPTION_KEY:
			{
#if defined(XENON)
				requestedParams[a].m_pData = (void*)"";
#elif defined(PS3) || defined(ORBIS)
				requestedParams[a].m_pData = (void*)"";
#else
				requestedParams[a].m_pData = (void*)"";
#endif
			}
			break;

		case CLCC_MATCHMAKING_SESSION_PASSWORD_MAX_LENGTH:
			requestedParams[a].m_8 = MATCHMAKING_SESSION_PASSWORD_MAX_LENGTH;
			break;

#if USE_STEAM
#if !defined(RELEASE)
		case CLCC_STEAM_APPID:
			requestedParams[a].m_32 = STEAM_APPID;
			break;
#endif // !defined(RELEASE)
#endif // USE_STEAM

		default:
			CRY_ASSERT_MESSAGE(0,"Unknown Configuration Parameter Requested!");
			break;
		}
	}
}
Exemple #2
0
void CGameBrowser::ConfigurationCallback(ECryLobbyService service, SConfigurationParams *requestedParams, uint32 paramCount)
{
	uint32 a;
	for (a=0;a<paramCount;a++)
	{
		switch (requestedParams[a].m_fourCCID)
		{
		case CLCC_LAN_USER_NAME:
			{
				IPlayerProfileManager *pPlayerProfileManager = gEnv->pGame->GetIGameFramework()->GetIPlayerProfileManager();
				uint32 userIndex = pPlayerProfileManager ? pPlayerProfileManager->GetExclusiveControllerDeviceIndex() : 0;

				IPlatformOS *pPlatformOS = gEnv->pSystem->GetPlatformOS();
				IPlatformOS::TUserName tUserName = "";
				if(pPlatformOS)
				{
					pPlatformOS->UserGetName(userIndex, tUserName);
				}
			
				// this will null terminate for us if necessary	
				cry_strncpy(s_profileName, tUserName.c_str(), CRYLOBBY_USER_NAME_LENGTH);

				requestedParams[a].m_pData = s_profileName;
			}
			break;

#if defined(PS3) || USE_CRYLOBBY_GAMESPY
		case CLCC_CRYLOBBY_PRESENCE_CONVERTER:
			{
				SCryLobbyPresenceConverter* pConverter = (SCryLobbyPresenceConverter*)requestedParams[a].m_pData;
				if (pConverter)
				{
					//-- Use the pConverter->m_numData data items in pConverter->m_pData to create a string in pConverter->m_pStringBuffer
					//-- Use the initial value of pConverter->sizeOfStringBuffer as a maximum string length allowed, but
					//-- update pConverter->sizeOfStringBuffer to the correct length when the string is filled in.
					//-- Set pConverter->sizeOfStringBuffer = 0 to invalidate bad data so it isn't sent to PSN.
					CryFixedStringT<MAX_PRESENCE_STRING_SIZE> strPresence;
					if(CreatePresenceString(strPresence, pConverter->m_pData, pConverter->m_numData))
					{
						CryLog("[RichPresence] Succeeded %s", strPresence.c_str());
						sprintf((char*)pConverter->m_pStringBuffer, "%s", strPresence.c_str());
						pConverter->m_sizeOfStringBuffer = strlen((char*)pConverter->m_pStringBuffer);









					}
					else
					{
						CryLog("[RichPresence] Failed to create rich presence string");
						pConverter->m_sizeOfStringBuffer = 0;
					}
				}
			}
			break;
#endif

#if USE_CRYLOBBY_GAMESPY
			// The following GameSpy data are always available.

		case CLCC_GAMESPY_TITLE:
			requestedParams[ a ].m_pData = ObfuscateGameSpyTitle();
			break;
		case CLCC_GAMESPY_SECRETKEY:
			requestedParams[ a ].m_pData = ObfuscateGameSpySecretKey();
			break;
		case CLCC_GAMESPY_GAMEVERSION:
			requestedParams[ a ].m_32 = GameLobbyData::GetVersion();
			break;
		case CLCC_GAMESPY_GAMEVERSIONSTRING:
			requestedParams[ a ].m_pData = ( void* )GAMESPY_GAMEVERSIONSTRING;
			break;
		case CLCC_GAMESPY_DISTRIBUTIONID:
			requestedParams[ a ].m_32 = GAMESPY_DISTRIBUTIONID;
			break;
		case CLCC_GAMESPY_PRODUCTID:
			requestedParams[ a ].m_32 = GAMESPY_PRODUCTID;
			break;
		case CLCC_GAMESPY_GAMEID:
			requestedParams[ a ].m_32 = GAMESPY_GAMEID;
			break;
		case CLCC_GAMESPY_NAMESPACEID:
			requestedParams[ a ].m_32 = GAMESPY_NAMESPACEID;
			break;
		case CLCC_GAMESPY_PARTNERID:
			requestedParams[ a ].m_32 = GAMESPY_PARTNERID;
			break;
		case CLCC_GAMESPY_REQUIREDNICK:
			requestedParams[ a ].m_pData = GAMESPY_REQUIREDNICK;
			break;
		case CLCC_GAMESPY_D2GCATALOGREGION:
			if ( g_pGameCVars )
			{
				requestedParams[a].m_pData = ( void* )g_pGameCVars->g_gamespy_catalog_region;
			}
			else
			{
				requestedParams[a].m_pData = NULL;
			}
			break;
		case CLCC_GAMESPY_D2GCATALOGVERSION:
			if ( g_pGameCVars )
			{
				requestedParams[a].m_32 = g_pGameCVars->g_gamespy_catalog_version->GetIVal();
			}
			else
			{
				requestedParams[a].m_32 = 0;
			}
			break;
		case CLCC_GAMESPY_D2GCATALOGTOKEN:
			if ( g_pGameCVars )
			{
				requestedParams[a].m_pData = ( void* )g_pGameCVars->g_gamespy_catalog_token;
			}
			else
			{
				requestedParams[a].m_pData = 0;
			}
			break;

			// CLCC_CRYLOBBY_LOGINGUISTATE is common to all online services for
			// which login is not handled by the OS. It will be requested if any
			// other requested data may require a login GUI to be displayed.

		case CLCC_CRYLOBBY_LOGINGUISTATE:
			//CRY_TODO( 30, 4, 2010, "Display a real GUI, don't use these hard coded values" );
			if ( g_pGameCVars )
			{
				ECryLobbyLoginGUIState requestedGUIState = eCLLGS_ExistingAccount;//eCLLGS_NotFinished;
				
				if(gEnv->IsDedicated() || g_pGameCVars->g_gamespy_loginUI==0)
				{
					requestedGUIState = eCLLGS_ExistingAccount;
				}
				else if(g_pGame->GetGameBrowser())
				{
				//	requestedGUIState = g_pGame->GetGameBrowser()->GetLoginGUIState();
				}

				requestedParams[ a ].m_32 = requestedGUIState;
			}
			else
			{
				requestedParams[ a ].m_32 = eCLLGS_Cancelled;
			}
			break;

		case CLCC_CRYLOBBY_LOGINGUICOUNT:
			if ( g_pGameCVars )
			{
				requestedParams[ a ].m_32 = 0;//g_pGameCVars->g_gamespy_loginCount;
			}
			else
			{
				requestedParams[ a ].m_32 = 0;
			}
			break;

			// The following GameSpy data may require a login GUI to be displayed.

		case CLCC_GAMESPY_EMAIL:
			if ( g_pGameCVars )
			{
				string email = "crysis2.";
				email.append(g_pGameCVars->g_gamespy_accountnumber->GetString());
				email.append("*****@*****.**");
				requestedParams[a].m_pData = (void*)email.c_str();//(void*)g_pGameCVars->g_gamespy_email->GetString();
			}
			else
			{
				requestedParams[a].m_pData = NULL;
			}
			break;
		case CLCC_GAMESPY_UNIQUENICK:
			if ( g_pGameCVars )
			{
				string nick = "crysis2_";
				nick.append(g_pGameCVars->g_gamespy_accountnumber->GetString());
				nick.append("_paulm");
				requestedParams[a].m_pData = (void*)nick.c_str();//(void*)g_pGameCVars->g_gamespy_unique_nick->GetString();
			}
			else
			{
				requestedParams[a].m_pData = NULL;
			}
			break;
		case CLCC_GAMESPY_PASSWORD:
			if ( g_pGameCVars )
			{
				requestedParams[a].m_pData = "upple?9!";//(void*)g_pGameCVars->g_gamespy_password->GetString();
			}
			else
			{
				requestedParams[a].m_pData = NULL;
			}
			break;
		case CLCC_GAMESPY_CDKEY:
			if ( g_pGameCVars )
			{
				requestedParams[a].m_pData = (void*)g_pGameCVars->g_gamespy_cdkey->GetString();
			}
			else
			{
				requestedParams[a].m_pData = NULL;
			}
			break;

		case CLCC_GAMESPY_KEYNAME:

			// Session user data IDs map to GameSpy keys, which must be named.
			// CLCC_GAMESPY_KEYNAME will be requested for each session user data ID
			// greater than or equal to NUM_RESERVED_KEYS.
			//
			// IN:	requestedParams[ a ].m_8 holds a session user data ID.
			// OUT:	requestedParams[ a ].m_pData holds the GameSpy key name.
			//
			// NOTE: m_8 and m_pData are members of a union, so setting m_pData
			// will overwrite m_8.

			switch ( requestedParams[ a ].m_8 )
			{
			case LID_MATCHDATA_GAMEMODE:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_GAMEMODE;
				break;

			case LID_MATCHDATA_MAP:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_MAP;
				break;

			case LID_MATCHDATA_ACTIVE:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_ACTIVE;
				break;

			case LID_MATCHDATA_VERSION:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_VERSION;
				break;

			case LID_MATCHDATA_REQUIRED_DLCS:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_REQUIRED_DLCS;
				break;

			case LID_MATCHDATA_PLAYLIST:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_PLAYLIST;
				break;

			case LID_MATCHDATA_LANGUAGE:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_LANGUAGE;
				break;

			case LID_MATCHDATA_OFFICIAL:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_OFFICIAL;
				break;

			case LID_MATCHDATA_FAVOURITE_ID:

				requestedParams[ a ].m_pData = GAMESPY_KEYNAME_MATCHDATA_FAVOURITE_ID;
				break;

			default:

				CRY_ASSERT_MESSAGE( 0, "Session user data ID has no GameSpy key name" );
				requestedParams[ a ].m_pData = NULL;
				break;
			}

			break;

		case CLCC_GAMESPY_KEYSTRINGVALUE:

			{
				SCryLobbyUserDataStringParam*	pParam = static_cast< SCryLobbyUserDataStringParam* >( requestedParams[ a ].m_pData );

				switch ( pParam->id )
				{
				case LID_MATCHDATA_MAP:
					requestedParams[ a ].m_pData = const_cast< void* >( static_cast< const void* >( GameLobbyData::GetMapFromHash( pParam->value ) ) );
					break;
				case LID_MATCHDATA_GAMEMODE:
					requestedParams[ a ].m_pData = const_cast< void* >( static_cast< const void* >( GameLobbyData::GetGameRulesFromHash( pParam->value ) ) );
					break;
				default:
					requestedParams[ a ].m_pData = NULL;
					break;
				}
			}

			break;

		case CLCC_GAMESPY_P2PLEADERBOARDFMT:

			requestedParams[a].m_pData = ( void* )GAMESPY_P2P_LEADERBOARD_FORMAT;
			break;

		case CLCC_GAMESPY_DEDICATEDLEADERBOARDFMT:

			requestedParams[a].m_pData = ( void* )GAMESPY_DEDICATED_LEADERBOARD_FORMAT;
			break;

		case CLCC_GAMESPY_P2PSTATSTABLE:

			requestedParams[a].m_pData = ( void* )GAMESPY_P2P_STATS_TABLE;
			break;

		case CLCC_GAMESPY_DEDICATEDSTATSTABLE:

			requestedParams[a].m_pData = ( void* )GAMESPY_DEDICATED_STATS_TABLE;
			break;

		case CLCC_GAMESPY_TITLECDKEYSERVER:

			requestedParams[a].m_32 = 1;
			break;

#if defined( DEDICATED_SERVER )
		case CLCC_GAMESPY_DEDIVERSION:

			requestedParams[a].m_32 = GAMESPY_DEDI_VERSION;
			break;
#endif

#if USE_CRYLOBBY_GAMESPY_VOIP
		case CLCC_GAMESPY_VOICE_CODEC:
			requestedParams[a].m_pData = (void*)CCryGameSpyVoiceCodec::Initialise();
			break;
#endif // USE_CRYLOBBY_GAMESPY_VOIP
#endif // USE_CRYLOBBY_GAMESPY































































































































		case CLCC_MATCHMAKING_SESSION_PASSWORD_MAX_LENGTH:
			requestedParams[a].m_8 = MATCHMAKING_SESSION_PASSWORD_MAX_LENGTH;
			break;

		default:
			CRY_ASSERT_MESSAGE(0,"Unknown Configuration Parameter Requested!");
			break;
		}
	}
}
Exemple #3
0
void CGameBrowser::ConfigurationCallback(ECryLobbyService service, SConfigurationParams *requestedParams, uint32 paramCount)
{
	uint32 a;
	for (a=0;a<paramCount;++a)
	{
		switch (requestedParams[a].m_fourCCID)
		{
		case CLCC_LAN_USER_NAME:
			{
				uint32 userIndex = g_pGame->GetExclusiveControllerDeviceIndex();

				IPlatformOS *pPlatformOS = gEnv->pSystem->GetPlatformOS();
				IPlatformOS::TUserName tUserName = "";
				if(pPlatformOS)
				{
					pPlatformOS->UserGetName(userIndex, tUserName);
				}
			
				// this will null terminate for us if necessary	
				cry_strncpy(s_profileName, tUserName.c_str(), CRYLOBBY_USER_NAME_LENGTH);
				int instance = gEnv->pSystem->GetApplicationInstance();
				if (instance>0)
				{
					size_t length = strlen(s_profileName);
					if (length + 3 < CRYLOBBY_USER_NAME_LENGTH)
					{
						s_profileName[length] = '(';
						s_profileName[length+1] = '0' + instance;
						s_profileName[length+2] = ')';
						s_profileName[length+3] = 0;
					}
				}

				requestedParams[a].m_pData = s_profileName;
			}
			break;

#if defined(ORBIS)
		case CLCC_CRYLOBBY_PRESENCE_CONVERTER:
			{
				SCryLobbyPresenceConverter* pConverter = (SCryLobbyPresenceConverter*)requestedParams[a].m_pData;
				if (pConverter)
				{
					//-- Use the pConverter->m_numData data items in pConverter->m_pData to create a string in pConverter->m_pStringBuffer
					//-- Use the initial value of pConverter->sizeOfStringBuffer as a maximum string length allowed, but
					//-- update pConverter->sizeOfStringBuffer to the correct length when the string is filled in.
					//-- Set pConverter->sizeOfStringBuffer = 0 to invalidate bad data so it isn't sent to PSN.
					CryFixedStringT<MAX_PRESENCE_STRING_SIZE> strPresence;
					if(CreatePresenceString(strPresence, pConverter->m_pData, pConverter->m_numData))
					{
						CryLog("[RichPresence] Succeeded %s", strPresence.c_str());
						sprintf((char*)pConverter->m_pStringBuffer, "%s", strPresence.c_str());
						pConverter->m_sizeOfStringBuffer = strlen((char*)pConverter->m_pStringBuffer);
					}
					else
					{
						CryLog("[RichPresence] Failed to create rich presence string");
						pConverter->m_sizeOfStringBuffer = 0;
					}
				}
			}
			break;
#endif
			
#if defined(DURANGO)
		case CLCC_LIVE_TITLE_ID:
			requestedParams[a].m_32 = DURANGO_LIVE_TITLE_ID;
			break;
		case CLCC_LIVE_SERVICE_CONFIG_ID:
			requestedParams[a].m_pData = DURANGO_LIVE_SERVICE_CONFIG_ID;
			break;
#endif//DURANGO

#if defined(ORBIS)
		case CLCC_PSN_TITLE_ID:
			requestedParams[a].m_pData = (void*)&s_title_id;
			break;

		case CLCC_PSN_TITLE_SECRET:
			requestedParams[a].m_pData = (void*)&s_title_secret;
			break;

		case CLCC_PSN_AGE_LIMIT:
			requestedParams[a].m_pData = (void*)&s_age_restrictions;
			break;

		case CLCC_PSN_PLUS_TEST_REQUIRED:
			requestedParams[a].m_32 = FALSE;
			break;

		case CLCC_PSN_CREATE_SESSION_ADVERTISEMENT:
			{
				SCryLobbySessionAdvertisement* pAdvertisement = (SCryLobbySessionAdvertisement*)requestedParams[a].m_pData;
				if (pAdvertisement)
				{
					pAdvertisement->m_numLanguages = s_NumLocalisedSessionAdvertisementLanguages;
					pAdvertisement->m_pLocalisedLanguages = (char**)s_LocalisedLanguages;
					pAdvertisement->m_pLocalisedSessionNames = (char**)s_LocalisedSessionAdvertisementName;
					pAdvertisement->m_pLocalisedSessionStatus = (char**)s_LocalisedSessionAdvertisementStatus;
					pAdvertisement->m_pJPGImage = (void*)s_SessionAdvertisementImage;
					pAdvertisement->m_sizeofJPGImage = strlen(s_SessionAdvertisementImage);
					// pAdvertisement->m_pData already points to a buffer of maximum size. It just needs to be filled in correctly.
					// pAdvertisement->m_sizeofData currently set to maximum size. You should change this to be correct size of actual data.
					// eg:	SAdvertDataStruct* pData = (SAdvertDataStruct*)pAdvertisement->m_pData;
					//			pData->id = 12345;
					//			pAdvertisement->m_sizeofData = sizeof(SAdvertDataStruct);
					uint32* pRealmId = (uint32*)pAdvertisement->m_pData;
					*pRealmId = 12345;
					pAdvertisement->m_sizeofData = sizeof(uint32);
				}
			}
			break;

		case CLCC_PSN_UPDATE_SESSION_ADVERTISEMENT:
			{
				SCryLobbySessionAdvertisement* pAdvertisement = (SCryLobbySessionAdvertisement*)requestedParams[a].m_pData;
				if (pAdvertisement)
				{
					// If pAdvertisement->m_numLanguages == 0, no attempt to alter the advertisement language settings will be made.
					// If pAdvertisement->m_numLanguages > 0, the previous language strings will all be overwritten with new ones.
					// (All strings are replaced or removed if not specified again)
					pAdvertisement->m_numLanguages = s_NumLocalisedSessionAdvertisementLanguages;
					pAdvertisement->m_pLocalisedLanguages = (char**)s_LocalisedLanguages;
					pAdvertisement->m_pLocalisedSessionNames = (char**)s_LocalisedSessionAdvertisementName;
					pAdvertisement->m_pLocalisedSessionStatus = (char**)s_LocalisedSessionAdvertisementStatus;
					// If pAdvertisement->m_pJPGImage is non-null and pAdvertisement->m_sizeofJPGImage > 0, the JPG data for the advertisement will be overwritten with a new JPG
					pAdvertisement->m_pJPGImage = (void*)s_SessionAdvertisementImage;
					pAdvertisement->m_sizeofJPGImage = strlen(s_SessionAdvertisementImage);
					// pAdvertisement->m_pData already points to a buffer containing a copy of the data passed into CryMatchmaking::SessionSetAdvertisementData.
					// and pAdvertisement->m_sizeofData is set to the correct size.
					// There should be no need to alter the contents of m_pData in this configuration callback.
				}
			}
			break;

		case CLCC_PSN_INVITE_BODY_STRING:
			{
				SCryLobbyXMBString* pStringData = (SCryLobbyXMBString*)requestedParams[a].m_pData;
				sprintf((char*)pStringData->m_pStringBuffer, "This is a test invite message");
				pStringData->m_sizeOfStringBuffer = strlen((char*)pStringData->m_pStringBuffer);
			}
			break;
#endif

		case CLCC_CRYSTATS_ENCRYPTION_KEY:
			{
#if defined(ORBIS)
				requestedParams[a].m_pData = (void*)"";
#else
				requestedParams[a].m_pData = (void*)"";
#endif
			}
			break;

		case CLCC_MATCHMAKING_SESSION_PASSWORD_MAX_LENGTH:
			requestedParams[a].m_8 = MATCHMAKING_SESSION_PASSWORD_MAX_LENGTH;
			break;

#if USE_STEAM
#if !defined(RELEASE)
		case CLCC_STEAM_APPID:
			requestedParams[a].m_32 = STEAM_APPID;
			break;
#endif // !defined(RELEASE)
#endif // USE_STEAM

		default:
			CRY_ASSERT_MESSAGE(0,"Unknown Configuration Parameter Requested!");
			break;
		}
	}
}