Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SecurePlayLibrary::SPGameAPIInterface Class Reference

#include <SPGameAPIInterface.h>

Inheritance diagram for SecurePlayLibrary::SPGameAPIInterface:

SecurePlayLibrary::SPGameAPIClass List of all members.

Detailed Description

This is the GameAPI class interface
Author:
IT GlobalSecure Inc.
See also:
SecurePlay License Information


Public Member Functions

virtual ~SPGameAPIInterface ()
virtual bool APIbeginGame (string playerID)=0
virtual bool APIendGame (string playerID)=0
virtual string GetNextGameSegmentID (string currentsegment)=0
virtual bool isPlayerInternal (string pid)=0
virtual bool isPlayerIncluded (string pid)=0
virtual bool APIcloseTransaction (string transID)=0
virtual SPAbstractTransactionInterfaceAPIcreateTransaction (string transtype, string transmaster, vector< string > playerIDList, bool privateflag)=0
virtual SPTBlastClassAPIcreateBlastTransaction (string pid, vector< string > transcontent)=0
virtual bool APIBcreateTransaction (string transtype, string transmaster, vector< string > playerIDList, bool privateflag)=0
virtual SPAbstractTransactionAPIInterfaceAPITAOcreateTransaction (string transtype, string transmaster, vector< string > playerIDList, bool privateflag)=0
virtual bool onnewTransaction (SPMessageClass *incoming)=0
virtual bool APIPlayerJoin (string sender, string pid, string cid)=0
virtual bool APIPlayerJoin (string sender, string pid, string cid, bool rflag)=0
virtual bool onPlayerJoin (SPMessageClass *messObj)=0
virtual bool joinPlayer (string pid, string cid, bool rflag)=0
virtual bool APIrequestbeginGame (string playerID)=0
virtual bool APIrequestendGame (string playerID)=0
virtual bool APIrequestcreateTransaction (string pid, string transmaster, string transtype, vector< string > playerIDList, bool privateflagIN)=0
virtual bool APIrequestPlayerJoin (string sender, string pid, string cid, bool rflagIN)=0
virtual bool onrequestcreateTransaction (SPMessageClass *incoming)=0
virtual bool onrequestPlayerJoin (SPMessageClass *messObj)=0
virtual string APIgetLicenseSummary ()=0
virtual SPLogInterfaceAPIgetGameLog ()=0
virtual void * APIgetGameLogCurrentEntry ()=0
virtual int APIgetGameLogLength ()=0
virtual void * APIgetGameLogNextEntry ()=0
virtual void * APIgetGameLogPreviousEntry ()=0
virtual vector< string > APIgetOpenTransactionIDs ()=0
virtual SPAbstractTransactionAPIInterfaceAPIgetTransactionAPI (string tid)=0
virtual bool sendMessage (string sender, vector< string > receivers, bool encryptflag, bool privateflag, string messagetype, vector< string > messagebody, vector< string > altmessage)=0
virtual SPAbstractTransactionInterfaceAPIgetTransaction (string tid)=0
virtual bool APIAddListener (SPEventInterface *gameobj)=0
virtual bool APIRemoveListener (SPEventInterface *gameobj)=0
virtual vector< SPEventInterface * > APIGetListeners ()=0
virtual bool APIClearListeners ()=0
virtual int APIGetListenerCount ()=0
virtual SPPlayerInterfaceAPIgetPlayer (string pid)=0
virtual vector< string > APIgetPlayerIDList ()=0
virtual bool rulesbeginGame (string requesterID)=0
virtual bool rulesendGame (string requesterID)=0
virtual bool rulesPlayerJoin (string sender, vector< string > messbody)=0
virtual bool rulescreateTransaction (string sender, string transtype, string master, vector< string > players, bool pflag)=0
virtual void onBlast (SPMessageClass *messObj)=0
virtual void onnewGameBlock (SPMessageClass *messObj)=0
virtual SPGameClassgetGameinstance ()=0
virtual bool rulesnewplayerconfig (string pid, string cid, bool rflag)=0


Constructor & Destructor Documentation

virtual SecurePlayLibrary::SPGameAPIInterface::~SPGameAPIInterface  )  [inline, virtual]
 

Virtual Destructor.


Member Function Documentation

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIAddListener SPEventInterface gameobj  )  [pure virtual]
 

This method adds a listener object for Game API events

Parameters:
gameobj SPEventInterface - the object to be added, that inplement the listener interface
Returns:
bool - TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIBcreateTransaction string  transtype,
string  transmaster,
vector< string >  playerIDList,
bool  privateflag
[pure virtual]
 

This method allows the creation of a new, internally controlled transaction. It also sends a message to the other transaction and game participants about this new transaction. NOTE: Thims method may not be supported

Parameters:
transtype string - specified transaction type
transmaster string - player id of the master of the transaction
playerIDList vector<string> - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
privateflag bool - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
Returns:
bool: TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIbeginGame string  playerID  )  [pure virtual]
 

This method safely begins the game

Parameters:
playerID string - player id is the master.
Returns:
bool: TRUE- if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIClearListeners  )  [pure virtual]
 

This method clears the listener objects for Game API events

Returns:
bool - TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIcloseTransaction string  transID  )  [pure virtual]
 

This method removes a transaction from the game instance's open transaction list.

Parameters:
transID string - transaction id to beremoved.
Returns:
bool: TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual SPTBlastClass* SecurePlayLibrary::SPGameAPIInterface::APIcreateBlastTransaction string  pid,
vector< string >  transcontent
[pure virtual]
 

This method creates a default Blast Transaction for this library.

Parameters:
pid string - player id.
transcontent vector<string> - content of this transaction.
Returns:
SPTBlastClass* - pointer to the created transaction.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual SPAbstractTransactionInterface* SecurePlayLibrary::SPGameAPIInterface::APIcreateTransaction string  transtype,
string  transmaster,
vector< string >  playerIDList,
bool  privateflag
[pure virtual]
 

This method allows the creation of a new, internally controlled transaction. It also sends a message to the other transaction and game participants about this new transaction. NOTE: Thims method may not be supported

Parameters:
transtype string - specified transaction type
transmaster string - player id of the master of the transaction
playerIDList vector<string> - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
privateflag bool - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
Returns:
SPAbstractTransactionInterface* - if successful, null if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIendGame string  playerID  )  [pure virtual]
 

This method safely ends a game.

Parameters:
playerID string - player id is the master.
Returns:
bool: TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual SPLogInterface* SecurePlayLibrary::SPGameAPIInterface::APIgetGameLog  )  [pure virtual]
 

Gets the messagelog object from the gameinstance

Returns:
SPLogInterface* - this object contains the message logs of the game instance.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual void* SecurePlayLibrary::SPGameAPIInterface::APIgetGameLogCurrentEntry  )  [pure virtual]
 

Returns current entry from the messagelog object of comms

Returns:
void* - this is the current entry in the message log

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual int SecurePlayLibrary::SPGameAPIInterface::APIgetGameLogLength  )  [pure virtual]
 

returns the number entries in messagelog

Returns:
int - this is the length or number of messages in the game message log object.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual void* SecurePlayLibrary::SPGameAPIInterface::APIgetGameLogNextEntry  )  [pure virtual]
 

Returns the next entry from the messagelog object of comms

Returns:
void* - this is the next entry in the message log

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual void* SecurePlayLibrary::SPGameAPIInterface::APIgetGameLogPreviousEntry  )  [pure virtual]
 

Returns the previous entry from the messagelog object of the comms

Returns:
void* - this is the previous entry in the message log

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual string SecurePlayLibrary::SPGameAPIInterface::APIgetLicenseSummary  )  [pure virtual]
 

This method returns a summary of the licensee information for the current game instance. This information needs to be publicly available from any game instance, see SecurePlay license for details.

Returns:
string - this string contains full license information.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual int SecurePlayLibrary::SPGameAPIInterface::APIGetListenerCount  )  [pure virtual]
 

This method returns the number of listener objects for Game API events

Returns:
int - the number of listeners

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual vector<SPEventInterface*> SecurePlayLibrary::SPGameAPIInterface::APIGetListeners  )  [pure virtual]
 

This method returns a list of listener objects for Game API events

Returns:
vector<SPEventInterface*> - array of listener objects

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual vector<string> SecurePlayLibrary::SPGameAPIInterface::APIgetOpenTransactionIDs  )  [pure virtual]
 

Returns a vector that contains a list of open transaction IDs

Returns:
vector<string> - the list of open transaction ids.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual SPPlayerInterface* SecurePlayLibrary::SPGameAPIInterface::APIgetPlayer string  pid  )  [pure virtual]
 

This method gets the player from the game instance using the player ID

Parameters:
pid string - the player ID
Returns:
SPPlayerInterface* - the player from the game instance.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual vector<string> SecurePlayLibrary::SPGameAPIInterface::APIgetPlayerIDList  )  [pure virtual]
 

This method gets the player id list list associated with this game.

Returns:
vector<string> - player id list.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual SPAbstractTransactionInterface* SecurePlayLibrary::SPGameAPIInterface::APIgetTransaction string  tid  )  [pure virtual]
 

This method gets the transaction from the game instance using the transaction ID

Parameters:
tid string - the transaction id
Returns:
SPAbstractTransactionInterface* - the transaction from the game instance.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual SPAbstractTransactionAPIInterface* SecurePlayLibrary::SPGameAPIInterface::APIgetTransactionAPI string  tid  )  [pure virtual]
 

This method returns the transaction API of the game transaction using sid.

Parameters:
tid string - the transaction id.
Returns:
SPAbstractTransactionAPIInterface* - the transaction API.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIPlayerJoin string  sender,
string  pid,
string  cid,
bool  rflag
[pure virtual]
 

This method allows the Game instance Master to safely add a new player during the course of a game and to notify the remote players of this information. This method will not be supported in the next version of the library.

Parameters:
sender string - player id of the sender
pid string - player id to be joined
cid string - comms id to be used
rflag bool - relay flag
Returns:
result - bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIPlayerJoin string  sender,
string  pid,
string  cid
[pure virtual]
 

This method allows the Game instance Master to safely add a new player during the course of a game and to notify the remote players of this information.

Parameters:
sender string - player id of the sender
pid string - player id to be joined
cid string - comms id to be used
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIRemoveListener SPEventInterface gameobj  )  [pure virtual]
 

This method removes a listener object for Game API events

Parameters:
gameobj SPEventInterface - the object to be removed, that inplement the listener interface
Returns:
bool - TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIrequestbeginGame string  playerID  )  [pure virtual]
 

This method sends a request to the game instance master to begin the game.

Parameters:
playerID string - id of player who is requesting
Returns:
bool: TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIrequestcreateTransaction string  pid,
string  transmaster,
string  transtype,
vector< string >  playerIDList,
bool  privateflagIN
[pure virtual]
 

This method safely allows a player to request the creation of a new transaction of a given type and parameters.

Parameters:
pid string - player id of the player who is requesting (cannot be the master)
transmaster string - player id of the master.
transtype string - transaction type to be created
playerIDList vector<string> - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
privateflagIN bool - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
Returns:
bool: TRUE, if request sent successfully, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIrequestendGame string  playerID  )  [pure virtual]
 

This method sends a message from the specified player to the game instance master to end the game.

Parameters:
playerID string - id of the player requesting
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::APIrequestPlayerJoin string  sender,
string  pid,
string  cid,
bool  rflagIN
[pure virtual]
 

This method sends a request to a remote game instance to add a player during a game. Note, only the game master can add a player.

Parameters:
sender string - player id of the player who is requesting (can not be the master).
pid string - player id of the master.
cid string - comms id.
rflagIN bool - relay flag
Returns:
bool: TRUE, if request successfully sent, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual SPAbstractTransactionAPIInterface* SecurePlayLibrary::SPGameAPIInterface::APITAOcreateTransaction string  transtype,
string  transmaster,
vector< string >  playerIDList,
bool  privateflag
[pure virtual]
 

This method allows the creation of a new, internally controlled transaction. It also sends a message to the other transaction and game participants about this new transaction. NOTE: Thims method may not be supported

Parameters:
transtype string - specified transaction type
transmaster string - player id of the master of the transaction
playerIDList vector<string> - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
privateflag bool - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
Returns:
SPAbstractTransactionAPIInterface* - if successful, null if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual SPGameClass* SecurePlayLibrary::SPGameAPIInterface::getGameinstance  )  [pure virtual]
 

Getter function that returns the property: gameinstance

Returns:
SPGameClass*

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual string SecurePlayLibrary::SPGameAPIInterface::GetNextGameSegmentID string  currentsegment  )  [pure virtual]
 

This method gets automatically called by the Game any time the conditions for a new Game Segment are met according to the SecurePlay Library license. THIS FUNCTION IS A STUB - A global system for unique game segment generation needs to be created in compliance with the SecurePlay license. NOTE - An initial Game Segment needs to be set for each individual game played online this is highly variable - it could be set by a server, a client, a peer, or other system on a case-by-case basis. The base Game Segment ID is provided by SecurePlay.com. One party to the game or supporting the game is responsible for setting the Game Segment ID - the master for the game transaction in this reference implementation. REMOVAL, CIRCUMVENTION, OR DELETION OF THIS FUNCTION IS A VIOLATION OF THE SECUREPLAY LICENSE. ANY CHANGES MUST BE COORDINATED - SEE THE SECUREPLAY LICENSE FOR DETAILS.

Parameters:
currentsegment string - current game segment, but currently not used because the method is a shell.
Returns:
string - new game segement ID

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::isPlayerIncluded string  pid  )  [pure virtual]
 

This method tests to determine if a specified player is a transaction participant.

Parameters:
pid string - player id to be checked.
Returns:
bool: TRUE, if internal, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::isPlayerInternal string  pid  )  [pure virtual]
 

This method checks to see whether a specified playerID is internal to the local SecurePlay library process

Parameters:
pid string - player id to be checked.
Returns:
bool: TRUE, if internal, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::joinPlayer string  pid,
string  cid,
bool  rflag
[pure virtual]
 

This method carries out the local process of adding a new Player to the local game instance.

Parameters:
pid string - player id to be joined
cid string - comms id to used
rflag bool - relay flag
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual void SecurePlayLibrary::SPGameAPIInterface::onBlast SPMessageClass messObj  )  [pure virtual]
 

This method handles incoming new Blast Transactions

Parameters:
messObj SPMessageClass* - incoming Message Object

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual void SecurePlayLibrary::SPGameAPIInterface::onnewGameBlock SPMessageClass messObj  )  [pure virtual]
 

This method handles incoming new Game Blocks

Parameters:
messObj SPMessageClass* - incoming Message Object

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::onnewTransaction SPMessageClass incoming  )  [pure virtual]
 

This method handles messages for new incoming transactions. It ensures that the new transactions are safely instantiated and loaed into the game.

Parameters:
incoming SPMessageClass - the incoming message.
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::onPlayerJoin SPMessageClass messObj  )  [pure virtual]
 

This method safely handles remote messages for the addition of a player to the local game instance.

Parameters:
messObj SPMessageClass* - incoming Message Object
Returns:
bool: TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::onrequestcreateTransaction SPMessageClass incoming  )  [pure virtual]
 

This method handles incoming requests for the creation of new transactions. Only the proposed transaction master can create a new transaction.

Parameters:
incoming SPMessageClass* - incoming message
Returns:
bool - TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::onrequestPlayerJoin SPMessageClass messObj  )  [pure virtual]
 

Safely handles requests to add a player. Only the Game Master can add a player.

Parameters:
messObj SPMessageClass* - incoming Message Object
Returns:
bool - TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::rulesbeginGame string  requesterID  )  [pure virtual]
 

This is a shell function to allow the insertion of rules code for the decision to begin a game.

Parameters:
requesterID string - the id of the player who requested the request.
Returns:
bool - TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::rulescreateTransaction string  sender,
string  transtype,
string  master,
vector< string >  players,
bool  pflag
[pure virtual]
 

This method safely allows a player to request the creation of a new transaction of a given type and parameters.

Parameters:
sender string - the id of the player who requested the request.
transtype string - the transaction type to be created
master string - the id of the master of the transaction.
players vector<string> - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
pflag bool - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
Returns:
bool: TRUE, if request sent successfully, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::rulesendGame string  requesterID  )  [pure virtual]
 

This is a shell method to allow the evaluation of the game rules to determine if the game should be allowed to end.

Parameters:
requesterID string - the id of the player who requested the request.
Returns:
bool, TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::rulesnewplayerconfig string  pid,
string  cid,
bool  rflag
[pure virtual]
 

This shell method takes an incoming proposed configuration for a new player and maps it against the local preference for that player, if different.

Parameters:
pid string - player id of the player to be configured
cid string - comms id
rflag bool - relay flag
Returns:
bool - whether this is accepted or not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::rulesPlayerJoin string  sender,
vector< string >  messbody
[pure virtual]
 

This is a shell method to determine if a player will be allowed to join in midgame. Only the Game Master can implement this request.

Parameters:
sender string - the id of the player who requested the request.
messbody vector<string> - the message
Returns:
bool - TRUE, if allowed, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.

virtual bool SecurePlayLibrary::SPGameAPIInterface::sendMessage string  sender,
vector< string >  receivers,
bool  encryptflag,
bool  privateflag,
string  messagetype,
vector< string >  messagebody,
vector< string >  altmessage
[pure virtual]
 

This method is a wrapper for the game instance sendMessage() method.

Parameters:
sender - id of the sender
receivers - ids of the recievers of the message
encryptflag - encryption flag
privateflag - private flag
messagetype - the type of message
messagebody - the message body
altmessage - alternative message
Returns:
bool - TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameAPIClass.


The documentation for this class was generated from the following file: 2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.