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

SecurePlayLibrary::SPCommsManagerClass Class Reference

#include <SPCommsManagerClass.h>

Inheritance diagram for SecurePlayLibrary::SPCommsManagerClass:

SecurePlayLibrary::SPCommsManagerCommsInterface List of all members.

Detailed Description

This class manages the communications and various communications services. It is essentially the "router" for the game data.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Public Member Functions

 SPCommsManagerClass ()
 ~SPCommsManagerClass ()
 SPCommsManagerClass (SPGameInterface *gameobj, SPLogInterface *log, SPSecurityManagerInterface *security)
void startCommsManager ()
bool setSecurityPolicy (bool sign, bool encrypt)
SPAbstractCommsInterfacegetComms (string commsID)
bool addComms (string commsID)
bool removeComms (string cid)
bool getEncryptPolicy ()
bool getSignaturePolicy ()
bool endGameComms ()
bool setPlayerComms (string pid, string cid, bool rflag)
void removePlayer (string playerID)
string UpdateCommsStatus ()
bool sendMessage (SPRootTransactionClass *sendingobject, string sender, vector< string > receivers, bool encryptflag, bool privateflag, string messagetype, vector< string > messagebody, vector< string > altmessage)
bool receiveMessage (SPMessageClass *incoming)
void logError ()
string getCommsStatus ()
bool isPlayerInternal (string pid)
SPGameInterfacegetGameinstance ()
vector< string > getInternalplayerIDList ()
SPLogInterfacegetMessagelog ()
map< string, string > getPlayerCommsList ()
vector< string > getPrcommsIDList ()
map< string, SPAbstractCommsInterface * > getPrcommsServList ()
string getGameID ()
SecurePlayClassgetSecurePlay ()
SPSecurityManagerInterfacegetSecurityManager ()
vector< bytegetHashText (string plainText, string algorithm)
vector< byteSPcreateBHash (string input, string gameid)
vector< byteSPcreateBSignature (string senderID, vector< byte > input, string gameid)
string SPcreateHash (string input, string gameid)
string SPcreateSignature (string senderID, string input, string gameid)
vector< string > SPdecrypt (vector< string > input, string senderID, vector< string > recvrs, string gameID, string messageID)
vector< string > SPencrypt (vector< string > input, string senderID, vector< string > recvrs, string gameID, string messageID)
string SPtransform (string input, string gameid)
bool SPverifySignature (vector< byte > sigToVerify, string senderID, vector< byte > testhash, string gameid)
bool SPverifySignature (string signature, string senderID, string testhash, string gameid)

Public Attributes

const string extendedversion
const string releaseversion

Private Member Functions

void configureCommsManager (SPGameInterface *gameobj, SPLogInterface *log, SPSecurityManagerInterface *security)
 SPCommsManagerClass (const SPCommsManagerClass &p)
 operator= (const SPCommsManagerClass &p)

Private Attributes

SPGameInterfacegameinstance
vector< string > prcommsIDList
map< string, SPAbstractCommsInterface * > prcommsServList
vector< string > internalplayerIDList
bool prencryptpolicy
bool prsignaturepolicy
SPLogInterfacemessagelog
map< string, string > playerCommsList
string prcommsstatus
SPSecurityManagerInterfacesecurityManager


Constructor & Destructor Documentation

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

Private Copy Constructor that protects this class from being copied.

SPCommsManagerClass::SPCommsManagerClass  ) 
 

Default Constructor.

SPCommsManagerClass::~SPCommsManagerClass  ) 
 

Default Destructor.

SPCommsManagerClass::SPCommsManagerClass SPGameInterface gameobj,
SPLogInterface log,
SPSecurityManagerInterface security
 

Overloaded Constructor.

Parameters:
gameobj SPGameInterface* - game instance object
log SPLogInterface* - log class associated with this comms manager.
security SPSecurityManagerInterface* - security manager associated with this comms manager.


Member Function Documentation

bool SPCommsManagerClass::addComms string  commsID  ) 
 

This method safely adds an available comms service to the game instance.

Parameters:
commsID string - comms service identifier string
Returns:
bool: TRUE, if successful, FALSE, if not.

void SPCommsManagerClass::configureCommsManager SPGameInterface gameobj,
SPLogInterface log,
SPSecurityManagerInterface security
[private]
 

This method configures this Comms Manager Class.

Parameters:
gameobj SPGameInterface* - game associated with this comms manager.
log SPLogInterface* - the log type for this game
security SPSecurityManagerInterface* - security for the game.

bool SPCommsManagerClass::endGameComms  ) 
 

This method safely ends the game comms session. NOTE: it will not stop incoming messages, only outgoing or relayed messages.

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

SPAbstractCommsInterface * SPCommsManagerClass::getComms string  commsID  ) 
 

This method safely returns one of the comms services objects associated with this game instance.

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

string SPCommsManagerClass::getCommsStatus  ) 
 

Gets the comms status.

Returns:
string - comms status

bool SPCommsManagerClass::getEncryptPolicy  ) 
 

This method returns the encryption policy flag.

Returns:
bool: TRUE, if flag set, FALSE, if not.

string SPCommsManagerClass::getGameID  ) 
 

Getter function that returns gameID associated with the Comms Manager Class

Returns:
string - game id this comms manager is associated with.

SPGameInterface * SPCommsManagerClass::getGameinstance  ) 
 

Getter function that returns the property:

Returns:
SPGameInterface* - game instance associated with this comms manager.

vector< byte > SPCommsManagerClass::getHashText string  plainText,
string  algorithm
 

This method gets the hashed string

Parameters:
plainText string - string to be hashed
algorithm string - The algorithm to use like MD2, MD5, SHA-1, etc.
Returns:
vector<byte> - the hashed string

vector< string > SPCommsManagerClass::getInternalplayerIDList  ) 
 

Getter function that returns the property: internalplayerIDList

Returns:
vector<string> - internal player id list.

SPLogInterface * SPCommsManagerClass::getMessagelog  ) 
 

Getter function that returns the property: messagelog

Returns:
SPLogInterface* - type of log class associated with this comms manager.

map< string, string > SPCommsManagerClass::getPlayerCommsList  ) 
 

Getter function that returns the property: playerCommsList

Returns:
map<string, string> - player comms list in this comms manager.

vector< string > SPCommsManagerClass::getPrcommsIDList  ) 
 

Getter function that returns the property: prcommsIDList

Returns:
vector<string> - comms id list that this comms manager manages.

map< string, SPAbstractCommsInterface * > SPCommsManagerClass::getPrcommsServList  ) 
 

Getter function that returns the property: prcommsServList

Returns:
map<string, SPAbstractCommsInterface*> - comms services list that this comms manager manages.

SecurePlayClass * SPCommsManagerClass::getSecurePlay  ) 
 

Getter function that returns SecurePlayClass associated with Comms Manager Class

Returns:
SecurePlayClass* - secureplay class this comms manager is associated with.

SPSecurityManagerInterface * SPCommsManagerClass::getSecurityManager  ) 
 

Getter function that returns Security Manager associated with Comms Manager Class

Returns:
SPSecurityManagerInterface* - security manager this comms manager is associated with.

bool SPCommsManagerClass::getSignaturePolicy  ) 
 

This method returns the Signature Policy flag for the game instance.

Returns:
bool, TRUE, if flag set, FALSE, if not.

bool SPCommsManagerClass::isPlayerInternal string  pid  ) 
 

Checks to see if the player is internal to the game.

Parameters:
pid string - the player id
Returns:
bool - TRUE: if internal, FALSE: if not:

void SPCommsManagerClass::logError  ) 
 

This is a shell function for future use.

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

Private = operator that protects this class from being copied.

bool SPCommsManagerClass::receiveMessage SPMessageClass incoming  )  [virtual]
 

This method safely receives and routes incoming messages. Only proper, valid messages will be sent on to transactions for processing.

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

Implements SecurePlayLibrary::SPCommsManagerCommsInterface.

bool SPCommsManagerClass::removeComms string  cid  ) 
 

This method safely removes comms service from the game instance.

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

void SPCommsManagerClass::removePlayer string  playerID  ) 
 

This method safely removes a player from the game instance's comms.

Parameters:
playerID string - id of the player to be removed

bool SPCommsManagerClass::sendMessage SPRootTransactionClass sendingobject,
string  sender,
vector< string >  receivers,
bool  encryptflag,
bool  privateflag,
string  messagetype,
vector< string >  messagebody,
vector< string >  altmessage
 

This method manages actually sending messages to other game instances via communication services objects. Also, for private messages, it sends an alternate message to the parties not recieving the main message.

Parameters:
sendingobject SPRootTransactionClass* - the object that sent the message.
sender string - id of the sender
receivers vector<string> - ids of the recievers of the message
encryptflag bool - encryption flag
privateflag bool - private flag
messagetype string - the type of message
messagebody vector<string> - the message body
altmessage vector<string> - alternative message
Returns:
bool: TRUE, if successful, FALSE, if not.

bool SPCommsManagerClass::setPlayerComms string  pid,
string  cid,
bool  rflag
 

This method safely associates a Player with a comms service and enables relay support for that player via that comms service.

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

bool SPCommsManagerClass::setSecurityPolicy bool  sign,
bool  encrypt
 

This method safely sets the security policy (encryption and signatures, for the game instance).

Parameters:
sign bool - Signature policy
encrypt bool - encryption policy
Returns:
bool: TRUE, if successful, FALSE, if not

vector< byte > SPCommsManagerClass::SPcreateBHash string  input,
string  gameid
 

See SPSecurityManagerInterface

vector< byte > SPCommsManagerClass::SPcreateBSignature string  senderID,
vector< byte input,
string  gameid
 

See SPSecurityManagerInterface

string SPCommsManagerClass::SPcreateHash string  input,
string  gameid
 

See SPSecurityManagerInterface

string SPCommsManagerClass::SPcreateSignature string  senderID,
string  input,
string  gameid
 

See SPSecurityManagerInterface

vector< string > SPCommsManagerClass::SPdecrypt vector< string >  input,
string  senderID,
vector< string >  recvrs,
string  gameID,
string  messageID
 

See SPSecurityManagerInterface

vector< string > SPCommsManagerClass::SPencrypt vector< string >  input,
string  senderID,
vector< string >  recvrs,
string  gameID,
string  messageID
 

See SPSecurityManagerInterface

string SPCommsManagerClass::SPtransform string  input,
string  gameid
 

See SPSecurityManagerInterface

bool SPCommsManagerClass::SPverifySignature string  signature,
string  senderID,
string  testhash,
string  gameid
 

See SPSecurityManagerInterface

bool SPCommsManagerClass::SPverifySignature vector< byte sigToVerify,
string  senderID,
vector< byte testhash,
string  gameid
 

See SPSecurityManagerInterface

void SPCommsManagerClass::startCommsManager  ) 
 

initialize the message log with licensing information

string SPCommsManagerClass::UpdateCommsStatus  ) 
 

This method reviews and updates the status of the comms instance.

Returns:
string - the updated prcommsstatus property


Member Data Documentation

const string SecurePlayLibrary::SPCommsManagerClass::extendedversion
 

Developer extended version.

SPGameInterface* SecurePlayLibrary::SPCommsManagerClass::gameinstance [private]
 

This is the object pointer for the game instance object associated with the comms object.

vector<string> SecurePlayLibrary::SPCommsManagerClass::internalplayerIDList [private]
 

This property holds the array of the IDs of the internal players

SPLogInterface* SecurePlayLibrary::SPCommsManagerClass::messagelog [private]
 

This property holds the pointer to the message log object.

map<string, string> SecurePlayLibrary::SPCommsManagerClass::playerCommsList [private]
 

This associative array holds the mapping between the various game players and their associated comms services IDs. NOTE: internal players have a virtual comms service "internal".

vector<string> SecurePlayLibrary::SPCommsManagerClass::prcommsIDList [private]
 

This property holds the array of comms services IDs. Comms services IDs are the public means to access a comms service object.

map<string, SPAbstractCommsInterface*> SecurePlayLibrary::SPCommsManagerClass::prcommsServList [private]
 

This associative array holds the mapping between the various comms services IDs and the comms services objects, themsselves.

string SecurePlayLibrary::SPCommsManagerClass::prcommsstatus [private]
 

This is a text string that provides the current status of the comms object.

bool SecurePlayLibrary::SPCommsManagerClass::prencryptpolicy [private]
 

This flag holds the encryption policy flag for the game instance.

bool SecurePlayLibrary::SPCommsManagerClass::prsignaturepolicy [private]
 

This flag holds the overall signature policy for the game.

const string SecurePlayLibrary::SPCommsManagerClass::releaseversion
 

IT GlobalSecure release version.

SPSecurityManagerInterface* SecurePlayLibrary::SPCommsManagerClass::securityManager [private]
 

Security Manager associated with this library.


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.