Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 |
/** * UT specific data store base class for online game searches. * * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class UTDataStore_GameSearchBase extends UIDataStore_OnlineGameSearch native(UI) abstract; // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) /** Reference to the dataprovider that will provide details for a specific search result. */ var transient UTUIDataProvider_ServerDetails ServerDetailsProvider; /** * Retrieves the list of currently enabled mutators. * * @param MutatorIndices indices are from the list of UTUIDataProvider_Mutator data providers in the * UTUIDataStore_MenuItems data store which are currently enabled. * * @return TRUE if the list of enabled mutators was successfully retrieved. */ native function bool GetEnabledMutators( out array<int> MutatorIndices ); /** * Registers the delegate with the online subsystem */ event Init() { Super.Init(); // since we have two game search data stores active at the same time, we'll need to register this delegate only when // we're actively performing a search.. if ( GameInterface != None ) { GameInterface.ClearFindOnlineGamesCompleteDelegate(OnSearchComplete); } } /** * Called to kick off an online game search and set up all of the delegates needed * * @param ControllerIndex the ControllerId for the player to perform the search for * @param bInvalidateExistingSearchResults specify FALSE to keep previous searches (i.e. for other gametypes) in memory; default * behavior is to clear all search results when switching to a different item in the game search list * * @return TRUE if the search call works, FALSE otherwise */ event bool SubmitGameSearch(byte ControllerIndex, optional bool bInvalidateExistingSearchResults=true) { local bool bResult; // Set the function to call when the search is done GameInterface.AddFindOnlineGamesCompleteDelegate(OnSearchComplete); bResult = Super.SubmitGameSearch(ControllerIndex, bInvalidateExistingSearchResults); if ( !bResult ) { // should never return false, but just to be safe GameInterface.ClearFindOnlineGamesCompleteDelegate(OnSearchComplete); } return bResult; } /** * Called by the online subsystem when the game search has completed * * @param bWasSuccessful true if the async action completed without error, false if there was an error */ function OnSearchComplete(bool bWasSuccessful) { // regardless of whether the query was successful, if we don't have any queries pending, unregister the delegate // so that we don't receive callbacks when the other game search data store is performing a query if ( !HasOutstandingQueries(true) ) { GameInterface.ClearFindOnlineGamesCompleteDelegate(OnSearchComplete); } Super.OnSearchComplete(bWasSuccessful); } /** * @param bRestrictCheckToSelf if TRUE, will not check related game search data stores for outstanding queries. * * @return TRUE if a server list query was started but has not completed yet. */ function bool HasOutstandingQueries( optional bool bRestrictCheckToSelf ) { local bool bResult; local int i; for ( i = 0; i < GameSearchCfgList.Length; i++ ) { if ( GameSearchCfgList[i].Search != None && GameSearchCfgList[i].Search.bIsSearchInProgress ) { bResult = true; break; } } return bResult; } /** * @return TRUE if the current game search has completed a query. */ function bool HasExistingSearchResults() { local bool bQueryCompleted; // ok, this is imprecise - we may have already issued a query, but no servers were found... // could add a bool if ( SelectedIndex >=0 && SelectedIndex < GameSearchCfgList.Length ) { bQueryCompleted = GameSearchCfgList[SelectedIndex].Search.Results.Length > 0; } return bQueryCompleted; } defaultproperties { Name="Default__UTDataStore_GameSearchBase" ObjectArchetype=UIDataStore_OnlineGameSearch'Engine.Default__UIDataStore_OnlineGameSearch' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |