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

SecurePlayLibrary::SecurePlayClass Class Reference

#include <SecurePlayClass.h>

List of all members.


Detailed Description

This is the main Secure Play Library Class.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Public Member Functions

 SecurePlayClass ()
 ~SecurePlayClass ()
bool APIsetSOSLicenseInfo (string pocname, string company, string siteURL, string email)
bool APIsetLicenseInfo (string pocname, string company, string siteURL, string email, string SPSerialNumber, string SPLicenseKey)
bool APIcreateGame (string gameID, string master, bool signaturepolicy, bool encryptionpolicy)
bool APIcreateGame (string gameID, string master, bool signaturepolicy, bool encryptionpolicy, SPLogInterface *log, SPSecurityManagerInterface *security)
bool APIcreatePlayer (string playerID, bool internalflag)
bool APIcreatePlayer (string playerID)
bool APIcreateComms (string commsID, SPAbstractCommsInterface *commsObj)
bool APIsetPlayerGameComms (string gid, string playerID, string commsID)
bool APIsetPlayerGameComms (string gid, string playerID, string commsID, bool relayflag)
bool APIaddGamePlayer (string gid, string pid)
bool APIaddGameComms (string gid, string commsID)
SPGameInterfaceAPIgetGame (string gameID)
SPPlayerInterfaceAPIgetPlayer (string playerID)
SPAbstractCommsInterfaceAPIgetCommsService (string commsID)
bool APIremoveGame (string gameID)
bool APIremovePlayer (string playerID)
bool APIremoveCommsService (string commsID)
void APIclearGames ()
void APIclearPlayers ()
void APIclearCommsServices ()
bool checkLicense ()
SPGameAPIInterfaceAPIgetGameAPI (string gameID)
vector< string > APIgetOpenCommServiceIDs ()
vector< string > APIgetOpenGameIDs ()
vector< string > APIgetOpenPlayerIDs ()
bool isPlayerIncluded (string pid)
bool isGameIncluded (string gid)
bool isCommsIncluded (string cid)
bool APIcreateGame (SPGameInterface *game, string gameID, string master, bool signaturepolicy, bool encryptionpolicy)
bool APIcreateGame (SPGameInterface *game, string gameID, string master, bool signaturepolicy, bool encryptionpolicy, SPLogInterface *log, SPSecurityManagerInterface *security)
bool APIcreatePlayer (SPPlayerInterface *player, string playerID)
string getCompany ()
string getEmail ()
bool isInitialized ()
string getPocname ()
map< string, SPAbstractCommsInterface * > getPrcommsServicesList ()
map< string, SPGameInterface * > getPrgamesList ()
map< string, SPPlayerInterface * > getPrplayersList ()
string getSiteURL ()
string getSPLicenseKey ()
string getSPSerialNumber ()
string APIgetLicenseSummary ()
SPRelayInterfaceAPIgetRelayManager ()
bool APIsetRelay (SPRelayInterface *relay)
bool isRelayActive ()
SPLogInterfacegetDefaultLog ()
SPSecurityManagerInterfacegetDefaultSecurityManager ()
bool setDefaultLog (SPLogInterface *log)
bool setDefaultSecurityManager (SPSecurityManagerInterface *security)

Public Attributes

const string extendedversion
const string releaseversion

Private Member Functions

 SecurePlayClass (const SecurePlayClass &p)
 operator= (const SecurePlayClass &p)

Private Attributes

string pocname
string company
string siteURL
string email
string SPSerialNumber
string SPLicenseKey
map< string, SPGameInterface * > prgamesList
map< string, SPPlayerInterface * > prplayersList
map< string, SPAbstractCommsInterface * > prcommsServicesList
bool initialized
SPLogInterfacedefaultLog
SPSecurityManagerInterfacedefaultSecurityManager
SPRelayInterfacerelay


Constructor & Destructor Documentation

SecurePlayLibrary::SecurePlayClass::SecurePlayClass const SecurePlayClass p  )  [inline, private]
 

Private Copy Constructor that protects this class from being copied.

SecurePlayClass::SecurePlayClass  ) 
 

Default Constructor, this method sets all the lisence related parameters to its default: "PLEASE REGISTER WITH SECUREPLAY.COM".

SecurePlayClass::~SecurePlayClass  ) 
 

Default destructor.


Member Function Documentation

bool SecurePlayClass::APIaddGameComms string  gid,
string  commsID
 

This method associates a communications service with a game instance.

Parameters:
gid string - id of the game to which the comms will be added
commsID string - id of the comms to be added
Returns:
bool: TRUE if successful, FALSE, if unsuccessful

bool SecurePlayClass::APIaddGamePlayer string  gid,
string  pid
 

This method associates a Player instance with a Game Instance so the player can participate in the game.

Parameters:
gid string - id of the game to which the player will be added
pid string - id of the player to be added
Returns:
bool: TRUE, if successful, FALSE, if not successful

void SecurePlayClass::APIclearCommsServices  ) 
 

This clears all of the comms services associated with the SecurePlay library. It should be used with great caution.

Returns:
none

void SecurePlayClass::APIclearGames  ) 
 

This removes all of the Game Instances associated with the SecurePlay library. Use with caution.

Returns:
none

void SecurePlayClass::APIclearPlayers  ) 
 

This method removes all of the Player Instances associated with the SecurePlay library.

Returns:
none

bool SecurePlayClass::APIcreateComms string  commsID,
SPAbstractCommsInterface commsObj
 

This method registers a comms service.

Parameters:
commsID string - id of the comms to be created
commsObj SPAbstractCommsInterface* - comms object to be added
Returns:
bool: TRUE, if succcessful, FALSE, if not.

bool SecurePlayClass::APIcreateGame SPGameInterface game,
string  gameID,
string  master,
bool  signaturepolicy,
bool  encryptionpolicy,
SPLogInterface log,
SPSecurityManagerInterface security
 

Attach an existing Game Instance to the Library, with specified log and security manager.

Parameters:
game SPGameInterface* - the game object to be attached
gameID string - game id of the new game.
master string - the master of the new game.
signaturepolicy bool - signature policy of the game.
encryptionpolicy bool - encryption policy of the game.
log SPLogInterface* - the log class for this game.
security SPSecurityManagerInterface* - security manager for this game.
Returns:
bool - TRUE, if the game was created successfully, FALSE, otherwise

bool SecurePlayClass::APIcreateGame SPGameInterface game,
string  gameID,
string  master,
bool  signaturepolicy,
bool  encryptionpolicy
 

Attach an existing Game Instance to the Library with default log type.

Parameters:
game string - the game object to be attached
gameID string - game id of the Game
master string - player id of the player who will be the master of this game
signaturepolicy bool - signature policy
encryptionpolicy bool - encryption policy
Returns:
bool: TRUE, if successful, FALSE, if not successful

bool SecurePlayClass::APIcreateGame string  gameID,
string  master,
bool  signaturepolicy,
bool  encryptionpolicy,
SPLogInterface log,
SPSecurityManagerInterface security
 

Creates a new game instance with specified log and security manager.

Parameters:
gameID string - game id of the new game.
master string - the master of the new game.
signaturepolicy bool - signature policy of the game.
encryptionpolicy bool - encryption policy of the game.
log SPLogInterface* - the log class for this game.
security SPSecurityManagerInterface* - security manager for this game.
Returns:
bool - TRUE, if the game was created successfully, FALSE, otherwise

bool SecurePlayClass::APIcreateGame string  gameID,
string  master,
bool  signaturepolicy,
bool  encryptionpolicy
 

Creates a new game instance with default log type.

Parameters:
gameID string - game id of the Game
master string - player id of the player who will be the master of this game
signaturepolicy bool - signature policy
encryptionpolicy bool - encryption policy
Returns:
bool: TRUE, if the game was created successfully, FALSE, otherwise

bool SecurePlayClass::APIcreatePlayer SPPlayerInterface player,
string  playerID
 

Attach an existing player Instance to the Library.

Parameters:
player string - the player object to be attached
playerID string - the player id
Returns:
bool: TRUE, if successful, FALSE, if not successful

bool SecurePlayClass::APIcreatePlayer string  playerID  ) 
 

Adds a player instance

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

bool SecurePlayClass::APIcreatePlayer string  playerID,
bool  internalflag
 

Adds a player instance, NOTE: This method will not be supported in future versions.

Parameters:
playerID string - player id of the player to be created
internalflag bool - internal flag
Returns:
bool: TRUE, if successful, FALSE, if not

SPAbstractCommsInterface * SecurePlayClass::APIgetCommsService string  commsID  ) 
 

This method uses a commsID and returns the appropriate Communications Service Instance.

Parameters:
commsID string - id of the comms to be retrieved
Returns:
SPAbstractCommsInterface*

SPGameInterface * SecurePlayClass::APIgetGame string  gameID  ) 
 

This method takes a gameID and returns the associated Game Instance object.

Parameters:
gameID string - id of the game to be retrieved
Returns:
SPGameInterface*

SPGameAPIInterface * SecurePlayClass::APIgetGameAPI string  gameID  ) 
 

Gets the API of the the game instance in the this.prgameList associative array.

Parameters:
gameID string - id of the gameAPI to be retrieved
Returns:
SPGameAPIInterface*

string SecurePlayClass::APIgetLicenseSummary  ) 
 

This method returns the summary of the license.

Returns:
fulllicensetext - string - the summary of the license

vector< string > SecurePlayClass::APIgetOpenCommServiceIDs  ) 
 

Gets the keys of an associative array(SPHashtable) this.prcommsServicesList and returns them as a string array of open comms services id list.

Returns:
vector<string>: array of open comms services id list

vector< string > SecurePlayClass::APIgetOpenGameIDs  ) 
 

Gets the keys of an associative array(SPHashtable) this.prgamesList and returns them as a string array of open games id list.

Returns:
vector<string>: array of open games id list

vector< string > SecurePlayClass::APIgetOpenPlayerIDs  ) 
 

Gets the keys of an associative array(SPHashtable) this.prplayersList and returns them as a string array of open players id list.

Returns:
vector<string>: array of open players id list

SPPlayerInterface * SecurePlayClass::APIgetPlayer string  playerID  ) 
 

This method takes a playerID and returns the corresponding Player instance.

Parameters:
playerID string - id of the player to be retrieved
Returns:
SPPlayerInterface*

SPRelayInterface * SecurePlayClass::APIgetRelayManager  ) 
 

Returns the Library's Relay manager

Returns:
SPRelayInterface*

bool SecurePlayClass::APIremoveCommsService string  commsID  ) 
 

This method removes a Comms Service Instance specified by a commsID from the active SecurePlay library.

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

bool SecurePlayClass::APIremoveGame string  gameID  ) 
 

This method takes a gameID and removes the Game Instance from the active SecurePlay library.

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

bool SecurePlayClass::APIremovePlayer string  playerID  ) 
 

This method removes an instance of a Player from the active SecurePlay library.

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

bool SecurePlayClass::APIsetLicenseInfo string  pocname,
string  company,
string  siteURL,
string  email,
string  SPSerialNumber,
string  SPLicenseKey
 

Loads registered SecurePlay licensee information. Removal, modification, or disablement of this method or any other licensing code is a violation of the SecurePlay library license agreement. This method is used for Commercial Licenses. Simple Open Source licensees use the APIsetSOSLicenseInfo method.

Parameters:
pocname string - individual who represents the company
company string - company name.
siteURL string - company web site.
email string - company email.
SPSerialNumber string - serial number of the SecurePlay licensee
SPLicenseKey string - license key for the registered SecurePlay user.
Returns:
bool: TRUE, if successful, FALSE, if not

bool SecurePlayClass::APIsetPlayerGameComms string  gid,
string  playerID,
string  commsID,
bool  relayflag
 

This method associates a specific comms service with a specific player within a specific game. It also determines whether this SecurePlay library comms service will relay messages to that player. This method will not be supported in the next version of the library

Parameters:
gid string - game id to which the players and comms will be set
playerID string - id of the player to be set
commsID string - id of th comms to be set
relayflag bool - relay flag (this will be removed from future releases)
Returns:
bool: TRUE, if successful, FALSE, if not

bool SecurePlayClass::APIsetPlayerGameComms string  gid,
string  playerID,
string  commsID
 

This method associates a specific comms service with a specific player within a specific game. It also determines whether this SecurePlay library comms service will relay messages to that player.

Parameters:
gid string - game id to which the players and comms will be set
playerID string - id of the player to be set
commsID string - id of th comms to be set
Returns:
bool: TRUE, if successful, FALSE, if not

bool SecurePlayClass::APIsetRelay SPRelayInterface relay  ) 
 

Activate Relay.

Parameters:
relay SPRelayInterface*
Returns:
bool - true if activated.

bool SecurePlayClass::APIsetSOSLicenseInfo string  pocname,
string  company,
string  siteURL,
string  email
 

This method is the courtesy licensee information for Simple Open Source licensees. It provides basic information to a user or viewer of the application that the application follows the Simple Open Source License. See full license terms for further information.

Parameters:
pocname string - individual who represents the company
company string - company name.
siteURL string - company web site.
email string - company email.
Returns:
bool: TRUE, if successful, FALSE, if not

bool SecurePlayClass::checkLicense  ) 
 

This Public Method is used to verify that the SecurePlay license information is provided completely and properly.

Returns:
bool: TRUE, if license information is set properly. FALSE, if not

string SecurePlayClass::getCompany  ) 
 

Getter function that returns the property: company

Returns:
string

SPLogInterface * SecurePlayClass::getDefaultLog  ) 
 

Returns default Log.

Returns:
SPLogInterface* - default Log.

SPSecurityManagerInterface * SecurePlayClass::getDefaultSecurityManager  ) 
 

Returns default Security Manager.

Returns:
SPSSecurityManagerClass* - default Security Manager.

string SecurePlayClass::getEmail  ) 
 

Getter function that returns the property: email

Returns:
string

string SecurePlayClass::getPocname  ) 
 

Getter function that returns the property: pocname

Returns:
string - the individual who is the contact for the SecurePlay license for use of the library.

map< string, SPAbstractCommsInterface * > SecurePlayClass::getPrcommsServicesList  ) 
 

Getter function that returns the property: prcommsServicesList

Returns:
map<string, SPAbstractCommsInterface*>

map< string, SPGameInterface * > SecurePlayClass::getPrgamesList  ) 
 

Getter function that returns the property: prgamesList

Returns:
map<string, SPGameInterface*>

map< string, SPPlayerInterface * > SecurePlayClass::getPrplayersList  ) 
 

Getter function that returns the property: prplayersList

Returns:
prplayersList - SPHashtable

string SecurePlayClass::getSiteURL  ) 
 

Getter function that returns the property: siteURL

Returns:
string

string SecurePlayClass::getSPLicenseKey  ) 
 

Getter function that returns the property: SPLicenseKey

Returns:
string

string SecurePlayClass::getSPSerialNumber  ) 
 

Getter function that returns the property: SPSerialNumber

Returns:
string

bool SecurePlayClass::isCommsIncluded string  cid  ) 
 

This method returns a bool TRUE if there is a comms service object specified by the indicated Comms ID is included in the Library instance.

Parameters:
cid string - the comms id to be checked
Returns:
bool: TRUE, if successful, FALSE, if not successful

bool SecurePlayClass::isGameIncluded string  gid  ) 
 

This method returns a bool TRUE if there is a game object specified by the indicated Game ID is included in the Library instance.

Parameters:
gid string - the game id to be checked
Returns:
bool: TRUE, if successful, FALSE, if not successful

bool SecurePlayClass::isInitialized  ) 
 

Getter function that returns the property: initialized

Returns:
bool

bool SecurePlayClass::isPlayerIncluded string  pid  ) 
 

This method returns a bool TRUE if there is a player object specified by the indicated Player ID is included in the Library instance.

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

bool SecurePlayClass::isRelayActive  ) 
 

Returns status of relay for this library instance

Returns:
bool - true if activated

SecurePlayLibrary::SecurePlayClass::operator= const SecurePlayClass p  )  [inline, private]
 

Private = operator that protects this class from being copied.

bool SecurePlayClass::setDefaultLog SPLogInterface log  ) 
 

This method sets the default log to the specified log.

Parameters:
log SPLogInterface* - the new default log
Returns:
bool - true;

bool SecurePlayClass::setDefaultSecurityManager SPSecurityManagerInterface security  ) 
 

This method sets the default security manager.

Parameters:
security SPSecurityManagerInterface*
Returns:
bool - true;


Member Data Documentation

string SecurePlayLibrary::SecurePlayClass::company [private]
 

This is the company name of the authorized SecurePlay licensee.

SPLogInterface* SecurePlayLibrary::SecurePlayClass::defaultLog [private]
 

This Class holds the log for all games. Default log is set in the Default Constructor as Log One Class.

SPSecurityManagerInterface* SecurePlayLibrary::SecurePlayClass::defaultSecurityManager [private]
 

This Class holds the security manager for this class. Default Security Manager is set in the Default Constructor. The default Security manager is seclite, which only supports MD5.

string SecurePlayLibrary::SecurePlayClass::email [private]
 

This is the point of contact email for the SecurePlay product licensee.

const string SecurePlayLibrary::SecurePlayClass::extendedversion
 

Developer extended version.

bool SecurePlayLibrary::SecurePlayClass::initialized [private]
 

Flag that determines if the class has been initialized.

string SecurePlayLibrary::SecurePlayClass::pocname [private]
 

This is the individual who is the contact for the SecurePlay license for use of the library.

map<string, SPAbstractCommsInterface*> SecurePlayLibrary::SecurePlayClass::prcommsServicesList [private]
 

The commsServicesList holds a list of pointers to the various comms services objects (such as Flash Remoting, http, socket connection, SMS, etc.).

map<string, SPGameInterface*> SecurePlayLibrary::SecurePlayClass::prgamesList [private]
 

This class holds pointers to the various active game instances.

map<string, SPPlayerInterface*> SecurePlayLibrary::SecurePlayClass::prplayersList [private]
 

This private list holds the active player instances

SPRelayInterface* SecurePlayLibrary::SecurePlayClass::relay [private]
 

This supports relay for comms services for this class.

const string SecurePlayLibrary::SecurePlayClass::releaseversion
 

IT GlobalSecure release version.

string SecurePlayLibrary::SecurePlayClass::siteURL [private]
 

This is the URL of the Site that holds the SecurePlay license.

string SecurePlayLibrary::SecurePlayClass::SPLicenseKey [private]
 

This is the license key for the registered SecurePlay user. Removal of this key or any other license information is a violation of the SecurePlay license.

string SecurePlayLibrary::SecurePlayClass::SPSerialNumber [private]
 

This is the serial number of the SecurePlay licensee. Removal is a violation of the SecurePlay license.


The documentation for this class was generated from the following files: 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.