Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.OnlineGameSearch


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
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
/**
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 */

/**
 * Holds the base settings for an online game search
 */
class OnlineGameSearch extends Settings
	native;

/** Max number of queries returned by the matchmaking service */
var int MaxSearchResults;

/** The query to use for finding matching servers */
var LocalizedStringSetting Query;

/** Whether the query is intended for LAN matches or not */
var databinding bool bIsLanQuery;

/** Whether to use arbitration or not */
var databinding bool bUsesArbitration;

/** Whether the search object in question is in progress or not. This is the union of the other flags */
var const bool bIsSearchInProgress;

/** Whether or not this is a full server refresh (as compared to just a single server update) */
var const bool bIsFullServerUpdate;

/** Whether the search object in question has a listen server search in progress or not */
var const bool bIsListenServerSearchInProgress;

/** Whether the search object in question has a dedicated server search in progress or not */
var const bool bIsDedicatedServerSearchInProgress;

/** Whether the search object in question has a list play search in progress or not */
var const bool bIsListPlaySearchInProgress;

/** Whether the search should include dedicated servers or not */
var databinding bool bShouldIncludeDedicatedServers;

/** Whether the search should include listen servers or not */
var databinding bool bShouldIncludeListenServers;

/** Whether the search should include list play servers or not */
var databinding bool bShouldIncludeListPlayServers;

/** The total number of list play servers available if a list play search */
var databinding int NumListPlayServersAvailable;

/** Struct used to return matching servers */
struct native OnlineGameSearchResult
{
	/** The settings used by this particular server */
	var const OnlineGameSettings GameSettings;
	/**
	 * Platform/online provider specific data
	 * NOTE: It is imperative that the subsystem be called to clean this data
	 * up or the PlatformData will leak memory!
	 */
	var const native pointer PlatformData{void};

	/** Platform/online provider specific data */
	var const native pointer ServerSearchData{void};

	structcpptext
	{
		/** Default constructor does nothing and is here for NoInit types */
		FOnlineGameSearchResult()
		{
		}

		/** Zeroing constructor */
		FOnlineGameSearchResult(EEventParm) :
			GameSettings(NULL),
			PlatformData(NULL),
            ServerSearchData(NULL)
		{
		}
	}
};

/** The class to create for each returned result from the search */
var class<OnlineGameSettings> GameSettingsClass;

/** Platform specific data related to the game search */
var native const transient private pointer SearchHandle{void};

/** The list of servers and their settings that match the search */
var const array<OnlineGameSearchResult> Results;

/**
 * Used to search for named properties on game setting objects
 */
struct native NamedObjectProperty
{
	/** The name of the property to search with */
	var name ObjectPropertyName;
	/** The string value to compare against */
	var string ObjectPropertyValue;
};

/** The list of named properties to search on */
var array<NamedObjectProperty> NamedProperties;

/** String that is tacked onto the end of the search query */
var string AdditionalSearchCriteria;

/** The type of data to use to fill out an online parameter */
enum EOnlineGameSearchEntryType
{
	/** A property is used to filter with */
	OGSET_Property,
	/** A localized setting is used to filter with */
	OGSET_LocalizedSetting,
	/** A property on the game settings object to filter with */
	OGSET_ObjectProperty
};

/** The type of comparison to perform on the search entry */
enum EOnlineGameSearchComparisonType
{
	OGSCT_Equals,
	OGSCT_NotEquals,
	OGSCT_GreaterThan,
	OGSCT_GreaterThanEquals,
	OGSCT_LessThan,
	OGSCT_LessThanEquals
};

/** Struct used to describe a search criteria */
struct native OnlineGameSearchParameter
{
	/** The Id of the property or localized string */
	var int EntryId;
	/** The name of the property to search with */
	var name ObjectPropertyName;
	/** Whether this parameter to compare against comes from a property or a localized setting */
	var EOnlineGameSearchEntryType EntryType;
	/** The type of comparison to perform */
	var EOnlineGameSearchComparisonType ComparisonType;
};

/** Used to indicate which way to sort a result set */
enum EOnlineGameSearchSortType
{
	OGSSO_Ascending,
	OGSSO_Descending
};

/** Struct used to describe the sorting of items */
struct native OnlineGameSearchSortClause
{
	/** The Id of the property or localized string */
	var int EntryId;
	/** The name of the property to search with */
	var name ObjectPropertyName;
	/** Whether this parameter to compare against comes from a property or a localized setting */
	var EOnlineGameSearchEntryType EntryType;
	/** The type of comparison to perform */
	var EOnlineGameSearchSortType SortType;
};

/** Matches parameters using a series of OR comparisons */
struct native OnlineGameSearchORClause
{
	/** The list of parameters to compare and use as an OR clause */
	var array<OnlineGameSearchParameter> OrParams;
};

/** Struct used to describe a query */
struct native OnlineGameSearchQuery
{
	/** A set of OR clauses that are ANDed together to filter potential servers */
	var array<OnlineGameSearchORClause> OrClauses;
	/** A list of sort operations used to order the servers that match the filtering */
	var array<OnlineGameSearchSortClause> SortClauses;
};


/** Holds the query to use when filtering servers and they require non-predefined queries */
var const OnlineGameSearchQuery FilterQuery;



/** Raw (manually defined) queries */
/** Unlike 'FilterQuery' filters, these allow more flexibility in defining the query, and can be evaluated clientside if the query limit (512 bytes) is reached */

/** Template struct used to define a search parameter with manually defined comparision operator and value fields */
struct native RawOnlineGameSearchParameterTemplate
{
	/** The Id of the property or localized string to be compared */
	var int EntryId;
	/** The name of the property to search with */
	var name ObjectPropertyName;
	/** Whether this parameter to compare against comes from a property or a localized setting */
	var EOnlineGameSearchEntryType EntryType;

	/** If set, this string overrides the above variables, and will represent the server property that will be compared */
	var string EntryValue;
	/** The value to be compared against (N.B. For string comparisons, % is a wildcard, e.g. '%test%') */
	var string ComparedValue;
};

/** Struct used to define a 'raw' game search parameter, which is sent to the Gamespy master server (or evaluated clientside, if the query limit is reached) */
struct native RawOnlineGameSearchParameter extends RawOnlineGameSearchParameterTemplate
{
	/** The string used as the (SQL like) comparison operator; operators supported by the clientside evaluation code: */
	/** !=, >=, <=, =, <, >, LIKE, NOT LIKE */
	/** NOTE: For the LIKE and NOT LIKE operators, you will need to add a space at the start of this string */
	var string ComparisonOperator;
};

/** Matches raw parameters using a series of OR comparisons */
struct native RawOnlineGameSearchOrClause
{
	/** The list of raw parameters to compare and use as an OR clause */
	var array<RawOnlineGameSearchParameter> OrParams;
};


/** A list of additional manually defined queries which are ANDed together */
var array<RawOnlineGameSearchOrClause> RawFilterQueries;

/** If 'FilterQuery'+'RawFilterQueries' exceeds Gamespy's query limit (512 bytes), the excess queries from 'RawFilterQueries' are put here for clientside filtering */
var const array<RawOnlineGameSearchOrClause> RemainingFilterQueries;



/** Clientside filters */

/** Struct used to define a clientside filter, which is based upon the 'raw' game search parameter */
struct native ClientOnlineGameSearchParameter extends RawOnlineGameSearchParameterTemplate
{
	/** The delegate which is used to compare the parameter values, this must be set when adding to 'ClientsideFilters' */
	var delegate<OnComparePropertyValue> ComparisonDelegate;
};

/** Matches parameters using a series of OR comparisions */
struct native ClientOnlineGameSearchOrClause
{
	/** The list of parameters to compare and use as an OR clause */
	var array<ClientOnlineGameSearchParameter> OrParams;
};


/** A list of clientside filters which are ANDed together */
var array<ClientOnlineGameSearchOrClause> ClientsideFilters;


/** Delegate template for comparing game search parameter values */
delegate bool OnComparePropertyValue(string PropertyValue, string ComparedValue)
{
	return False;
}


// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)

// Resets all queries that are modifed at runtime
function ResetFilters()
{
	AdditionalSearchCriteria = "";
	RawFilterQueries.Length = 0;
	ClientsideFilters.Length = 0;
}

defaultproperties
{
   MaxSearchResults=25
   bShouldIncludeListenServers=True
   GameSettingsClass=Class'Engine.OnlineGameSettings'
   Name="Default__OnlineGameSearch"
   ObjectArchetype=Settings'Engine.Default__Settings'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:17:56.000 - Creation time: sk 18-3-2018 10:01:10.704 - Created with UnCodeX