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

SecurePlayLibrary::SPCLocalCommsFileClass Class Reference

#include <SPCLocalCommsFileClass.h>

Inheritance diagram for SecurePlayLibrary::SPCLocalCommsFileClass:

SecurePlayLibrary::SPAbstractCommsClass SecurePlayLibrary::SPAbstractCommsInterface List of all members.

Detailed Description

This class handles communications between multiple instances of the SecurePlay library on a single computer. This is an easy way to test or implement multiplayer games with a single design. This version uses files to exchange data rather than simply instances so that it can be used with different sessions or different languages, if message encodings are uniform.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Public Member Functions

 SPCLocalCommsFileClass ()
 ~SPCLocalCommsFileClass ()
string getCommsServiceType ()
bool prsend (string message)
bool APIactivate ()
bool APIdeactivate ()
void incoming (string message)
bool isCommsIncluded (string cid)
bool APIsetDirPath (string str)
bool APIconfigureCommService (int pollp)
bool initializetest ()
string getDcommsID ()
bool isActivated ()
long getPollingperiod ()
bool enableLog ()
bool disableLog ()

Public Attributes

const string extendedversion
const string releaseversion

Static Public Attributes

string dirpath = ""

Private Attributes

bool initialized
ThreadLib::ThreadID t1
bool activated
string DcommsID
long pollingperiod
bool logging


Constructor & Destructor Documentation

SPCLocalCommsFileClass::SPCLocalCommsFileClass  ) 
 

Default Constructor

SPCLocalCommsFileClass::~SPCLocalCommsFileClass  ) 
 

Default Destructor


Member Function Documentation

bool SPCLocalCommsFileClass::APIactivate  )  [virtual]
 

This method adds the Local Comms instance to the set of active Local Comms objects so it will receive incoming messages

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

Reimplemented from SecurePlayLibrary::SPAbstractCommsClass.

bool SPCLocalCommsFileClass::APIconfigureCommService int  pollp  ) 
 

Configures the comms service.

Parameters:
pollp int - the polling period to be scheduled to(in mlsec).
Returns:
bool: TRUE, if successful, FALSE, if not successful

bool SPCLocalCommsFileClass::APIdeactivate  )  [virtual]
 

This method removes the Local Comms instance from the set of active local Comms objects so it can no longer send or receive messages NOTE: Deactivate for threads does not actually delete the thread.

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

Reimplemented from SecurePlayLibrary::SPAbstractCommsClass.

bool SPCLocalCommsFileClass::APIsetDirPath string  str  ) 
 

This method sets the directory path for the various local comms classes that communicate via shared files

Parameters:
str - proposed directory path
Returns:
bool - true, if successful

bool SPCLocalCommsFileClass::disableLog  ) 
 

bool SPCLocalCommsFileClass::enableLog  ) 
 

string SPCLocalCommsFileClass::getCommsServiceType  )  [virtual]
 

This method gets the comms service type

Returns:
"local"

Reimplemented from SecurePlayLibrary::SPAbstractCommsClass.

string SPCLocalCommsFileClass::getDcommsID  ) 
 

Gets the comms id of this CommsFile Class.

Returns:
string;

long SPCLocalCommsFileClass::getPollingperiod  ) 
 

Gets the period in in milliseconds in which the comms pulls files.

Returns:
long: pull period.

void SPCLocalCommsFileClass::incoming string  message  ) 
 

This method handles incoming messages and passes them on for processing by the various games associated with the Local Comms instance.

Parameters:
message string - message

bool SPCLocalCommsFileClass::initializetest  ) 
 

Tests to see if everything is set for intialization

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

bool SPCLocalCommsFileClass::isActivated  ) 
 

Tests to see if this comms is activated.

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

bool SPCLocalCommsFileClass::isCommsIncluded string  cid  ) 
 

Checks to see if the Comms id specified is already included.

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

bool SPCLocalCommsFileClass::prsend string  message  )  [virtual]
 

This method sends messages to each of the registered Local Comms instances

Parameters:
message String - the message to be sent.
Returns:
bool - true, if successful

Reimplemented from SecurePlayLibrary::SPAbstractCommsClass.


Member Data Documentation

bool SecurePlayLibrary::SPCLocalCommsFileClass::activated [private]
 

Flag for activated or deactivated

string SecurePlayLibrary::SPCLocalCommsFileClass::DcommsID [private]
 

The Comms id

string SecurePlayLibrary::SPCLocalCommsFileClass::dirpath = "" [static]
 

This is the directory path for the shared local comms

const string SecurePlayLibrary::SPCLocalCommsFileClass::extendedversion
 

Developer extended version.

bool SecurePlayLibrary::SPCLocalCommsFileClass::initialized [private]
 

Flag for initialized or not

bool SecurePlayLibrary::SPCLocalCommsFileClass::logging [private]
 

long SecurePlayLibrary::SPCLocalCommsFileClass::pollingperiod [private]
 

this holds the default update interval - this is needed to handle

const string SecurePlayLibrary::SPCLocalCommsFileClass::releaseversion
 

IT GlobalSecure release version.

ThreadLib::ThreadID SecurePlayLibrary::SPCLocalCommsFileClass::t1 [private]
 

The thread that carries the instances of this class.


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.