9 #ifndef INCLUDE_FUNAPI_SERVICE_DEDICATED_SERVER_MANAGER_H_    10 #define INCLUDE_FUNAPI_SERVICE_DEDICATED_SERVER_MANAGER_H_    15 #include <boost/function.hpp>    16 #include <boost/noncopyable.hpp>    24     : 
private boost::noncopyable {
    26   typedef boost::function<void (
const fun::Uuid &, 
    27                                 const std::vector<std::string> &, 
    30   typedef boost::function<void (
const fun::Uuid &, 
    32                                 bool )> MatchResultCallback;
    34   typedef boost::function<void (
const fun::Uuid &, 
    36                                 bool )> GetGameStateCallback;
    38   typedef boost::function<void (
const fun::Uuid &match_id,
    39                                 const std::string &account)> UserJoinedCallback;
    41   typedef boost::function<void (
const fun::Uuid &match_id,
    42                                 const std::string &account)> UserLeftCallback;
    44   typedef boost::function<void (
const fun::Uuid &match_id,
    48   typedef boost::function<uint32_t (uint32_t current_instance_count,
    49                                     uint32_t idle_instance_count,
    50                                     uint32_t min_instance_count,
    51                                     uint32_t max_instance_count,
    52                                     uint32_t reserved_instance_count)>
    53       ConfigureReservedInstanceCountCallback;
    56   typedef boost::function<bool (
    57       const std::string &uri, 
const fun::Json &claim)> JwtAuthorizationCallback;
    60   typedef boost::function<bool (
const std::string &account_id,
    61                                 const std::string &host,
    63                                 const std::string &token)> PreRedirectionHook;
    82   static void Spawn(
const fun::Uuid &match_id,
    84                     const std::vector<std::string> &dedicated_server_args,
    85                     const std::vector<std::string> &accounts,
    86                     const std::vector<fun::Json> &user_data,
    87                     const SendCallback &callback);
    91   static void Spawn(
const fun::Uuid &match_id,
    93                     const std::vector<std::string> &dedicated_server_args,
    94                     const std::vector<std::string> &accounts,
    95                     const std::vector<fun::Json> &user_data,
    96                     const std::vector<std::string> ®ion_preference,
    97                     const SendCallback &callback);
   106   static bool Cancel(
const fun::Uuid &match_id,
   108                      std::vector<std::string> *dedicated_server_args = NULL,
   109                      std::vector<std::string> *accounts = NULL,
   110                      std::vector<fun::Json> *user_data = NULL);
   119   static void SendUsers(
const fun::Uuid &match_id,
   121                         const std::vector<std::string> &accounts,
   122                         const std::vector<fun::Json> &user_data,
   123                         const SendCallback &callback);
   131   static void RegisterMatchResultCallback(
const MatchResultCallback &callback);
   137   static void RegisterUserEnteredCallback(
const UserJoinedCallback &callback);
   138   static void RegisterUserLeftCallback(
const UserLeftCallback &callback);
   148   static void RegisterConfigureReservedInstanceCountCallback(
   149       const ConfigureReservedInstanceCountCallback &callback);
   155   static void RegisterCustomCallback(
const CustomCallback &callback);
   160   static void GetGameState(
const fun::Uuid &match_id,
   161                            const GetGameStateCallback &callback);
   164   static void RegisterJwtAuthorizationCallback(
   165       const JwtAuthorizationCallback &callback);
   172   static void RegisterPreRedirectionHook(
const PreRedirectionHook &hook);
   174   static bool ExistsAvailableHost();
   176   static bool ExistsAvailableHost(
   177       const std::vector<std::string> ®ion_preference);
   182 #endif  // INCLUDE_FUNAPI_SERVICE_DEDICATED_SERVER_MANAGER_H_ 
Definition: dedicated_server_manager.h:23
boost::uuids::uuid Uuid
UUID type used throughout Funapi. 
Definition: types.h:56