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

SecurePlayLibrary::SPAbstractCommsClass Class Reference

#include <SPAbstractCommsClass.h>

Inheritance diagram for SecurePlayLibrary::SPAbstractCommsClass:

SecurePlayLibrary::SPAbstractCommsInterface SecurePlayLibrary::SPCLocalCommsClass SecurePlayLibrary::SPCLocalCommsFileClass List of all members.

Detailed Description

This is the SuperClass for comms services classes.
Author:
IT GlobaLSecure
See also:
SecurePlay License Information


Public Member Functions

 SPAbstractCommsClass ()
 ~SPAbstractCommsClass ()
virtual bool setcommsID (string cid)
virtual string getCommsServiceType ()
virtual bool addGame (string gid, SPCommsManagerCommsInterface *gamcomobj)
virtual bool removeGame (string gid)
virtual bool APIconfigureCommService ()
virtual bool addPlayer (string pid, string gid)
virtual bool removePlayer (string pid, string gid)
virtual bool prsend (string message)
virtual void incoming ()
virtual bool prreceive (string message)
virtual int includedPlayerCount (vector< string > playerarray, string gid)
virtual int sendMessage (SPMessageClass *clearmessage, SPMessageClass *alternatemessage)
virtual int sendMessage (vector< string > receivers, SPMessageClass *clearmessage, SPMessageClass *alternatemessage)
virtual bool APIactivate ()
virtual bool APIdeactivate ()
virtual void logError ()
virtual string getCommsID ()
virtual string SPserialize (SPMessageClass *message)
virtual vector< SPMessageClass * > SPdeserialize (string message)
virtual map< string, vector<
string > * > 
getGameplayerList ()
virtual vector< string > getInternalGameIDList ()
virtual map< string, SPCommsManagerCommsInterface * > getPrinternalGameList ()
virtual bool isGameInternal (string gid)
virtual void processincoming (SPMessageClass *inmess)

Public Attributes

string commstype

Private Attributes

string commsID
vector< string > internalGameIDList
map< string, vector< string > * > gameplayerList
map< string, SPCommsManagerCommsInterface * > printernalGameList


Constructor & Destructor Documentation

SPAbstractCommsClass::SPAbstractCommsClass  ) 
 

Default Constructor.

SPAbstractCommsClass::~SPAbstractCommsClass  ) 
 

Default Destructor


Member Function Documentation

bool SPAbstractCommsClass::addGame string  gid,
SPCommsManagerCommsInterface gamcomobj
[virtual]
 

This method adds an internal game to a specific comms service. The connection is to the SPComms class associated with the game to allow incoming messages to be serviced.

Parameters:
gid String - game id of the game
gamcomobj SPCommsManagerClass - comms to be added to the game
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

bool SPAbstractCommsClass::addPlayer string  pid,
string  gid
[virtual]
 

This method adds a player ID of a remote player serviced by this comm service

Parameters:
pid String - player to added.
gid String - the game id to which the player is to be added.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

bool SPAbstractCommsClass::APIactivate  )  [virtual]
 

OPTIONAL - This is a shell method to trigger the activation of a comms service, if necessary.

Returns:
true - Boolean: TRUE, if successful, FALSE, if not.

Reimplemented in SecurePlayLibrary::SPCLocalCommsClass, and SecurePlayLibrary::SPCLocalCommsFileClass.

bool SPAbstractCommsClass::APIconfigureCommService  )  [virtual]
 

This method configures a comm service instance. The parameters are variable depending on the specific service. (this is a shell method It returns true if successful, false, if not.)

Returns:
true - Boolean: TRUE, if successful, FALSE, if not

bool SPAbstractCommsClass::APIdeactivate  )  [virtual]
 

OPTIONAL - This shell method is used to deactivate a comms service once it is no longer needed. Depending on the comms service, this method may not be necessary

Returns:
true - Boolean: TRUE, if successful, FALSE, if not.

Reimplemented in SecurePlayLibrary::SPCLocalCommsClass, and SecurePlayLibrary::SPCLocalCommsFileClass.

string SPAbstractCommsClass::getCommsID  )  [virtual]
 

Getter function that returns the property: commsID

Returns:
commsid - String - the comms id.

Implements SecurePlayLibrary::SPAbstractCommsInterface.

string SPAbstractCommsClass::getCommsServiceType  )  [virtual]
 

This method returns a unique identifier for the type of comms service instance.

Returns:
"abstract" - String - unique identifier for type of comms service

Implements SecurePlayLibrary::SPAbstractCommsInterface.

Reimplemented in SecurePlayLibrary::SPCLocalCommsFileClass.

map< string, vector< string > * > SPAbstractCommsClass::getGameplayerList  )  [virtual]
 

Getter function that returns the property: gameplayerList

Returns:
gameplayerList - Hashtable

Implements SecurePlayLibrary::SPAbstractCommsInterface.

vector< string > SPAbstractCommsClass::getInternalGameIDList  )  [virtual]
 

Getter function that returns the property: internalGameIDList

Returns:
internalGameIDList - String[]

Implements SecurePlayLibrary::SPAbstractCommsInterface.

map< string, SPCommsManagerCommsInterface * > SPAbstractCommsClass::getPrinternalGameList  )  [virtual]
 

Getter function that returns the property: printernalGameList

Returns:
printernalGameList - Hashtable

Implements SecurePlayLibrary::SPAbstractCommsInterface.

int SPAbstractCommsClass::includedPlayerCount vector< string >  playerarray,
string  gid
[virtual]
 

This method returns a number based on the input array to indicate how many of the input array's player IDs are included in the comms service playerIDList

Parameters:
playerarray String[] - player id list
gid String - the game id
Returns:
int - the number of players supported by the Comms Service in the input playerID array.

void SPAbstractCommsClass::incoming  )  [virtual]
 

This is a shell method placeholder for the actual processing of incoming data/datastreams/messages from a network.

bool SPAbstractCommsClass::isGameInternal string  gid  )  [virtual]
 

This method returns whether a game is handled internally by a comms service

Parameters:
gid string - game id
Returns:
bool - True if game is internal and supported by Comms Service

Implements SecurePlayLibrary::SPAbstractCommsInterface.

void SPAbstractCommsClass::logError  )  [virtual]
 

This is a shell for future error log.

void SPAbstractCommsClass::processincoming SPMessageClass inmess  )  [virtual]
 

bool SPAbstractCommsClass::prreceive string  message  )  [virtual]
 

This standard method handles incoming serialized messages that have been separated out of incoming data streams by the incoming method. It parses them into Message Objects and passes them on to the Game Instance.

Parameters:
message String - the incoming message
Returns:
result - Boolean: TRUE, if successfully handled, FALSE, if not.

bool SPAbstractCommsClass::prsend string  message  )  [virtual]
 

This is a shell method for the actual transmission of a serialized message over a network using a specific communications transport.

Parameters:
message String - the message to be sent
Returns:
true - Boolean: TRUE, if successful, FALSE, if not.

Reimplemented in SecurePlayLibrary::SPCLocalCommsClass, and SecurePlayLibrary::SPCLocalCommsFileClass.

bool SPAbstractCommsClass::removeGame string  gid  )  [virtual]
 

This method removes the association of a game with the comms service. NOTE: actually the association that is removed is with the game instance's SPCommsManager class instance.

Parameters:
gid String - game id to be removed
Returns:
reslut - Boolean: TRUE, if successful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

bool SPAbstractCommsClass::removePlayer string  pid,
string  gid
[virtual]
 

This method removes a player from the list of remote players served by this comm service.

Parameters:
pid String - player to be removed
gid String - game id from which the player is to removed.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

int SPAbstractCommsClass::sendMessage vector< string >  receivers,
SPMessageClass clearmessage,
SPMessageClass alternatemessage
[virtual]
 

This method takes the message and sends it over the network, if they are served by this comms service. This method is depreciated and will be removed in a future version of the software

Parameters:
receivers String[] - array of playerIDs
clearmessage SPMessageClass - message for receivers
alternatemessage SPMessageClass - message or other game players
Returns:
integer - int - Number of remote players that were handled by this comm service for the message

Implements SecurePlayLibrary::SPAbstractCommsInterface.

int SPAbstractCommsClass::sendMessage SPMessageClass clearmessage,
SPMessageClass alternatemessage
[virtual]
 

This method takes the message and sends it over the network, if they are served by this comms service.

Parameters:
receivers String[] - array of playerIDs
clearmessage SPMessageClass - message for receivers
alternatemessage SPMessageClass - message or other game players
Returns:
integer - int - Number of remote players that were handled by this comm service for the message

Implements SecurePlayLibrary::SPAbstractCommsInterface.

bool SPAbstractCommsClass::setcommsID string  cid  )  [virtual]
 

This method sets the internal ID for a comms service if it has not been set. NOTE, this ID is not the public, network, or other ID for the communications service, but simply an internal handler.

Parameters:
cid String - comms id to be set.
Returns:
result - Boolean: TRUE, if succesful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

vector< SPMessageClass * > SPAbstractCommsClass::SPdeserialize string  message  )  [virtual]
 

This method takes a serialized messagestring and turns it into an instance of the SPMessageClass

Parameters:
message String - serialized message object
Returns:
messobj - SPMessageClass - an instance of SPMessageClass

string SPAbstractCommsClass::SPserialize SPMessageClass message  )  [virtual]
 

This method takes an instance of the SPMessageClass and serializes it into a string.

Parameters:
message SPMessageClass - a message to be seriealized into a string
Returns:
mstring - String - the serialized string of the message


Member Data Documentation

string SecurePlayLibrary::SPAbstractCommsClass::commsID [private]
 

This is the local handle for uniquely identifying a comms service to game instances. Different comms services may be based on the same object to have different configurations - depending on implementation.

string SecurePlayLibrary::SPAbstractCommsClass::commstype
 

Type of Comms Service

Reimplemented in SecurePlayLibrary::SPCLocalCommsClass.

map<string, vector<string>*> SecurePlayLibrary::SPAbstractCommsClass::gameplayerList [private]
 

This array holds the PlayerIDs of remote players that are supported by this comm service. A future upgrade is needed to track which players are associaed with which games.

vector<string> SecurePlayLibrary::SPAbstractCommsClass::internalGameIDList [private]
 

This array holds the gameIDs of the game instances that the comm service is actively supporting.

map<string, SPCommsManagerCommsInterface*> SecurePlayLibrary::SPAbstractCommsClass::printernalGameList [private]
 

This array holds the gameIDs of the game instances that the comm service is actively supporting.


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.