Main Page | Modules | File List | File Members

# Callback definitions

Callback definitions. More...

## Typedefs
typedef GSvoid(* | MSClient_GameServerCB )(GSint iLobbyID, GSint iRoomID, GSshort siGroupType, GSchar *szGroupName, GSint iConfig, GSchar *szMaster, GSchar *szAllowedGames, GSchar *szGames, GSchar *szGameVersion, GSchar *szGSVersion, GSvoid *vpInfo, GSint iSize, GSuint uiMaxPlayer, GSuint uiNbrPlayer, GSuint uiMaxVisitor, GSuint uiNbrVisitor, GSchar *szIPAddress, GSchar *szAltIPAddress, GSint iEventID)
| Receivec information on a game server.
typedef GSvoid(* | MSClient_AlternateInfoCB )(GSint iLobbyID, GSint iRoomID, const GSvoid *pcAlternateInfo, GSint iAltInfoSize)
| The Alternate Info of a Game Server.
typedef GSvoid(* | MSClient_ErrorCB )(GSint iReason, GSint iLobbyID, GSint iRoomID)
| An error occured.
typedef GSvoid(* | MSClient_InitFinishedCB )(GSubyte ucType, GSint iError, GSchar *szUserName)
| The initialization has finished.
typedef GSvoid(* | MSClient_LoginDisconnectCB )()
| The library has disconnected from the Router.
typedef GSvoid(* | MSClient_LobbyDisconnectCB )()
| The library has disconnected from the Lobby.
typedef GSvoid(* | MSClient_RequestFinishedCB )()
| All the Game Servers have been downloaded.
typedef GSvoid(* | MSClient_JoinFinishedCB )(GSint iLobbyID, GSint iRoomID, GSvoid *vpGameData, GSint iSize, GSchar *szIPAddress, GSchar *szAltIPAddress, GSushort usPort)
| Finished joining the game server.
typedef GSvoid(* | MSClient_AccountCreationCB )(GSubyte ucType, GSint iReason)
| Account Creatation callback.
typedef GSvoid(* | MSClient_ModifyAccountCB )(GSubyte ucType, GSint iReason)
| Account Creatation callback.
typedef GSvoid(* | MSClient_MatchStartedCB )(GSint iLobbyID, GSint iRoomID, GSuint uiMatchID)
| The match has started.
typedef GSvoid(* | MSClient_SubmitMatchCB )(GSubyte ucType, GSint iReason, GSuint iMatchID)
| The replay to MSClient_SubmitMatchResult.
typedef GSvoid(* | MSClient_RequestMOTDCB )(GSubyte ubType, GSchar *szUbiMOTD, GSchar *szGameMOTD, GSint iReason)
| Receive the message of the day.

## Detailed Description

These callbacks definitions are used by the game to process response to queries sent to Ubi.com.

## Typedef Documentation

typedef GSvoid( * MSClient_AccountCreationCB)(GSubyte ucType, GSint iReason)

  | Description: Tells the client if the account creation was successfull. Parameters:
  ucType | GSSUCCESS or GSFAIL
  iReason | The reason for a GSFAIL.

typedef GSvoid( * MSClient_AlternateInfoCB)(GSint iLobbyID,GSint iRoomID, const GSvoid* pcAlternateInfo, GSint iAltInfoSize)

  | Description: This called when alternate information on a Game Server is received. Parameters:
  iLobbyID | The ID of the Lobby Server
  iRoomID | The ID of the Room.
  pcAltGroupInfo | The alternate information
  iAltInfoSize | The size of the alternate info

typedef GSvoid( * MSClient_ErrorCB)(GSint iReason,GSint iLobbyID, GSint iRoomID)

  | Description: Called when a error occurs. The reason can be looked up in LobbyDefine.h Parameters:
  iReason | The reason for the error
  iLobbyID | The ID of the lobby. 0 if the error doesn't involve a Lobby
  iRoomID | The ID of the room. 0 if the error doesn't involve a Room

typedef GSvoid( * MSClient_GameServerCB)(GSint iLobbyID,GSint iRoomID, GSshort siGroupType,GSchar *szGroupName, GSint iConfig, GSchar *szMaster,GSchar *szAllowedGames,GSchar *szGames, GSchar *szGameVersion,GSchar *szGSVersion,GSvoid *vpInfo,GSint iSize, GSuint uiMaxPlayer,GSuint uiNbrPlayer,GSuint uiMaxVisitor, GSuint uiNbrVisitor,GSchar *szIPAddress,GSchar *szAltIPAddress, GSint iEventID)

  | Description: This callback will be called whenever a game server is found for the request the client has made. Parameters:
  iLobbyID | The id of the lobby server
  iRoomID | The Id of the room.
  siGroupType | The type of game server. (ROOM_DIRECTPLAY,ROOM_GAMEMODULE,ROOM_P2P,ROOM_CLIENTHOST)
  szGroupName | The name of the game server
  iConfig | The game server configuration flag
  szMaster | The name of the master of the room.
  szAllowedGames | The games allowed in this room.
  szGames | The games that can be played in the room.
  szGameVersion | The version of the game (information only)
  szGSVersion | The version of the gs-game
  vpInfo | A pointer to the game data
  iSize | The size of the game data structure
  uiMaxPlayer | The maximum number of players allowed in that room
  uiNbrPlayer | The number of players currently in that room
  uiMaxVisitor | The maximum number of visitors allowed in that room
  uiNbrVisitor | The number of visitors currently in that room
  szIPAddress | The ip address of the host (master) of the room
  szAltIPAddress | The alternate ip address of the host (master) of the room
  iEventID | The event id for that room

typedef GSvoid( * MSClient_InitFinishedCB)(GSubyte ucType, GSint iError, GSchar *szUserName)

  | Description: The library has finished initializing and other functions can be called. If an error happened while initializing, the type will be GSFAIL and iError will contain the reason for the error. This value can be looked up in define.h Parameters:
  ucType | GSSUCCESS or GSFAIL
  iError | The reason for the GSFAIL
  szUserName | The correct case of the players username.

typedef GSvoid( * MSClient_JoinFinishedCB)(GSint iLobbyID,GSint iRoomID, GSvoid *vpGameData,GSint iSize,GSchar *szIPAddress,GSchar *szAltIPAddress, GSushort usPort)

  | Description: The library has finished joining the game server on the lobby. Parameters:
  iLobbyID | The ID of the Lobby Server
  iRoomID | The ID of the Room.
  vpGameData | The Game data
  iSize | The size of the Game Data
  szIPAddress | The IP address of the game server
  szAltIPAddress | The Alternate address
  usPort | The Port of the game server

typedef GSvoid( * MSClient_LobbyDisconnectCB)()

| Description: The library has become disconnected from the Lobby. The client does not need to uninitialize and re-initialize the library. If the player was in a Game they will have to call MSClient_JoinGameServerByID and rejoin the GameServer. They do not have to disconnect from the game server, this should not interrupt the player while they play the game.

typedef GSvoid( * MSClient_LoginDisconnectCB)()

| Description: The library has become disconnected from the Router. The client should uninitialize and then re-initialize the library. If the player was in a Game they will have to call MSClient_JoinGameServerByID and rejoin the GameServer. They do not have to disconnect from the game server, this should not interrupt the player while they play the game.

typedef GSvoid( * MSClient_MatchStartedCB)(GSint iLobbyID,GSint iRoomID, GSuint uiMatchID)

  | Description: The game server has started the match Parameters:
  iLobbyID | The ID of the Lobby Server
  iRoomID | The ID of the Room.
  uiMatchID | The id of the started match

typedef GSvoid( * MSClient_ModifyAccountCB)(GSubyte ucType, GSint iReason)

  | Description: Tells the client if the account modification was successfull. Parameters:
  ucType | GSSUCCESS or GSFAIL
  iReason | The reason for a GSFAIL.

typedef GSvoid( * MSClient_RequestFinishedCB)()

| Description: Called when all the Game Servers have been downloaded. This is currently 3 seconds after the last Game Server has been received.

typedef GSvoid( * MSClient_RequestMOTDCB)(GSubyte ubType, GSchar *szUbiMOTD, GSchar *szGameMOTD, GSint iReason)

  | Description: This callback will be called when the client receives the MOTDs from the server. The messages will never be greater the MOTDLENGTH. Related function: MSClient_RequestMOTD() Errors: ERRORROUTER_DBPROBLEM: There is a problem with the database. Parameters:
  ubType | The status of the message received back (GSSUCCESS or GSFAIL)
  szUbiMOTD | The message of the day for the Ubi.com Game Service
  szGameMOTD | The message of the day for the game.
  iReason | The reason for the failure if ubType is GSFAIL

typedef GSvoid( * MSClient_SubmitMatchCB)(GSubyte ucType, GSint iReason,GSuint iMatchID)

  | Description: Informs the program if the SubmitMatch was successful or not Parameters:
  ucType | GSSUCCESS or GSFAIL
  iReason | if usType is GSFAIL this is the reason. See LobbyDefines.h
  iMatchID | The id of the match

Ubi.com GameService SDK - ©UbiSoft Entertainment 2002
GameService development team