123
This commit is contained in:
@@ -0,0 +1,169 @@
|
||||
#ifndef _GSCLIENCLASS_H_
|
||||
#define _GSCLIENCLASS_H_
|
||||
|
||||
#include "GSErrors.h"
|
||||
#include "GSLoginCB.h"
|
||||
#include "GSFriendsCB.h"
|
||||
#include "GSLobbyCB.h"
|
||||
#include "GSPersistentCB.h"
|
||||
#include "GSLadderQueryCB.h"
|
||||
#include "GSRemoteAlgorithmCB.h"
|
||||
#include "LadderDefines.h"
|
||||
#include "RemoteAlgorithmDefines.h"
|
||||
|
||||
class CGLClientLIB;
|
||||
|
||||
class clGLClient : public clLoginCallbacks, public clFriendsCallbacks,
|
||||
public clLobbyCallbacks, public clPersistentCallbacks,
|
||||
public clLadderQueryCallbacks
|
||||
{
|
||||
public:
|
||||
clGLClient();
|
||||
virtual ~clGLClient();
|
||||
|
||||
GSbool GL_AddRouterPing(GSint lID, GSchar *szIPAddress, GSint lPort);
|
||||
GSbool GL_GetFirstPing(GSint *plID);
|
||||
GSbool GL_ClearRouterPing();
|
||||
|
||||
//Login Messages
|
||||
GSbool Login_Engine(GSuint uiMaxPostingDelay = 500, GSuint uiMaxsOperationalDelay = 800);
|
||||
GSbool LoginSend_Connect(const GSchar* szAddress, GSushort lPort);
|
||||
GSbool LoginSend_Disconnect();
|
||||
GSbool LoginSend_LoginRouter(const GSchar* szAlias, const GSchar* szPassword,
|
||||
const GSchar* szVersion, GSbool bPublicIP = GS_TRUE);
|
||||
GSbool LoginSend_LoginWaitModule(const GSchar* szAlias);
|
||||
GSbool LoginSend_JoinWaitModule();
|
||||
GSbool LoginSend_PlayerInfo(const GSchar* szAlias);
|
||||
GSbool LoginSend_Sleep();
|
||||
GSbool LoginSend_WakeUp();
|
||||
GSbool LoginSend_ModifyAccount(const GSchar* szPassword, const GSchar* szFirstName,
|
||||
const GSchar* szLastName, const GSchar* szEmail, const GSchar* szCountry);
|
||||
GSbool LoginSend_CreateAccount(const GSchar* szVersion, const GSchar* szNickName, const GSchar* szPassword, const GSchar* szFirstName,
|
||||
const GSchar* szLastName, const GSchar* szEmail, const GSchar* szCountry);
|
||||
GSbool LoginSend_RequestMOTD(const GSchar *szLanguage);
|
||||
|
||||
//Friends Messages
|
||||
GSbool Friends_Engine(GSuint uiMaxPostingDelay = 500, GSuint uiMaxsOperationalDelay = 800);
|
||||
GSbool FriendsSend_Connect();
|
||||
GSbool FriendsSend_Disconnect();
|
||||
GSbool FriendsSend_Login(GSint lStatus = 0, GSint lMood = 0);
|
||||
GSbool FriendsSend_AddFriend(const GSchar* szFriend, const GSchar* szGroup, GSint lOptions);
|
||||
GSbool FriendsSend_DelFriend (const GSchar* szFriend);
|
||||
GSbool FriendsSend_FriendList();
|
||||
|
||||
GSRESULT FriendsSend_IgnorePlayer( const GSchar * szPlayer );
|
||||
GSRESULT FriendsSend_UnignorePlayer( const GSchar * szPlayer);
|
||||
GSRESULT FriendsSend_ListIgnoredPlayers();
|
||||
|
||||
GSbool FriendsSend_PagePlayer(const GSchar* pszAlias, const GSchar* szMessage);
|
||||
GSbool FriendsSend_PeerPlayer(const GSchar* pszAlias, GSvoid *p_Buffer, GSuint uiLength);
|
||||
GSbool FriendsSend_StatusChange(GSint lStatus, GSint lMood);
|
||||
GSbool FriendsSend_ChangeFriend(const GSchar* szFriend, const GSchar* szGroup, GSint lOptions);
|
||||
GSbool FriendsSend_SearchPlayer(const GSchar* pszAlias, const GSchar* pszSurName, const GSchar* pszFirstName, const GSchar* pszCountry, const GSchar* pszEmail, GSint lSex, const GSchar* pszGame);
|
||||
GSbool FriendsSend_GetPlayerScores(const GSchar* pszAlias);
|
||||
|
||||
//Lobby messages
|
||||
GSbool Lobby_Engine(GSuint uiMaxPostingDelay = 500, GSuint uiMaxsOperationalDelay = 800);
|
||||
GSbool LobbySend_Connect();
|
||||
GSbool LobbySend_Login(const GSchar* szGames, GSbool bPublicIP = GS_TRUE, GSushort usPlayerStatus = 0 );
|
||||
GSbool LobbySend_Disconnect(GSint iLobbyServerID);
|
||||
GSbool LobbySend_DisconnectAll();
|
||||
|
||||
GSbool LobbySend_CreateRoom(GSint iParentGroupID, GSint iLobbyServerID, const GSchar *szRoomName,
|
||||
const GSchar *szGames, GSushort usRoomType, GSushort usMaxPlayers, GSushort usMaxVisitors,
|
||||
const GSvoid *vpData, GSint iSize, const GSvoid* vpAltGroupInfo, GSint iAltGroupInfoSize,
|
||||
const GSchar *szPassword, const GSchar *szGameVersion, const GSchar *szGSVersion);
|
||||
|
||||
GSbool LobbySend_JoinLobby(GSint iGroupID, GSint iLobbyServerID,
|
||||
const GSchar *szPassword, GSint iConfig = 0);
|
||||
GSbool LobbySend_JoinRoom(GSint iGroupID, GSint iLobbyServerID, const GSchar *szPassword,
|
||||
GSbool bVisitor, const GSchar *szVersion, GSint iConfig = 0);
|
||||
GSbool LobbySend_LeaveGroup(GSint iGroupID, GSint iLobbyServerID);
|
||||
|
||||
GSbool LobbySend_GetGroupInfo(GSint iGroupID, GSint iLobbyServerID, GSint iconfig);
|
||||
GSbool LobbySend_GetAlternateGroupInfo(GSint iGroupID, GSint iLobbyServerID );
|
||||
|
||||
GSbool LobbySend_InitMatchResults(GSuint uiMatchID);
|
||||
GSbool LobbySend_SetMatchResult(GSchar *szAlias, GSuint uiFieldID, GSint iFieldValue);
|
||||
GSbool LobbySend_SubmitMatchResult(GSint iGroupID, GSint iLobbyServerID);
|
||||
GSbool LobbySend_ClearMatchResult();
|
||||
|
||||
GSbool LobbySend_StartMatch(GSint iGroupID, GSint iLobbyServerID, GSuint uiMode = 0 );
|
||||
GSbool LobbySend_MatchFinish(GSint iGroupID, GSint iLobbyServerID);
|
||||
GSbool LobbySend_PlayerMatchStarted(GSint iGroupID, GSint iLobbyServerID);
|
||||
GSbool LobbySend_PlayerMatchFinished(GSint iGroupID, GSint iLobbyServerID);
|
||||
|
||||
GSbool LobbySend_NewMaster(GSint iGroupID, GSint iLobbyServerID, GSchar *szAlias);
|
||||
GSbool LobbySend_PlayerKick(GSint iGroupID, GSint iLobbyServerID, GSchar *szAlias, GSchar *szReason);
|
||||
GSbool LobbySend_GetParentGroupID(GSint iGroupID, GSint iLobbyServerID);
|
||||
GSbool LobbySend_UpdateRoomConfig(GSint iGroupID, GSint iLobbyServerID, GSbyte bDedicatedServer,
|
||||
GSbyte bOpen, GSbyte bScore_Submission, GSint iMaxPlayers,
|
||||
GSint iMaxVisitors, const GSchar* szPassword, const GSvoid* vpData,
|
||||
GSint iSize, const GSvoid* vpAltGroupInfo, GSint iGroupInfoSize );
|
||||
|
||||
GSbool LobbySend_GameStart(GSint iGroupID, GSint iLobbyServerID);
|
||||
GSbool LobbySend_GameReady(GSint iGroupID, GSint iLobbyServerID, GSvoid* vpGameData, GSint iSize,
|
||||
GSushort usPort = 0, GSchar *szIPAddress = 0);
|
||||
GSbool LobbySend_GameFinish(GSint iGroupID, GSint iLobbyServerID);
|
||||
GSbool LobbySend_GameConnected(GSint iGroupID, GSint iLobbyServerID);
|
||||
|
||||
GSbool LobbySend_UpdateGameInfo(GSint iGroupID, GSint iLobbyServerID, GSvoid* vpGameData, GSint iSize,
|
||||
GSushort usPort = 0, GSchar *szIPAddress = 0);
|
||||
GSbool LobbySend_PlayerBan(GSint iGroupID, GSint iLobbyServerID, GSchar *szAlias, GSchar *szReason);
|
||||
GSbool LobbySend_PlayerUnBan(GSint iGroupID, GSint iLobbyServerID, GSchar *szAlias);
|
||||
GSbool LobbySend_GetPlayerBannedList(GSint iGroupID, GSint iLobbyServerID);
|
||||
GSbool LobbySend_SetPlayerInfo(GSvoid *vpPlayerData, GSint iPlayerDataSize);
|
||||
GSbool LobbySend_GetPlayerGroups(GSchar *szAlias);
|
||||
GSbool LobbySend_ChangeRequestedLobbies(const GSchar* szGames);
|
||||
|
||||
GSbool PS_Engine(GSuint uiMaxPostingDelay = 500, GSuint uiMaxsOperationalDelay = 800);
|
||||
GSbool PSSend_Login();
|
||||
GSbool PSSend_Disconnect();
|
||||
GSuint PSSend_GetPrivateData(const GSchar *szGame, GSint iEventID,
|
||||
GSint iRecordID);
|
||||
GSuint PSSend_SetPrivateData(const GSchar *szGame, GSint iEventID,
|
||||
GSint iRecordID, const GSvoid *vpData, GSint iSize);
|
||||
GSuint PSSend_GetPublicData(const GSchar *szGame, GSint iEventID,
|
||||
GSint iRecordID, const GSchar *szPlayerAlias = 0);
|
||||
GSuint PSSend_SetPublicData(const GSchar *szGame, GSint iEventID,
|
||||
GSint iRecordID, const GSvoid *vpData, GSint iSize);
|
||||
|
||||
GSbool LadderQuery_Initialize(GSchar *szLocale);
|
||||
GSbool LadderQuery_Uninitialize();
|
||||
GSbool LadderQuery_Engine(GSuint uiMaxPostingDelay = 500,GSuint uiMaxsOperationalDelay = 800);
|
||||
GSuint LadderQuery_SendRequest();
|
||||
|
||||
GSbool LadderQuery_CreateRequest(GSchar *szGameName, GSuint uiEvent = 0, GSuint uiMode = 0);
|
||||
GSbool LadderQuery_RequestPivotUser(const GSchar *pszEntry, GSuint uiNumberOfEntries);
|
||||
GSbool LadderQuery_RequestPivotRow(GSuint uiEntry, GSuint uiNumberOfEntries);
|
||||
GSbool LadderQuery_RequestSet(const GSchar *pszEntries[], GSuint uiNumberOfEntries);
|
||||
GSbool LadderQuery_RequestOrderedList(GSuint uiFirstEntry, GSuint uiNumberOfEntries);
|
||||
|
||||
GSbool LadderQuery_AddSortConstraint(const GSchar *pszField, GSbool bSortDirection);
|
||||
GSbool LadderQuery_AddFilterConstraint(const LADDER_FILTER *pLadderFilter[], GSuint uiListOfFilters);
|
||||
GSbool LadderQuery_AddDisplayConstraint(const GSchar *pszFields[], GSuint uiNumberOfFields);
|
||||
|
||||
GSbool LadderQuery_GetResultSearchCount(GSuint uiRequestID, GSuint & uiCount);
|
||||
GSbool LadderQuery_GetResultEntryCount(GSuint uiRequestID, GSuint & uiCount);
|
||||
GSbool LadderQuery_GetResultFieldCaption(GSuint uiRequestID, const GSchar *pszField, GSchar * pszCaption);
|
||||
GSbool LadderQuery_StartResultEntryEnumeration(GSuint uiRequestID, GSuint uiStartEntry);
|
||||
GSbool LadderQuery_NextResultEntry(GSuint uiRequestID);
|
||||
GSbool LadderQuery_GetCurrentEntryField(GSuint uiRequestID, const GSchar *pszField, GSint & iValue);
|
||||
GSbool LadderQuery_GetCurrentEntryFieldAsString(GSuint uiRequestID, const GSchar *pszField, GSchar * pszValue);
|
||||
GSvoid LadderQuery_ReleaseResult(GSuint uiRequestID);
|
||||
|
||||
GSRESULT RemoteAlgorithm_Initialise(const GSchar * szGameName);
|
||||
GSRESULT RemoteAlgorithm_Uninitialise();
|
||||
GSRESULT RemoteAlgorithm_Engine(GSuint uiMaxPostingDelay = 500,
|
||||
GSuint uiMaxsOperationalDelay = 800);
|
||||
GSRESULT RemoteAlgorithm_Execute(GSuint uiAlgoId,
|
||||
RAE_VALUE * pInput, GSuint uiNumInput,
|
||||
RemoteAlgorithm_OutputCB fOutput,
|
||||
GSvoid * pData, GSuint & uiRequest);
|
||||
|
||||
private:
|
||||
CGLClientLIB *m_pClientLIB;
|
||||
|
||||
};
|
||||
|
||||
#endif //_GSCLIENCLASS_H_
|
||||
4512
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/GSClientLibrary.h
Normal file
4512
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/GSClientLibrary.h
Normal file
File diff suppressed because it is too large
Load Diff
438
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/GSFriendsCB.h
Normal file
438
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/GSFriendsCB.h
Normal file
@@ -0,0 +1,438 @@
|
||||
//****************************************************************************
|
||||
//* Author: Guillaume Plante <gsdevteam@ubisoft.com>
|
||||
//* Date: 5/16/01 9:43:49 AM
|
||||
/*! \file GSFriendsCB.h
|
||||
* \brief Callback functions for the <b><i>friends service</i></b>.
|
||||
*
|
||||
* This file contains all callback functions declaration for the friend
|
||||
* service.
|
||||
*/
|
||||
//****************************************************************************
|
||||
|
||||
|
||||
#ifndef _GSFRIENDSCB_H_
|
||||
#define _GSFRIENDSCB_H_
|
||||
|
||||
#include "GSTypes.h"
|
||||
#include "GSErrors.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
class clFriendsCallbacks
|
||||
{
|
||||
public:
|
||||
virtual GSvoid FriendsRcv_LoginResult(GSubyte ubType, GSint iReason) = 0;
|
||||
virtual GSvoid FriendsRcv_AddFriend(GSubyte ubType, GSint iReason,
|
||||
GSchar* szFriend) = 0;
|
||||
virtual GSvoid FriendsRcv_DelFriend(GSubyte ubType, GSint iReason,
|
||||
GSchar* szFriend) = 0;
|
||||
virtual GSvoid FriendsRcv_IgnorePlayer( GSRESULT rCode,
|
||||
const GSchar * szPlayer ) = 0;
|
||||
virtual GSvoid FriendsRcv_UnignorePlayer( GSRESULT rCode,
|
||||
const GSchar * szPlayer ) = 0;
|
||||
virtual GSvoid FriendsRcv_ListIgnoredPlayers( GSRESULT rCode ) = 0;
|
||||
virtual GSvoid FriendsRcv_IgnoredPlayer( const GSchar * szPlayer ) = 0;
|
||||
virtual GSvoid FriendsRcv_Page(GSchar* szUsername, GSchar* szMessage,
|
||||
GSchar* szTimeStamp) = 0;
|
||||
virtual GSvoid FriendsRcv_PagePlayer(GSubyte ubType, GSint iReason,
|
||||
GSchar* szUsername) = 0;
|
||||
virtual GSvoid FriendsRcv_PeerMsg(GSchar* szUsername, GSvoid* p_Buffer,
|
||||
GSuint uiLength) = 0;
|
||||
virtual GSvoid FriendsRcv_PeerPlayer(GSubyte ubType, GSint iReason,
|
||||
GSchar* szUsername) = 0;
|
||||
virtual GSvoid FriendsRcv_ChangeFriend(GSubyte ubType, GSint iReason) = 0;
|
||||
virtual GSvoid FriendsRcv_StatusChange(GSubyte ubType, GSint iReason) = 0;
|
||||
virtual GSvoid FriendsRcv_UpdateFriend(GSchar* szUsername, GSint iReason,
|
||||
GSchar* szGroup, GSint iMood, GSint iOptions, GSchar *szGameName) = 0;
|
||||
virtual GSvoid FriendsRcv_SearchPlayer(GSubyte ubType, GSint iReason,
|
||||
GSchar* szUsername, GSint iStatus, GSchar *szGameName) = 0;
|
||||
virtual GSvoid FriendsRcv_ScoreCard(GSubyte ubType, GSint iReason,
|
||||
GSchar* szPlayer,GSchar* szGame, GSchar* szScore) = 0;
|
||||
};
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
/*! @addtogroup group_FriendCB
|
||||
@{
|
||||
*/
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_LoginResult
|
||||
/*!
|
||||
\brief Receive friends service login result
|
||||
\par Description:
|
||||
This callback will be called when the client receives response from the router
|
||||
after asking to log into the friend service
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_Login()
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_LoginResult)(GSubyte ubType,
|
||||
GSint iReason);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_AddFriend
|
||||
/*!
|
||||
\brief Receive the status of the friend addition request
|
||||
\par Description:
|
||||
This callback will be called when the client receives response from the router
|
||||
after adding a friend to his friend list
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_AddFriend()
|
||||
|
||||
\par Errors:
|
||||
ERRORROUTER_DBPROBLEM: There is a problem with the database<br>
|
||||
ERRORFRIENDS_FRIENDNOTEXIST: The username didn't exist.
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
\param szFriend The alias of the newly added friend
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_AddFriend)(GSubyte ubType,
|
||||
GSint iReason, GSchar* szUsername);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_DelFriend
|
||||
/*!
|
||||
\brief Receive the status of the remove friend request
|
||||
\par Description:
|
||||
This callback will be called when the client receives response from the router
|
||||
after removing a friend from the friend list.
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_DelFriend()
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
\param szUsername The alias of the newly deleted friend
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_DelFriend)(GSubyte ubType,
|
||||
GSint iReason, GSchar* szUsername);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_IgnorePlayer
|
||||
|
||||
/*!
|
||||
\brief Result of an ignore player request
|
||||
\par Description:
|
||||
This callback will be called with the results of a previous ignore
|
||||
player request.
|
||||
|
||||
<BR>
|
||||
Related function : FriendsSend_IgnorePlayer()
|
||||
|
||||
\param szPlayer The ubi.com username of the player that was ignored
|
||||
\param rCode Result code of the request. Possible values are:
|
||||
<UL>
|
||||
<LI>GSS_OK<BR>
|
||||
There was no error
|
||||
<LI>GSE_INVALIDUSER<BR>
|
||||
The username to ignore is not a valid ubi.com user.
|
||||
<LI>GSE_DBFAILURE<BR>
|
||||
An error occured on the DB while processing
|
||||
the request.
|
||||
<LI>GSE_FAIL<BR>
|
||||
An unsuspected error occured most likely due to a bug
|
||||
on ubi.com
|
||||
</UL>
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_IgnorePlayer)( GSRESULT rCode,
|
||||
const GSchar * szPlayer );
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_UnignorePlayer
|
||||
|
||||
/*!
|
||||
\brief Result of an unignore player request
|
||||
\par Description:
|
||||
This callback will be called with the results of a previous unignore
|
||||
player request.
|
||||
|
||||
<BR>
|
||||
Related function : FriendsSend_UnignorePlayer()
|
||||
|
||||
\param szPlayer The ubi.com username of the player that was removed from
|
||||
the ignore-list
|
||||
\param rCode Result code of the request. Possible values are:
|
||||
<UL>
|
||||
<LI>GSS_OK<BR>
|
||||
There was no error
|
||||
<LI>GSE_DBFAILURE<BR>
|
||||
An error occured on the DB while processing
|
||||
the request.
|
||||
<LI>GSE_FAIL<BR>
|
||||
An unsuspected error occured most likely due to a bug
|
||||
on ubi.com
|
||||
</UL>
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_UnignorePlayer)(
|
||||
GSRESULT rCode, const GSchar * szPlayer );
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_ListIgnoredPlayers
|
||||
|
||||
/*!
|
||||
\brief Result of a request to get the ignore-list
|
||||
\par Description:
|
||||
This callback will be called with the results of a previous ignore-list
|
||||
retrieval request.
|
||||
|
||||
<BR>
|
||||
Related function : FriendsSend_ListIgnoredPlayers()
|
||||
|
||||
\param rCode Result code of the request. Possible values are:
|
||||
<UL>
|
||||
<LI>GSS_OK<BR>
|
||||
There was no error
|
||||
<LI>GSE_DBFAILURE<BR>
|
||||
An error occured on the DB while processing
|
||||
the request.
|
||||
<LI>GSE_FAIL<BR>
|
||||
An unsuspected error occured most likely due to a bug
|
||||
on ubi.com
|
||||
</UL>
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_ListIgnoredPlayers)( GSRESULT rCode );
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_IgnoredPlayer
|
||||
|
||||
/*!
|
||||
\brief Enumeration of the ignored players
|
||||
\par 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.
|
||||
|
||||
<BR>
|
||||
Related function : FriendsSend_ListIgnoredPlayers()
|
||||
|
||||
\param szPlayer The ubi.com username of a ignored player
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_IgnoredPlayer)(
|
||||
const GSchar * szPlayer );
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_Page
|
||||
/*!
|
||||
\brief Receive a page message
|
||||
\par Description:
|
||||
This callback will be called when the client receives a page message
|
||||
from another player
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_PagePlayer()
|
||||
|
||||
\param szUsername the username of the sender
|
||||
\param szMessage Message
|
||||
\param szTimeStamp The server timestamp of when the page message was sent
|
||||
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_Page)(GSchar* szUsername,
|
||||
GSchar* pszMessage, GSchar* szTimeStamp);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_PagePlayer
|
||||
/*!
|
||||
\brief Receive the status of send page request
|
||||
\par Description:
|
||||
This callback will be called when the client receives response from the router
|
||||
after sending a page to another player
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_PagePlayer()
|
||||
|
||||
\par 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
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
\param szUsername The username of the recipient
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_PagePlayer)(GSubyte ubType,
|
||||
GSint iReason, GSchar* szUsername);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_PeerMsg
|
||||
/*!
|
||||
\brief Receive a peer message
|
||||
\par Description:
|
||||
This callback will be called when the client receives a peer message from
|
||||
another player
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_PeerPlayer()
|
||||
|
||||
\param szUsername Username of the sender
|
||||
\param p_Buffer Data buffer
|
||||
\param uiLength Length of the buffer
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_PeerMsg)(GSchar* szUsername,
|
||||
GSvoid* p_Buffer, GSuint uiLength);
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_PeerPlayer
|
||||
/*!
|
||||
\brief Receive the status of the send peer message request
|
||||
\par Description:
|
||||
This callback will be called when the client receives response from the router
|
||||
after sending a peer player message
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_PeerPlayer()
|
||||
|
||||
\par 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
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
\param szUsername Username of the receiver of the message
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_PeerPlayer)(GSubyte ubType,
|
||||
GSint iReason, GSchar* szUsername);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_ChangeFriend
|
||||
/*!
|
||||
\brief Receive the status of change friend request
|
||||
\par Description:
|
||||
This callback will be called when the client receives response from the
|
||||
router after sending a change friend request.
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_StatusChange()
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_ChangeFriend)(GSubyte ubType,
|
||||
GSint iReason);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_StatusChange
|
||||
/*!
|
||||
\brief Receive the status of a change status request
|
||||
\par Description:
|
||||
This callback will be called when the client receives response from the router
|
||||
after the player as changed his status
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_StatusChange()
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_StatusChange)(GSubyte ubType,
|
||||
GSint iReason);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_UpdateFriend
|
||||
/*!
|
||||
\brief Receive information about a friend
|
||||
\par 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.
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_ChangeFriend()
|
||||
FriendsSend_Login()
|
||||
|
||||
\param szUsername The username of the friend
|
||||
\param iStatus Current status of the friend
|
||||
\param szGroup Group of the friend
|
||||
\param iMood Current mood of the friend
|
||||
\param iOptions Friend options
|
||||
\param szGameName The GameName when the status is PLAYERINLOBBY,
|
||||
PLAYERINROOMOPEN,PLAYERINROOMCLOSE can be up to GAMELENGTH*4 in size.
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_UpdateFriend)(GSchar* szUsername,
|
||||
GSint iStatus, GSchar* szGroup, GSint iMood, GSint iOptions,
|
||||
GSchar *szGameName);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_SearchPlayer
|
||||
/*!
|
||||
\brief Receive the status of search player request
|
||||
\par 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.
|
||||
|
||||
\par Related Function:
|
||||
FriendsSend_SearchPlayer()
|
||||
|
||||
\par Errors:
|
||||
ERRORFRIENDS_FRIENDNOTEXIST: No more players found.
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
\param szUsername Username of the player that was found
|
||||
\param iStatus Status of the player that was found
|
||||
\param szGameName The GameName when the status is PLAYERINLOBBY,
|
||||
PLAYERINROOMOPEN,PLAYERINROOMCLOSE can be up to GAMELENGTH*4 in size
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_SearchPlayer)(GSubyte ubType,
|
||||
GSint iReason,GSchar* szUsername, GSint iStatus, GSchar *szGameName);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBFriendsRcv_ScoreCard
|
||||
/*!
|
||||
\brief Receive score card information for a player
|
||||
\par Description:
|
||||
DEPRECATED: This callback has been replaced by the Ladder Query Service
|
||||
\par Related Function:
|
||||
FriendsSend_GetPlayerScores()
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
\param szUsername the username of the player
|
||||
\param szGame Game name (ugly)
|
||||
\param szScore Scoree of the player
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBFriendsRcv_ScoreCard)(GSubyte ubType,
|
||||
GSint iReason,GSchar* szUsername,GSchar* szGame, GSchar* szScore);
|
||||
|
||||
/*! @} end of group_FriendCB */
|
||||
|
||||
|
||||
|
||||
#endif //_GSFRIENDSCB_H_
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
//****************************************************************************
|
||||
//* Author: Guillaume Plante <gsdevelopers@ubisoft.com>
|
||||
//* Date: 2003-07-14
|
||||
/*! \file GSLadderQueryCB.h
|
||||
* \brief Callback functions for the <b><i>ladder query service</i></b>.
|
||||
*
|
||||
* This file contains all callback functions declaration for the ladder query
|
||||
* service.
|
||||
*/
|
||||
//****************************************************************************
|
||||
|
||||
#ifndef __GSLADDERQUERYCB_H__
|
||||
#define __GSLADDERQUERYCB_H__
|
||||
|
||||
#include "GSTypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
class clLadderQueryCallbacks
|
||||
{
|
||||
public:
|
||||
virtual GSvoid LadderQueryRcv_RequestReply(GSubyte ucType, GSint iReason, GSuint uiRequestId) = 0;
|
||||
};
|
||||
|
||||
#endif //__cplusplus
|
||||
|
||||
/*! @addtogroup group_LadderQuery
|
||||
|
||||
@{
|
||||
*/
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLadderQueryRcv_RequestReply
|
||||
|
||||
/*!
|
||||
\brief Receive the result of a ladder query to the ubi.com servers.
|
||||
\par Description:
|
||||
This callback will be called when the client receive a response from the ubi.com data provider
|
||||
after asking a ladder data request.
|
||||
\par Related functions
|
||||
LadderQuery_SendRequest()
|
||||
|
||||
\param ucType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ucType is GSFAIL
|
||||
\param uiRequestId The id of the request from wich we received results
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLadderQueryRcv_RequestReply)(GSubyte ucType, GSint iReason, GSuint uiRequestId);
|
||||
|
||||
|
||||
/*! @} end of group_LadderQuery */
|
||||
|
||||
#endif //__GSLADDERQUERYCB_H__
|
||||
1248
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/GSLobbyCB.h
Normal file
1248
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/GSLobbyCB.h
Normal file
File diff suppressed because it is too large
Load Diff
286
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/GSLoginCB.h
Normal file
286
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/GSLoginCB.h
Normal file
@@ -0,0 +1,286 @@
|
||||
//****************************************************************************
|
||||
//* Author: Guillaume Plante <gsdevteam@ubisoft.com>
|
||||
//* Date: 5/16/01 9:20:13 AM
|
||||
/*! \file GSLoginCB.h
|
||||
* \brief Callback functions for the Login service
|
||||
*
|
||||
* This file contains all callback functions declaration for the<b><i>login
|
||||
* service</i></b>.
|
||||
*/
|
||||
//****************************************************************************
|
||||
|
||||
|
||||
#ifndef __GSLOGINCB_H_
|
||||
#define __GSLOGINCB_H_
|
||||
|
||||
#include "GSTypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
class clLoginCallbacks
|
||||
{
|
||||
public:
|
||||
virtual GSvoid LoginRcv_PlayerInfo(GSubyte ubType, GSchar * pszNickName,
|
||||
GSchar * pszSurName, GSchar * pszFirstName, GSchar * pszCountry,
|
||||
GSchar * pszEmail, GSchar * szIRCID, GSchar * szIPAddress,
|
||||
GSint iReason ) = 0;
|
||||
virtual GSvoid LoginRcv_JoinWaitModuleResult(GSubyte ubType,
|
||||
GSchar * pszAddress, GSushort lPort, GSint iReason) = 0;
|
||||
virtual GSvoid LoginRcv_LoginRouterResult(GSubyte ubType, GSint iReason) = 0;
|
||||
virtual GSvoid LoginRcv_LoginWaitModuleResult(GSubyte ubType,
|
||||
GSint iReason) = 0;
|
||||
virtual GSvoid LoginRcv_SystemPage(GSint lSubType, GSchar * pszText) = 0;
|
||||
virtual GSvoid LoginRcv_LoginDisconnection() = 0;
|
||||
virtual GSvoid LoginRcv_AccountCreationResult(GSubyte ubType,
|
||||
GSint iReason) = 0;
|
||||
virtual GSvoid LoginRcv_ModifyUserResult(GSubyte ubType, GSint iReason) = 0;
|
||||
virtual GSvoid LoginRcv_RequestMOTD(GSubyte ubType, GSchar *szUbiMOTD,
|
||||
GSchar *szGameMOTD, GSint iReason)=0;
|
||||
};
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
/*! @addtogroup group_LoginCB
|
||||
@{
|
||||
*/
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLoginRcv_PlayerInfo
|
||||
/*!
|
||||
\brief Receive information on a player
|
||||
\par Description:
|
||||
This callback will be called when the client requests information on a player
|
||||
|
||||
\par Related Function:
|
||||
LoginSend_PlayerInfo()
|
||||
|
||||
\par Errors:
|
||||
ERRORROUTER_DBPROBLEM: There is a problem with the database.<br>
|
||||
ERRORROUTER_NOTREGISTERED: The username doesn't exist.<br>
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param szUsername The username of the player in the correct case
|
||||
\param szSurName The last name of a player
|
||||
\param szFirstName The first name of the player
|
||||
\param szCountry The country of the player
|
||||
\param szEmail Email address of the player
|
||||
\param szIRCID Player's IRC ID
|
||||
\param szIPAddress Player's ip address
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_PlayerInfo)(GSubyte ubType,
|
||||
GSchar *szUsername, GSchar *szSurName, GSchar *szFirstName,
|
||||
GSchar *szCountry, GSchar *szEmail,GSchar *szIRCID, GSchar *szIPAddress,
|
||||
GSint iReason);
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLoginRcv_JoinWaitModuleResult
|
||||
/*!
|
||||
\brief Receive status of the join wait module request
|
||||
\par Description:
|
||||
This callback will be called when the client receive a response from the
|
||||
router after asking to join the wait module. The client should then call
|
||||
LoginSend_Connect() with this szAddress and usPort.
|
||||
|
||||
\par Related Function:
|
||||
LoginSend_JoinWaitModule()<br>
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param szAddress IP address of the wait module
|
||||
\param usPort The port of the wait module
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_JoinWaitModuleResult)(GSubyte ubType,
|
||||
GSchar *szAddress, GSushort usPort, GSint iReason);
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLoginRcv_LoginRouterResult
|
||||
|
||||
/*!
|
||||
\brief Receive status of the login request
|
||||
\par Description:
|
||||
This callback will be called when the client receive a response from the
|
||||
router after asking to log into the router. If you reveive a GSSCUCCESS you
|
||||
can then call LoginSend_JoinWaitModule().
|
||||
|
||||
\par Related Function:
|
||||
LoginSend_LoginRouter()<br>
|
||||
|
||||
\par Errors:
|
||||
ERRORSECURE_DATABASEFAILED: There is a problem with the Database.<br>
|
||||
ERRORROUTER_NOTDISCONNECTED: The player is already logged in.<br>
|
||||
ERRORSECURE_INVALIDPASSWORD: The password is not correct.<br>
|
||||
ERRORSECURE_LOCKEDACCOUNT: The account has been locked.<br>
|
||||
ERRORSECURE_INVALIDACCOUNT: The username doesn't exist.<br>
|
||||
ERRORSECURE_BANNEDACCOUNT: The account has been banned.<br>
|
||||
ERRORSECURE_BLOCKEDACCOUNT: The account has been blocked.<br>
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_LoginRouterResult)(GSubyte ubType,
|
||||
GSint iReason);
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLoginRcv_LoginWaitModuleResult
|
||||
|
||||
/*!
|
||||
\brief Receive status of the login wait module request
|
||||
\par Description:
|
||||
This callback will be called when the client receive a response from the
|
||||
router after asking to login to the wait module. After receving this callback
|
||||
you will be fully connected to the Game Service. It's recommened that the
|
||||
client now call LoginSend_PlayerInfo() with the players username to get his
|
||||
szIRCID and the correct case of his username.
|
||||
|
||||
\par Related Function:
|
||||
LoginSend_LoginWaitModule()<br>
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_LoginWaitModuleResult)(GSubyte ubType,
|
||||
GSint iReason);
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLoginRcv_SystemPage
|
||||
|
||||
/*!
|
||||
\brief Received a system page
|
||||
\par Description:
|
||||
This callback will be called when the client received a system
|
||||
page wich is usually called by a administrator or when another
|
||||
player adds the client to his friend list.
|
||||
|
||||
\param iSubType The type of message. The possibilities are:
|
||||
<UL>
|
||||
<LI>ADDEDASFRIEND<BR>
|
||||
The player was added to the friend list of the other
|
||||
player who's name is in the szText parameter
|
||||
<LI>ADDEDASIGNOREE<BR>
|
||||
The player was added to the ignore list of the other
|
||||
player who's name is in the szText parameter
|
||||
<LI>REMOVEDASIGNOREE<BR>
|
||||
The player was removed from the ignore list of the other
|
||||
player who's name is in the szText parameter
|
||||
</UL>
|
||||
\param szText The actual message
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_SystemPage)(GSint iSubType,
|
||||
GSchar *szText);
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLoginRcv_LoginDisconnection
|
||||
|
||||
/*!
|
||||
\brief Disconnection from router
|
||||
\par Description:
|
||||
This callback will be called when the client is disconnected
|
||||
from the router
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_LoginDisconnection)();
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLoginRcv_AccountCreationResult
|
||||
|
||||
/*!
|
||||
\brief Receive the status of the account creation request
|
||||
\par Description:
|
||||
This callback will be called when the client receive a response from the
|
||||
router after sending a account creation request
|
||||
|
||||
\par Related Function:
|
||||
LoginSend_Disconnect()
|
||||
|
||||
\par Errors:
|
||||
ERRORSECURE_USERNAMEEXISTS: The account name already exists.<br>
|
||||
ERRORSECURE_USERNAMEMALFORMED: The account name does not match the format
|
||||
rules <code>^[a-zA-Z][a-zA-Z0-9_\.-]{2,14}$</code>.<br>
|
||||
ERRORSECURE_USERNAMEFORBIDDEN: The account name contains forbidden
|
||||
substrings (e.g. smut)<br>
|
||||
ERRORSECURE_USERNAMERESERVED: The account name is reserved<br>
|
||||
ERRORSECURE_PASSWORDMALFORMED: The password does not match the format
|
||||
rules <code>^.{2,16}$</code>.<br>
|
||||
ERRORSECURE_PASSWORDFORBIDDEN: The password contains the username<br>
|
||||
ERRORSECURE_DATABASEFAILED: There is a problem with the database.<br>
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_AccountCreationResult)(GSubyte ubType,
|
||||
GSint iReason);
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Callback CBLoginRcv_ModifyUserResult
|
||||
|
||||
/*!
|
||||
\brief Receive the status of the user modifycation request
|
||||
\par Description:
|
||||
This callback will be called when the client receive a response from the
|
||||
router after sending a user info modification request
|
||||
|
||||
\par Related Function:
|
||||
LoginSend_ModifyAccount()
|
||||
|
||||
\par Errors:
|
||||
ERRORSECURE_PASSWORDMALFORMED: The password does not match the format
|
||||
rules <code>^.{2,16}$</code>.<br>
|
||||
ERRORSECURE_PASSWORDFORBIDDEN: The password contains the username<br>
|
||||
ERRORSECURE_DATABASEFAILED: There is a problem with the database.<br>
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_ModifyUserResult)(GSubyte ubType,
|
||||
GSint iReason);
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Callback DBLoginRcv_RequestMOTD
|
||||
|
||||
/*!
|
||||
\brief Receive the message of the day
|
||||
\par Description:
|
||||
This callback will be called when the client receives the MOTDs from the
|
||||
server. The messages will never be greater the MOTDLENGTH.
|
||||
|
||||
\par Related function:
|
||||
LoginSend_RequestMOTD()
|
||||
|
||||
\par Errors:
|
||||
ERRORROUTER_DBPROBLEM: There is a problem with the database.<br>
|
||||
|
||||
\param ubType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param szUbiMOTD The message of the day for the Ubi.com Game Service
|
||||
\param szGameMOTD The message of the day for the game.
|
||||
\param iReason The reason for the failure if ubType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBLoginRcv_RequestMOTD)(GSubyte ubType,
|
||||
GSchar *szUbiMOTD, GSchar *szGameMOTD, GSint iReason);
|
||||
|
||||
/*! @} end of group_LoginCB */
|
||||
|
||||
#endif //__GSLOGINCB_H_
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
//****************************************************************************
|
||||
//* Author: Guillaume Plante <gsdevelopers@ubisoft.com>
|
||||
//* Date: 2001-09-20
|
||||
/*! \file GSPersistentCB.h
|
||||
* \brief Callback functions for the <b><i>persistent storage service</i></b>.
|
||||
*
|
||||
* This file contains all callback functions declaration for the persistent
|
||||
* storage service.
|
||||
*/
|
||||
//****************************************************************************
|
||||
|
||||
#ifndef _GSPersistentCB_H_
|
||||
#define _GSPersistentCB_H_
|
||||
|
||||
#include "GSTypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
class clPersistentCallbacks
|
||||
{
|
||||
public:
|
||||
|
||||
virtual GSvoid PSRcv_LoginResult(GSubyte ucType, GSint iReason) = 0;
|
||||
virtual GSvoid PSRcv_Disconnection() = 0;
|
||||
virtual GSvoid PSRcv_GetDataReply(GSubyte ucType, GSint iReason,GSuint iID,
|
||||
GSvoid *pData,GSint iSize) = 0;
|
||||
virtual GSvoid PSRcv_SetDataReply(GSubyte ucType, GSint iReason,
|
||||
GSuint iID) = 0;
|
||||
};
|
||||
|
||||
#endif //__cplusplus
|
||||
|
||||
/*! @addtogroup group_PSCB Persistent
|
||||
@{
|
||||
*/
|
||||
|
||||
//============================================================================
|
||||
// CallBack CBPSRcv_LoginResult
|
||||
|
||||
/*!
|
||||
\brief Receive status of the Persistent data storage login request
|
||||
\par Description:
|
||||
This callback will be called when the client receive a response from the
|
||||
router after asking to join the Persistent storage server
|
||||
\par Related Function:
|
||||
PSSend_Login()
|
||||
|
||||
\param ucType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param lReason The reason of failure if ucType is GSFAIL
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBPSRcv_LoginResult)(GSubyte ucType, GSint iReason);
|
||||
|
||||
//============================================================================
|
||||
// CallBack CBPSRcv_Disconnection
|
||||
/*!
|
||||
\brief Client as been disconnected from the Persistent storage service
|
||||
\par Description:
|
||||
This callback will be called when the client has been disconnected from the
|
||||
Persistent storage service
|
||||
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBPSRcv_Disconnection)();
|
||||
|
||||
|
||||
//============================================================================
|
||||
// CallBack CBPSRcv_SetDataReply
|
||||
|
||||
/*!
|
||||
\brief Proxy reply on client request to set persistent data
|
||||
\par Description:
|
||||
This callback will be called when the client has set data using
|
||||
Persistent storage service
|
||||
|
||||
\param ucType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ucType is GSFAIL
|
||||
\param iID The id of the request
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBPSRcv_SetDataReply)(GSubyte ucType, GSint iReason,
|
||||
GSuint iID);
|
||||
|
||||
//============================================================================
|
||||
// CallBack CBPSRcv_GetDataReply
|
||||
|
||||
/*!
|
||||
\brief Proxy reply on client request to get persistent data
|
||||
\par Description:
|
||||
This callback will be called when the client ask for persistent
|
||||
data using the Persistent storage service
|
||||
|
||||
\param ucType The status of the message received back (GSSUCCESS or GSFAIL)
|
||||
\param iReason The reason of failure if ucType is GSFAIL
|
||||
\param iID The id of the request
|
||||
\param pData Pointer to the data buffer
|
||||
\param iSize Size of the data buffer
|
||||
|
||||
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *CBPSRcv_GetDataReply)(GSubyte ucType, GSint iReason,
|
||||
GSuint iID,GSvoid *pData,GSint iSize);
|
||||
|
||||
#endif //_GSPersistentCB_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
#ifndef __GSREMOTEALGORITHMCB_H__
|
||||
#define __GSREMOTEALGORITHMCB_H__
|
||||
|
||||
// remote algorithm execution service definitions
|
||||
#include "RemoteAlgorithmDefines.h"
|
||||
|
||||
// error code system
|
||||
#include "GSErrors.h"
|
||||
|
||||
/*! @addtogroup group_RAECB
|
||||
@{
|
||||
*/
|
||||
|
||||
//============================================================================
|
||||
// Callback RemoteAlgorithm_OutputCB
|
||||
|
||||
/*!
|
||||
\brief Callback that will receive the output of an algorithm
|
||||
\par Description:
|
||||
This callback will be called with the output of a previously called
|
||||
remote algorithm.
|
||||
<BR>
|
||||
Related function : RemoteAlgorithm_Execute()
|
||||
|
||||
\param pData Custom data passed at the RemoteAlgorithm_Execute()
|
||||
call
|
||||
\param uiRequestId Identifier of the request being replied
|
||||
\param rResult Result code of the execution. Possible values are:
|
||||
<UL>
|
||||
<LI>GSS_OK
|
||||
<BR>There was no error
|
||||
<LI>GSE_DBFAILURE
|
||||
<BR>An error occured on the DB while processing
|
||||
the algorithm. The ubi.com server logs will
|
||||
contain the exact nature of the error.
|
||||
<LI>GSE_UNEXPECTED
|
||||
<BR>This is an internal error meaning that either
|
||||
the request or the reply was in a format that
|
||||
could not be decoded.
|
||||
<LI>GSE_HOSTUNREACHABLE
|
||||
<BR>The remote algorithm execution service is
|
||||
not available.
|
||||
</UL>
|
||||
\param pOutput An array of output values from the algorithm.
|
||||
You do not have ownership of this array. The
|
||||
memory will be freed when the callback function
|
||||
returns.
|
||||
\param uiNumOutput The number of values in the output array
|
||||
*/
|
||||
//============================================================================
|
||||
typedef GSvoid (__stdcall *RemoteAlgorithm_OutputCB)(
|
||||
const GSvoid * pData, GSuint uiRequestId, GSRESULT rResult,
|
||||
const RAE_VALUE * pOutput, GSuint uiNumOutput);
|
||||
|
||||
/*! @} end of group_RAECB */
|
||||
|
||||
#endif // __GSREMOTEALGORITHMCB_H__
|
||||
@@ -0,0 +1,67 @@
|
||||
//****************************************************************************
|
||||
//* Author: Guillaume Plante
|
||||
/*! \file LadderDefines.h
|
||||
* \brief Definitions for the ladder query service
|
||||
*
|
||||
* This file defines global values and structures for the ladder query service.
|
||||
*/
|
||||
//****************************************************************************
|
||||
|
||||
|
||||
#ifndef __LADDERDEFINES_H__
|
||||
#define __LADDERDEFINES_H__
|
||||
|
||||
#include "define.h"
|
||||
#include "GSTypes.h"
|
||||
|
||||
#define LADDER_QUERY_VERSION 1 //!< Version of the ladder query service.
|
||||
|
||||
#define LADDER_NAME_LENGTH 1025 //!< Length of a string representing the ladder name.
|
||||
#define LADDER_FIELDNAME_LENGTH 129 //!< Length of a string representing a field name in the ladder.
|
||||
#define LADDER_FIELDCAPTION_LENGTH 33 //!< Length of a string representing a ladder field name.
|
||||
#define LADDER_FIELDVALUE_LENGTH 129 //!< Length of a string representing a ladder field value.
|
||||
|
||||
/*!
|
||||
\enum E_FILTER_OPERATOR
|
||||
\brief Filter operator enumeration.
|
||||
|
||||
This enumeration contains the valid operators that are used in the LADDER_FILTER structure.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FILTER_EQUAL,
|
||||
FILTER_ABOVE,
|
||||
FILTER_BELOW
|
||||
} E_FILTER_OPERATOR;
|
||||
|
||||
/*!
|
||||
\struct LADDER_FILTER
|
||||
\brief Ladder filter structure.
|
||||
|
||||
This structure defines a ladder filter that can be used with the fonction LadderQuery_AddFilterConstraint() .
|
||||
It is used to filter results based on a numeric value using the operators EQUAL,ABOVE or BELOW defined in the
|
||||
E_FILTER_OPERATOR enumeration.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
GSchar szFieldName[LADDER_FIELDNAME_LENGTH]; //!< Name of the field that need to be compared against reference value.
|
||||
E_FILTER_OPERATOR eOperator; //!< Logical operator to do comparison.
|
||||
GSint iValue; //!< Reference value used to filter.
|
||||
} LADDER_FILTER;
|
||||
|
||||
|
||||
/*!
|
||||
\struct LADDER_ROW
|
||||
\brief Ladder row representation
|
||||
|
||||
This structure defines the representation of a row of ladder values. It is used
|
||||
by the LobbyRcv_MatchFinalResult callback.
|
||||
*/
|
||||
struct LADDER_ROW
|
||||
{
|
||||
GSchar player[NAMELENGTH];
|
||||
GSushort valueCount;
|
||||
GSint * values;
|
||||
};
|
||||
|
||||
#endif //__LADDERDEFINES_H__
|
||||
109
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/LobbyDefines.h
Normal file
109
Ubisoft.com/GSServices/SDKS64/gs-sdk-base/include/LobbyDefines.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/***SDOC*******************************************************************************************
|
||||
* UbiSoft Network Development
|
||||
* ---------------------------
|
||||
*
|
||||
* FILE........: LobbyDefines.h
|
||||
* CREATION....: October 2001
|
||||
* AUTHOR......: GS Dev
|
||||
*
|
||||
* DESCRIPTION.: Miscelleanous definitions for the Lobby server
|
||||
*
|
||||
******************************************************************************************EDOC***/
|
||||
#ifndef __LOBBYDEFINES_H__
|
||||
#define __LOBBYDEFINES_H__
|
||||
|
||||
#include "GSTypes.h"
|
||||
|
||||
|
||||
//-------------------- Group Type ------------------------------
|
||||
// Constant ----> Name in gslobbyserver.conf
|
||||
const GSushort LOBBY = 0; //"LOBBY"
|
||||
const GSushort ROOM_DIRECTPLAY_CLIENTSERVER = 1; //"DIRECTPLAY_CLIENTSERVER"
|
||||
const GSushort ROOM_DIRECTPLAY_P2P = 2; //"DIRECTPLAY_P2P"
|
||||
const GSushort ROOM_HYBRID = 3; //"HYBRID"
|
||||
const GSushort ROOM_HYBRID_REGSERVER = 4; //"HYBRID_REGSERVER"
|
||||
const GSushort ROOM_UBI_CLIENTHOST = 5; //"UBI_CLIENTHOST"
|
||||
const GSushort ROOM_UBI_CLIENTHOST_REGSERVER = 6; //"UBI_CLIENTHOST_REGSERVER"
|
||||
const GSushort ROOM_UBI_P2P = 7; //"UBI_P2P"
|
||||
const GSushort ROOM_UBI_GAMESERVER = 8; //"UBI_GAMESERVER"
|
||||
const GSushort ROOM_UBI_GAMESERVER_REGSERVER = 9; //"UBI_GAMESERVER_REGSERVER"
|
||||
const GSushort ROOM_REGSERVER = 10; //"REGISTER_SERVER"
|
||||
|
||||
//------------------------ Group and Game Masks ------------------------------
|
||||
const GSuint LSM_PRIVATE = 1 << 0; //The group is protected by a password
|
||||
const GSuint LSM_NEEDMASTER = 1 << 1; //The group need a master
|
||||
const GSuint LSM_ETERNEL = 1 << 2; //The group is eternel ie when no player is on the group it is not deleted
|
||||
const GSuint LSM_ACTIVE = 1 << 3; //The game is started
|
||||
const GSuint LSM_OPEN = 1 << 4; //The group is open
|
||||
const GSuint LSM_STARTABLE = 1 << 5; //The group can be started
|
||||
const GSuint LSM_MATCHACTIVE = 1 << 12; //The match is started
|
||||
|
||||
const GSuint LSM_CREATE_SUBLOBBY = 1 << 9; //Allow to create sublobby
|
||||
const GSuint LSM_OPEN_WHEN_ACTIVE = 1 << 10; //When the game is started the group is still open
|
||||
const GSuint LSM_SCORES_SUBMISSION = 1 << 11; //Allow score submission
|
||||
const GSuint LSM_DEDICATEDSERVER = 1 << 14; //The group represent a dedicated server
|
||||
const GSuint LSM_REGISTERSERVER = 1 << 13;
|
||||
const GSuint LSM_JOINRULE = 1 << 15; //The access to the group is protected by a rule ( use with passport )
|
||||
const GSuint LSM_CREATERULE = 1 << 16; //The group caretion is restricted by a rule ( use with passport )
|
||||
|
||||
|
||||
//--------------- Join info Masks ----------------------------------------------------
|
||||
const GSuint LSM_GROUPINFO = 1 << 6; //Get the group info
|
||||
const GSuint LSM_GROUPMEMBERS = 1 << 7; //Get the group members
|
||||
const GSuint LSM_CHILDGROUPINFO = 1 << 8; //Get the childs group info
|
||||
|
||||
const GSuint LSM_ALLINFO = LSM_GROUPINFO | LSM_GROUPMEMBERS | LSM_CHILDGROUPINFO;
|
||||
|
||||
//------------------- Player Status ----------------------------
|
||||
const GSushort PS_SILENT = 1 << 0; //The player is limited ( doesn't access to chat, page, etc ... )
|
||||
const GSushort PS_GAMECONNECTED = 1 << 1; //The player is playing a game
|
||||
const GSushort PS_GAMEREADY = 1 << 2; //not implemented yet
|
||||
const GSushort PS_MATCHREADY = 1 << 3; //not implemented yet
|
||||
const GSushort PS_MATCHPLAYING = 1 << 4; //The player is playing a match
|
||||
|
||||
//-------------------- error messages -------------------------
|
||||
const GSushort ERRORLOBBYSRV_UNKNOWNERROR = 0;
|
||||
const GSushort ERRORLOBBYSRV_GROUPNOTEXIST = 1;
|
||||
const GSushort ERRORLOBBYSRV_GAMENOTALLOWED = 2;
|
||||
const GSushort ERRORLOBBYSRV_SPECTATORNOTALLOWED = 4;
|
||||
const GSushort ERRORLOBBYSRV_NOMOREPLAYERS = 5;
|
||||
const GSushort ERRORLOBBYSRV_NOMORESPECTATORS = 6;
|
||||
const GSushort ERRORLOBBYSRV_NOMOREMEMBERS = 7;
|
||||
const GSushort ERRORLOBBYSRV_MEMBERNOTREGISTERED = 8;
|
||||
const GSushort ERRORLOBBYSRV_GAMEINPROGRESS = 9;
|
||||
const GSushort ERRORLOBBYSRV_WRONGGAMEVERSION = 10;
|
||||
const GSushort ERRORLOBBYSRV_PASSWORDNOTCORRECT = 11;
|
||||
const GSushort ERRORLOBBYSRV_ALREADYINGROUP = 12;
|
||||
const GSushort ERRORLOBBYSRV_NOTMASTER = 13;
|
||||
const GSushort ERRORLOBBYSRV_NOTINGROUP = 14;
|
||||
const GSushort ERRORLOBBYSRV_MINPLAYERSNOTREACH = 15;
|
||||
const GSushort ERRORLOBBYSRV_CONNECTADDCONNECTION = 16;
|
||||
const GSushort ERRORLOBBYSRV_CONNECTSENDLOGINMSG = 17;
|
||||
const GSushort ERRORLOBBYSRV_ERRORLOGINMESSAGE = 18;
|
||||
const GSushort ERRORLOBBYSRV_NOHOSTLOBBYSERVER = 19;
|
||||
const GSushort ERRORLOBBYSRV_LOBBYSRVDISCONNECTED = 20;
|
||||
const GSushort ERRORLOBBYSRV_INVALIDGROUPNAME = 21;
|
||||
const GSushort ERRORLOBBYSRV_INVALIDGAMETYPE = 22;
|
||||
const GSushort ERRORLOBBYSRV_NOMOREGAMEMODULE = 23;
|
||||
const GSushort ERRORLOBBYSRV_CREATENOTALLOWED = 24;
|
||||
const GSushort ERRORLOBBYSRV_GROUPCLOSE = 25;
|
||||
const GSushort ERRORLOBBYSRV_WRONGGROUPTYPE = 26;
|
||||
const GSushort ERRORLOBBYSRV_MEMBERNOTFOUND = 27;
|
||||
const GSushort ERRORLOBBYSRV_MATCHNOTEXIST = 30;
|
||||
const GSushort ERRORLOBBYSRV_MATCHNOTFINISHED = 31;
|
||||
const GSushort ERRORLOBBYSRV_GAMENOTINITIATED = 32;
|
||||
const GSushort ERRORLOBBYSRV_BEGINALREADYDONE = 33;
|
||||
const GSushort ERRORLOBBYSRV_MATCHALREADYFINISHEDFORYOU = 34;
|
||||
const GSushort ERRORLOBBYSRV_MATCHSCORESSUBMISSIONEVENTFAIL = 35;
|
||||
const GSushort ERRORLOBBYSRV_MATCHSCORESSUBMISSIONALREDYSENT = 36;
|
||||
const GSushort ERRORLOBBYSRV_MATCHRESULTSPROCESSNOTFINISHED = 37;
|
||||
const GSushort ERRORLOBBYSRV_MEMBERBANNED = 38;
|
||||
const GSushort ERRORLOBBYSRV_PASSPORTFAIL = 39;
|
||||
const GSushort ERRORLOBBYSRV_NOTCREATOR = 40;
|
||||
const GSushort ERRORLOBBYSRV_GAMENOTFINISHED = 41;
|
||||
const GSushort ERRORLOBBYSRV_PASSPORTTIMEOUT = 42;
|
||||
const GSushort ERRORLOBBYSRV_PASSPORTNOTFOUND = 43;
|
||||
const GSushort ERRORLOBBYSRV_GROUPALREADYEXIST = 44;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef __REMOTEALGORITHMDEFINES_H__
|
||||
#define __REMOTEALGORITHMDEFINES_H__
|
||||
|
||||
/*!
|
||||
\struct
|
||||
\brief INPUT/OUTPUT Supported Data Types
|
||||
|
||||
This structure defines the data types that are supported as inputs and outputs
|
||||
by remote algorithms.
|
||||
*/
|
||||
enum RAE_DATATYPE {
|
||||
RAE_INTEGER //!< Any integer value (char, short, int, etc)
|
||||
};
|
||||
|
||||
/*!
|
||||
\struct RAE_VALUE
|
||||
\brief INPUT/OUTPUT Element
|
||||
|
||||
This structure defines the value elements that are to be used as inputs and
|
||||
outputs to the executed algorithm. This allows to create arrays of multiple
|
||||
different type of data (once the structure handles more than just integers).
|
||||
*/
|
||||
struct RAE_VALUE
|
||||
{
|
||||
RAE_DATATYPE dataType; //!< The type of data this node contains
|
||||
union
|
||||
{
|
||||
GSint intValue; //!< Field for an integer value
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __REMOTEALGORITHMDEFINES_H__
|
||||
Reference in New Issue
Block a user