iFun Engine API  1.0.0-b5008
Great Technology for Great Games
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
fun::MatchmakingClient Class Reference

Classes

struct  Match
 
struct  MatchmakingServerInfo
 
struct  Player
 

Public Types

typedef function< void(const string &, CancelResult)> CancelCallback
 
enum  CancelResult { kCRSuccess = 0, kCRNoRequest, kCRError = 1000 }
 
typedef function< void(const string &, const Match &, MatchResult)> MatchCallback
 
typedef Uuid MatchId
 
typedef std::vector< MatchmakingServerInfoMatchmakingServerInfoVector
 
enum  MatchResult { kMRSuccess = 0, kMRAlreadyRequested, kMRTimeout, kMRError = 1000 }
 
typedef function< void(const string &, const MatchId &, const string &, const string &)> ProgressCallback
 
typedef function< void(const string &, const Match &, const string &, const string &)> ProgressCallback2
 
enum  TargetServerSelection { kRandom = 0, kMostNumberOfPlayers, kLeastNumberOfPlayers }
 
typedef int64_t Type
 

Static Public Member Functions

static void CancelMatchmaking (const Type &type, const string &player_id, const CancelCallback &cancel_callback) ASSERT_NO_ROLLBACK
 
static MatchmakingServerInfoVector GetMatchmakingServerInfo ()
 
static void StartMatchmaking (const Type &type, const string &player_id, const Json &player_context, const MatchCallback &match_callback, const TargetServerSelection &target_server=kRandom, const ProgressCallback &progress_callback=kNullProgressCallback, const WallClock::Duration &timeout=kNullTimeout) ASSERT_NO_ROLLBACK
 
static void StartMatchmaking (const Type &type, const string &player_id, const Json &player_context, const MatchCallback &match_callback, const Rpc::PeerId &target_server, const ProgressCallback &progress_callback=kNullProgressCallback, const WallClock::Duration &timeout=kNullTimeout) ASSERT_NO_ROLLBACK
 
static void StartMatchmaking2 (const Type &type, const string &player_id, const Json &player_context, const MatchCallback &match_callback, const TargetServerSelection &target_server=kRandom, const ProgressCallback2 &progress_callback2=kNullProgressCallback2, const WallClock::Duration &timeout=kNullTimeout) ASSERT_NO_ROLLBACK
 
static void StartMatchmaking2 (const Type &type, const string &player_id, const Json &player_context, const MatchCallback &match_callback, const Rpc::PeerId &target_server, const ProgressCallback2 &progress_callback2=kNullProgressCallback2, const WallClock::Duration &timeout=kNullTimeout) ASSERT_NO_ROLLBACK
 
static void UpdateMatchPlayerContext (const Type &type, const string &player_id, const Json &new_context) ASSERT_NO_ROLLBACK
 

Static Public Attributes

static const ProgressCallback kNullProgressCallback
 
static const ProgressCallback2 kNullProgressCallback2
 
static const WallClock::Duration kNullTimeout