Main Page | Modules | Class List | File List | Class Members | File Members

Callbacks
[Friends Service]

The friends service function callbacks. More...

Typedefs

typedef GSvoid(* CBFriendsRcv_LoginResult )(GSubyte ubType, GSint iReason)
 Receive friends service login result.

typedef GSvoid(* CBFriendsRcv_AddFriend )(GSubyte ubType, GSint iReason, GSchar *szUsername)
 Receive the status of the friend addition request.

typedef GSvoid(* CBFriendsRcv_DelFriend )(GSubyte ubType, GSint iReason, GSchar *szUsername)
 Receive the status of the remove friend request.

typedef GSvoid(* CBFriendsRcv_IgnorePlayer )(GSRESULT rCode, const GSchar *szPlayer)
 Result of an ignore player request.

typedef GSvoid(* CBFriendsRcv_UnignorePlayer )(GSRESULT rCode, const GSchar *szPlayer)
 Result of an unignore player request.

typedef GSvoid(* CBFriendsRcv_ListIgnoredPlayers )(GSRESULT rCode)
 Result of a request to get the ignore-list.

typedef GSvoid(* CBFriendsRcv_IgnoredPlayer )(const GSchar *szPlayer)
 Enumeration of the ignored players.

typedef GSvoid(* CBFriendsRcv_Page )(GSchar *szUsername, GSchar *pszMessage, GSchar *szTimeStamp)
 Receive a page message.

typedef GSvoid(* CBFriendsRcv_PagePlayer )(GSubyte ubType, GSint iReason, GSchar *szUsername)
 Receive the status of send page request.

typedef GSvoid(* CBFriendsRcv_PeerMsg )(GSchar *szUsername, GSvoid *p_Buffer, GSuint uiLength)
 Receive a peer message.

typedef GSvoid(* CBFriendsRcv_PeerPlayer )(GSubyte ubType, GSint iReason, GSchar *szUsername)
 Receive the status of the send peer message request.

typedef GSvoid(* CBFriendsRcv_ChangeFriend )(GSubyte ubType, GSint iReason)
 Receive the status of change friend request.

typedef GSvoid(* CBFriendsRcv_StatusChange )(GSubyte ubType, GSint iReason)
 Receive the status of a change status request.

typedef GSvoid(* CBFriendsRcv_UpdateFriend )(GSchar *szUsername, GSint iStatus, GSchar *szGroup, GSint iMood, GSint iOptions, GSchar *szGameName)
 Receive information about a friend.

typedef GSvoid(* CBFriendsRcv_SearchPlayer )(GSubyte ubType, GSint iReason, GSchar *szUsername, GSint iStatus, GSchar *szGameName)
 Receive the status of search player request.

typedef GSvoid(* CBFriendsRcv_ScoreCard )(GSubyte ubType, GSint iReason, GSchar *szUsername, GSchar *szGame, GSchar *szScore)
 Receive score card information for a player.


Detailed Description


Typedef Documentation

typedef GSvoid( * CBFriendsRcv_AddFriend)(GSubyte ubType, GSint iReason, GSchar* szUsername)
 

Description:
This callback will be called when the client receives response from the router after adding a friend to his friend list
Related Function:
FriendsSend_AddFriend()
Errors:
ERRORROUTER_DBPROBLEM: There is a problem with the database
ERRORFRIENDS_FRIENDNOTEXIST: The username didn't exist.
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL
szFriend The alias of the newly added friend

typedef GSvoid( * CBFriendsRcv_ChangeFriend)(GSubyte ubType, GSint iReason)
 

Description:
This callback will be called when the client receives response from the router after sending a change friend request.
Related Function:
FriendsSend_StatusChange()
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL

typedef GSvoid( * CBFriendsRcv_DelFriend)(GSubyte ubType, GSint iReason, GSchar* szUsername)
 

Description:
This callback will be called when the client receives response from the router after removing a friend from the friend list.
Related Function:
FriendsSend_DelFriend()
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL
szUsername The alias of the newly deleted friend

typedef GSvoid( * CBFriendsRcv_IgnoredPlayer)( const GSchar * szPlayer )
 

Description:
This callback will be called for each player in a ignore-list following a ignore-list retrieval request. The end of list is notified by the CBFriendsRcv_ListIgnoredPlayers callback.

Related function : FriendsSend_ListIgnoredPlayers()

Parameters:
szPlayer The ubi.com username of a ignored player

typedef GSvoid( * CBFriendsRcv_IgnorePlayer)( GSRESULT rCode, const GSchar * szPlayer )
 

Description:
This callback will be called with the results of a previous ignore player request.

Related function : FriendsSend_IgnorePlayer()

Parameters:
szPlayer The ubi.com username of the player that was ignored
rCode Result code of the request. Possible values are:
  • GSS_OK
    There was no error
  • GSE_INVALIDUSER
    The username to ignore is not a valid ubi.com user.
  • GSE_DBFAILURE
    An error occured on the DB while processing the request.
  • GSE_FAIL
    An unsuspected error occured most likely due to a bug on ubi.com

typedef GSvoid( * CBFriendsRcv_ListIgnoredPlayers)( GSRESULT rCode )
 

Description:
This callback will be called with the results of a previous ignore-list retrieval request.

Related function : FriendsSend_ListIgnoredPlayers()

Parameters:
rCode Result code of the request. Possible values are:
  • GSS_OK
    There was no error
  • GSE_DBFAILURE
    An error occured on the DB while processing the request.
  • GSE_FAIL
    An unsuspected error occured most likely due to a bug on ubi.com

typedef GSvoid( * CBFriendsRcv_LoginResult)(GSubyte ubType, GSint iReason)
 

Description:
This callback will be called when the client receives response from the router after asking to log into the friend service
Related Function:
FriendsSend_Login()
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL

typedef GSvoid( * CBFriendsRcv_Page)(GSchar* szUsername, GSchar* pszMessage, GSchar* szTimeStamp)
 

Description:
This callback will be called when the client receives a page message from another player
Related Function:
FriendsSend_PagePlayer()
Parameters:
szUsername the username of the sender
szMessage Message
szTimeStamp The server timestamp of when the page message was sent

typedef GSvoid( * CBFriendsRcv_PagePlayer)(GSubyte ubType, GSint iReason, GSchar* szUsername)
 

Description:
This callback will be called when the client receives response from the router after sending a page to another player
Related Function:
FriendsSend_PagePlayer()
Errors:
ERRORROUTER_UNKNOWNERROR: The page message was not sent. ERRORFRIENDS_PLAYERSTATUSCOREONLINE: The player can't receive page messages. ERRORFRIENDS_PLAYERIGNORE: The player has ignored the sender
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL
szUsername The username of the recipient

typedef GSvoid( * CBFriendsRcv_PeerMsg)(GSchar* szUsername, GSvoid* p_Buffer, GSuint uiLength)
 

Description:
This callback will be called when the client receives a peer message from another player
Related Function:
FriendsSend_PeerPlayer()
Parameters:
szUsername Username of the sender
p_Buffer Data buffer
uiLength Length of the buffer

typedef GSvoid( * CBFriendsRcv_PeerPlayer)(GSubyte ubType, GSint iReason, GSchar* szUsername)
 

Description:
This callback will be called when the client receives response from the router after sending a peer player message
Related Function:
FriendsSend_PeerPlayer()
Errors:
ERRORFRIENDS_PLAYERSTATUSCOREONLINE: The player can't receive peer messages. ERRORROUTER_CLIENTINCOMPATIBLE: The other player doesn't have the same client version as you. ERRORFRIENDS_PLAYERNOTONLINE: The player is not online. ERRORFRIENDS_PLAYERIGNORE: The player has ignored the sender
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL
szUsername Username of the receiver of the message

typedef GSvoid( * CBFriendsRcv_ScoreCard)(GSubyte ubType, GSint iReason,GSchar* szUsername,GSchar* szGame, GSchar* szScore)
 

Description:
DEPRECATED: This callback has been replaced by the Ladder Query Service
Related Function:
FriendsSend_GetPlayerScores()
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL
szUsername the username of the player
szGame Game name (ugly)
szScore Scoree of the player

typedef GSvoid( * CBFriendsRcv_SearchPlayer)(GSubyte ubType, GSint iReason,GSchar* szUsername, GSint iStatus, GSchar *szGameName)
 

Description:
This callback will be called when the client receives response from the router after calling for a search of all the player that match a pattern. For each player found, this will be called.
Related Function:
FriendsSend_SearchPlayer()
Errors:
ERRORFRIENDS_FRIENDNOTEXIST: No more players found.
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL
szUsername Username of the player that was found
iStatus Status of the player that was found
szGameName The GameName when the status is PLAYERINLOBBY, PLAYERINROOMOPEN,PLAYERINROOMCLOSE can be up to GAMELENGTH*4 in size

typedef GSvoid( * CBFriendsRcv_StatusChange)(GSubyte ubType, GSint iReason)
 

Description:
This callback will be called when the client receives response from the router after the player as changed his status
Related Function:
FriendsSend_StatusChange()
Parameters:
ubType The status of the message received back (GSSUCCESS or GSFAIL)
iReason The reason of failure if ubType is GSFAIL

typedef GSvoid( * CBFriendsRcv_UnignorePlayer)( GSRESULT rCode, const GSchar * szPlayer )
 

Description:
This callback will be called with the results of a previous unignore player request.

Related function : FriendsSend_UnignorePlayer()

Parameters:
szPlayer The ubi.com username of the player that was removed from the ignore-list
rCode Result code of the request. Possible values are:
  • GSS_OK
    There was no error
  • GSE_DBFAILURE
    An error occured on the DB while processing the request.
  • GSE_FAIL
    An unsuspected error occured most likely due to a bug on ubi.com

typedef GSvoid( * CBFriendsRcv_UpdateFriend)(GSchar* szUsername, GSint iStatus, GSchar* szGroup, GSint iMood, GSint iOptions, GSchar *szGameName)
 

Description:
This callback will be called when the client receives information about a friend that is in his friend list. This will be called on friend service loging and each time a friend is added to the friend list.
Related Function:
FriendsSend_ChangeFriend() FriendsSend_Login()
Parameters:
szUsername The username of the friend
iStatus Current status of the friend
szGroup Group of the friend
iMood Current mood of the friend
iOptions Friend options
szGameName The GameName when the status is PLAYERINLOBBY, PLAYERINROOMOPEN,PLAYERINROOMCLOSE can be up to GAMELENGTH*4 in size.


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