GOG GALAXY SDK Documentation
|
Functions | |
GALAXY_DLL_EXPORT void GALAXY_CALLTYPE | InitGameServer (const InitOptions &initOptions) |
Initializes the Galaxy Game Server with specified credentials. More... | |
GALAXY_DLL_EXPORT void GALAXY_CALLTYPE | ShutdownGameServer () |
Shuts down the Galaxy Game Server. More... | |
GALAXY_DLL_EXPORT void GALAXY_CALLTYPE | ShutdownGameServerEx (const ShutdownOptions &shutdownOptions) |
Shuts down the Galaxy Game Server. More... | |
GALAXY_DLL_EXPORT IUser *GALAXY_CALLTYPE | GameServerUser () |
Returns an instance of IUser interface for the Game Server entity. More... | |
GALAXY_DLL_EXPORT IMatchmaking *GALAXY_CALLTYPE | GameServerMatchmaking () |
Returns an instance of IMatchmaking interface for the Game Server entity. More... | |
GALAXY_DLL_EXPORT INetworking *GALAXY_CALLTYPE | GameServerNetworking () |
Returns an instance of INetworking interface for the Game Server entity that allows to communicate as the lobby host. More... | |
GALAXY_DLL_EXPORT IUtils *GALAXY_CALLTYPE | GameServerUtils () |
Returns an instance of IUtils interface for the Game Server entity. More... | |
GALAXY_DLL_EXPORT ITelemetry *GALAXY_CALLTYPE | GameServerTelemetry () |
Returns an instance of ITelemetry. More... | |
GALAXY_DLL_EXPORT ILogger *GALAXY_CALLTYPE | GameServerLogger () |
Returns an instance of ILogger interface for the Game Server entity. More... | |
GALAXY_DLL_EXPORT void GALAXY_CALLTYPE | ProcessGameServerData () |
Makes the Game Server process its input and output streams. More... | |
GALAXY_DLL_EXPORT IListenerRegistrar *GALAXY_CALLTYPE | GameServerListenerRegistrar () |
Returns an instance of IListenerRegistrar interface the for Game Server entity. More... | |
Game Server API is structured in the same way as Galaxy Peer API, providing global functions called GameServerUser(), GameServerMatchmaking(), GameServerNetworking() e.t.c. defined in GalaxyGameServerApi.h header file.
Objects, methods, or combinations of parameters that are not supposed to be used with Game Server, such as IUser::SetUserData(), IFriends::RequestFriendList(), IMatchmaking::SetLobbyMemberData() cause either IInvalidStateError or IInvalidArgumentError errors.
Since Game Server is a separate object, and in fact operates in a separate thread, separate methods are provided to control it: InitGameServer(), ProcessGameServerData(), and ShutdownGameServer().
Corresponding global self-registering listeners are provided for all interfaces supported by the Game Server prefixed with 'GameServer': GameServerGlobalAuthListener(), GameServerGlobalLobbyEnteredListener() e.t.c.
Game Server is authenticated anonymously using the IUser::SignInAnonymous(). This method is not available for the Galaxy Peer.
The Game Server is only allowed to create public non-host-migrating lobbies. Joining a specific lobby is not possible for the Game Server.
While in a lobby, the Game Server operates on the server INetworking interface, so incoming packets may be handled by the GameServerGlobalNetworkingListener.
GALAXY_DLL_EXPORT IListenerRegistrar* GALAXY_CALLTYPE galaxy::api::GameServerListenerRegistrar | ( | ) |
Returns an instance of IListenerRegistrar interface the for Game Server entity.
GALAXY_DLL_EXPORT ILogger* GALAXY_CALLTYPE galaxy::api::GameServerLogger | ( | ) |
GALAXY_DLL_EXPORT IMatchmaking* GALAXY_CALLTYPE galaxy::api::GameServerMatchmaking | ( | ) |
Returns an instance of IMatchmaking interface for the Game Server entity.
GALAXY_DLL_EXPORT INetworking* GALAXY_CALLTYPE galaxy::api::GameServerNetworking | ( | ) |
Returns an instance of INetworking interface for the Game Server entity that allows to communicate as the lobby host.
GALAXY_DLL_EXPORT ITelemetry* GALAXY_CALLTYPE galaxy::api::GameServerTelemetry | ( | ) |
Returns an instance of ITelemetry.
GALAXY_DLL_EXPORT IUser* GALAXY_CALLTYPE galaxy::api::GameServerUser | ( | ) |
GALAXY_DLL_EXPORT IUtils* GALAXY_CALLTYPE galaxy::api::GameServerUtils | ( | ) |
GALAXY_DLL_EXPORT void GALAXY_CALLTYPE galaxy::api::InitGameServer | ( | const InitOptions & | initOptions | ) |
Initializes the Galaxy Game Server with specified credentials.
[in] | initOptions | The group of the init options. |
GALAXY_DLL_EXPORT void GALAXY_CALLTYPE galaxy::api::ProcessGameServerData | ( | ) |
Makes the Game Server process its input and output streams.
During the phase of processing data, Game Server recognizes specific events and casts notifications for callback listeners immediately.
This method should be called in a loop, preferably every frame, so that Galaxy is able to process input and output streams.
GALAXY_DLL_EXPORT void GALAXY_CALLTYPE galaxy::api::ShutdownGameServer | ( | ) |
Shuts down the Galaxy Game Server.
The Game Server is deactivated and brought to the state it had when it was created and before it was initialized.
GALAXY_DLL_EXPORT void GALAXY_CALLTYPE galaxy::api::ShutdownGameServerEx | ( | const ShutdownOptions & | shutdownOptions | ) |
Shuts down the Galaxy Game Server.
The Game Server is deactivated and brought to the state it had when it was created and before it was initialized.
[in] | shutdownOptions | The group of the shutdown options. |