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

SecurePlayLibrary::SPGameInterface Class Reference

#include <SPGameInterface.h>

Inheritance diagram for SecurePlayLibrary::SPGameInterface:

SecurePlayLibrary::SPGameClass List of all members.

Detailed Description

This is the general class that holds a game instance. It is also the transaction class for the basic game transaction.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Public Member Functions

virtual ~SPGameInterface ()
virtual SPGameAPIInterfacegetGameAPI ()=0
virtual bool addPlayer (string pid)=0
virtual bool removePlayer (string pid)=0
virtual bool setPlayerComms (string playerID, string commsID, bool relayflag)=0
virtual SPPlayerInterfacegetGamePlayer (string playerID)=0
virtual bool gameComplete ()=0
virtual bool addComms (string commsID)=0
virtual bool removeComms (string commsID)=0
virtual bool addTransaction (SPAbstractTransactionInterface *transObj)=0
virtual bool closeTransaction (string transID)=0
virtual SPAbstractTransactionInterfacegetGameTransaction (string tid)=0
virtual bool transactionincluded (string tid)=0
virtual bool incrementBasicGameTransactionCount (int count)=0
virtual void onIncomingTransaction (SPMessageClass *messObj)=0
virtual bool isPlayerInternal (string pid)=0
virtual bool attach (string gid, SecurePlayClass *lib, string master, bool signaturepolicy, bool encryptionpolicy, SPLogInterface *log, SPSecurityManagerInterface *security)=0
virtual string getGameID ()=0
virtual bool onendGame (SPMessageClass *messObj)=0
virtual vector< string > getPlayerIDList ()=0
virtual SPCommsManagerClassgetCommsManager ()=0
virtual string getMaster ()=0
virtual string getTransactionID ()=0
virtual SecurePlayClassgetSecurePlay ()=0
virtual vector< byteSPcreateBHash (string input, string gameid)=0
virtual vector< byteSPcreateBSignature (string senderID, vector< byte > input, string gameid)=0
virtual string SPcreateHash (string input, string gameid)=0
virtual string SPcreateSignature (string senderID, string input, string gameid)=0
virtual vector< string > SPdecrypt (vector< string > input, string senderID, vector< string > recvrs, string gameID, string messageID)=0
virtual vector< string > SPencrypt (vector< string > input, string senderID, vector< string > recvrs, string gameID, string messageID)=0
virtual bool SPverifySignature (vector< byte > sigToVerify, string senderID, vector< byte > testhash, string gameid)=0
virtual bool SPverifySignature (string signature, string senderID, string testhash, string gameid)=0
virtual SPSecurityManagerInterfacegetSecurityManager ()=0
virtual void SPnotify (string eventdescription, vector< string > args)=0


Constructor & Destructor Documentation

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

Virtual Destructor.


Member Function Documentation

virtual bool SecurePlayLibrary::SPGameInterface::addComms string  commsID  )  [pure virtual]
 

This method associates a comms service specified by the commsID string to a game instance.

Parameters:
commsID string - id of the comms to be added
Returns:
bool: TRUE, if gamestatus is "complete", FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::addPlayer string  pid  )  [pure virtual]
 

This method safely adds an existing Player, specified by the playerID to the game instance.

Parameters:
pid string - the id of the player to be added
Returns:
bool: TRUE, if successful, FALSE, if no

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::addTransaction SPAbstractTransactionInterface transObj  )  [pure virtual]
 

This safely adds a transaction to a game instance and appropriately updates the game state.

Parameters:
transObj SPAbstractTransactionInterface - the transaction Object handler
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::attach string  gid,
SecurePlayClass lib,
string  master,
bool  signaturepolicy,
bool  encryptionpolicy,
SPLogInterface log,
SPSecurityManagerInterface security
[pure virtual]
 

This method attaches an empty game object instance and configures it for use in the SecurePlay library as a game

Parameters:
gid string - game id
lib SecurePlayClass* - the secure play library
master string - the master of the game
signaturepolicy bool - signature policy
encryptionpolicy bool - encryption policy
log SPLogInterface* - log class of this game.
security SPSecurityManagerInterface* - security manager associated with this game.
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::closeTransaction string  transID  )  [pure virtual]
 

Safely removes a transaction from a game instance.

Parameters:
transID string - the id of the transaction to be closed
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::gameComplete  )  [pure virtual]
 

This method allows external entities to review the status of the game instance without directly accessing its internals.

Returns:
bool: TRUE, if gamestatus is "complete", FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

virtual SPCommsManagerClass* SecurePlayLibrary::SPGameInterface::getCommsManager  )  [pure virtual]
 

Gets the comms manager object

Returns:
SPCommsManagerClass* - the comms manager object

Implemented in SecurePlayLibrary::SPGameClass.

virtual SPGameAPIInterface* SecurePlayLibrary::SPGameInterface::getGameAPI  )  [pure virtual]
 

This method returns the handler for the Game API object.

Returns:
SPGameAPIInterface* - Game API object handler

Implemented in SecurePlayLibrary::SPGameClass.

virtual string SecurePlayLibrary::SPGameInterface::getGameID  )  [pure virtual]
 

Gets the game id

Returns:
string - the game id

Implemented in SecurePlayLibrary::SPGameClass.

virtual SPPlayerInterface* SecurePlayLibrary::SPGameInterface::getGamePlayer string  playerID  )  [pure virtual]
 

This method returns the player object specified by the playerID.

Parameters:
playerID string - the id of the player to get
Returns:
SPPlayerInterface* - the game player object handler or an empty instance of the class, if the player is not present

Implemented in SecurePlayLibrary::SPGameClass.

virtual SPAbstractTransactionInterface* SecurePlayLibrary::SPGameInterface::getGameTransaction string  tid  )  [pure virtual]
 

This method returns a specific transaction associated with a given game instance.

Parameters:
tid string - identifier for transaction object
Returns:
SPAbstractTransactionInterface*

Implemented in SecurePlayLibrary::SPGameClass.

virtual string SecurePlayLibrary::SPGameInterface::getMaster  )  [pure virtual]
 

Gets the master

Returns:
string - the master

Implemented in SecurePlayLibrary::SPGameClass.

virtual vector<string> SecurePlayLibrary::SPGameInterface::getPlayerIDList  )  [pure virtual]
 

Gets the player id list

Returns:
vector<string> - the player id list

Implemented in SecurePlayLibrary::SPGameClass.

virtual SecurePlayClass* SecurePlayLibrary::SPGameInterface::getSecurePlay  )  [pure virtual]
 

This method returns the unique SecurePlay library object associated with the game instance object.

Returns:
SecurePlayLibrary* - the secure play library

Implemented in SecurePlayLibrary::SPGameClass.

virtual SPSecurityManagerInterface* SecurePlayLibrary::SPGameInterface::getSecurityManager  )  [pure virtual]
 

This method returns the security manager class associated with this game.

Returns:
SPSecurityManagerInterface*

Implemented in SecurePlayLibrary::SPGameClass.

virtual string SecurePlayLibrary::SPGameInterface::getTransactionID  )  [pure virtual]
 

Gets the transaction id

Returns:
string - the transaction id

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::incrementBasicGameTransactionCount int  count  )  [pure virtual]
 

This method increments the game’s transaction counter to support certain licensing models

Parameters:
count int - number of increments
Returns:
bool TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

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

Checks to see if the player is internal

Parameters:
pid string - id of the player to be checked
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::onendGame SPMessageClass messObj  )  [pure virtual]
 

This method safely ends the local game instance.

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

Implemented in SecurePlayLibrary::SPGameClass.

virtual void SecurePlayLibrary::SPGameInterface::onIncomingTransaction SPMessageClass messObj  )  [pure virtual]
 

This method is the generic handler for incoming Game transaction methods.

Parameters:
SPMessageClass* - incoming Message Object

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::removeComms string  commsID  )  [pure virtual]
 

This method removes the association of a communications service with a game instance.

Parameters:
commsID string - id of the comms to be removed
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::removePlayer string  pid  )  [pure virtual]
 

This method safely removes a Player instance from an existing Game Instance.

Parameters:
pid string - id of the player to be removed
Returns:
bool: TRUE, if successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::setPlayerComms string  playerID,
string  commsID,
bool  relayflag
[pure virtual]
 

This method associates a specific player instance, specified by the playerID, with a specific communications service, specified by the commsID. For certain remote players, a relay service is supported to allow messages to be forwarded. NOTE: there is a reserved comms service "internal" for player instances that are included in the local application session.

Parameters:
playerID string - id of the player to be added
commsID string - id of the comms object to be added
relayflag bool - relay flag
Returns:
bool: TRUE, if successful, FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.

virtual vector<byte> SecurePlayLibrary::SPGameInterface::SPcreateBHash string  input,
string  gameid
[pure virtual]
 

This is a wrapper function for creating a hash of a string. This reference implementation includes a MD5 hash.

Parameters:
input string
gameid string
Returns:
vector<byte> - Hash of input

Implemented in SecurePlayLibrary::SPGameClass.

virtual vector<byte> SecurePlayLibrary::SPGameInterface::SPcreateBSignature string  senderID,
vector< byte input,
string  gameid
[pure virtual]
 

This is a wrapper function for creating a digital signature based on an existing hashed string and a Sender ID. The reference implementation currently uses an MD5 function to approximate performance of a real signature. The included signature function is a sample function - REPLACE with a function that meets your specific security requirements.

Parameters:
senderID string
input string
gameid string
Returns:
vector<byte> - digital signature of hashstring signed by senderID.

Implemented in SecurePlayLibrary::SPGameClass.

virtual string SecurePlayLibrary::SPGameInterface::SPcreateHash string  input,
string  gameid
[pure virtual]
 

This is a wrapper function for creating a hash of a string. This reference implementation includes a MD5 hash.

Parameters:
input string
Returns:
string - Hash of input

Implemented in SecurePlayLibrary::SPGameClass.

virtual string SecurePlayLibrary::SPGameInterface::SPcreateSignature string  senderID,
string  input,
string  gameid
[pure virtual]
 

This is a wrapper function for creating a digital signature based on an existing hashed string and a Sender ID. The reference implementation currently uses an MD5 function to approximate performance of a real signature. The included signature function is a sample function - REPLACE with a function that meets your specific security requirements.

Parameters:
senderID string
input string
gameid string
Returns:
string - digital signature of hashstring signed by senderID.

Implemented in SecurePlayLibrary::SPGameClass.

virtual vector<string> SecurePlayLibrary::SPGameInterface::SPdecrypt vector< string >  input,
string  senderID,
vector< string >  recvrs,
string  gameID,
string  messageID
[pure virtual]
 

This is a placeholder for an decryption function. An actual encryption function is the responsibility of the game implementer.

Parameters:
input vector<string> - input message body to be decrypted
senderID string - sender id
recvrs vector<string> - receiver id list
gameID string - game id
messageID string - message id
Returns:
vector<string> - string array of decrypted messagebody.

Implemented in SecurePlayLibrary::SPGameClass.

virtual vector<string> SecurePlayLibrary::SPGameInterface::SPencrypt vector< string >  input,
string  senderID,
vector< string >  recvrs,
string  gameID,
string  messageID
[pure virtual]
 

This is a placeholder for an encryption function. An actual encryption function is the responsibility of the game implementer.

Parameters:
input vector<string> - message body to be encrypted
senderID string - sender id
recvrs vector<string> - receiver id list
gameID string - game id
messageID string - message id
Returns:
vector<string> - Encrypted message body

Implemented in SecurePlayLibrary::SPGameClass.

virtual void SecurePlayLibrary::SPGameInterface::SPnotify string  eventdescription,
vector< string >  args
[pure virtual]
 

This method notifies the Listeners of events

Parameters:
eventdescription 
vector<string> - arguments

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::SPverifySignature string  signature,
string  senderID,
string  testhash,
string  gameid
[pure virtual]
 

This is a wrapper for a digital signature verification function. CAREFUL CHOICE OF ACTUAL DIGITAL SIGNATURES AND VERIFICATION IS CRITICAL. SELECTION OF APPROPRIATE FUNCTIONS AND IMPLEMENTATION MAY HAVE A SUBSTANTIAL IMPACT ON THE SECURITY AND PERFORMANCE OF A GAME IMPLEMENTATION.

Parameters:
signature string
senderID string
testhash string
Returns:
bool - TRUE, if verification Successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::SPverifySignature vector< byte sigToVerify,
string  senderID,
vector< byte testhash,
string  gameid
[pure virtual]
 

This is a wrapper for a digital signature verification function. CAREFUL CHOICE OF ACTUAL DIGITAL SIGNATURES AND VERIFICATION IS CRITICAL. SELECTION OF APPROPRIATE FUNCTIONS AND IMPLEMENTATION MAY HAVE A SUBSTANTIAL IMPACT ON THE SECURITY AND PERFORMANCE OF A GAME IMPLEMENTATION.

Parameters:
sigToVerify vector<byte>
senderID string
testhash string
Returns:
bool - TRUE, if verification Successful, FALSE, if not.

Implemented in SecurePlayLibrary::SPGameClass.

virtual bool SecurePlayLibrary::SPGameInterface::transactionincluded string  tid  )  [pure virtual]
 

This method checks the specified transaction ID against the currently included transaction IDs in the game instance.

Parameters:
tid string - the id of the transaction in question
Returns:
bool: TRUE, if included, FALSE, if not

Implemented in SecurePlayLibrary::SPGameClass.


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.