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.
Main Page | Class Hierarchy | Class List | Class Members

SecurePlayLibrary::SPUBinaryCodingClass Class Reference

#include <SPUBinaryCodingClass.h>

List of all members.

Static Public Member Functions

vector< SPbyte > SPserialize (SPMessageClass *message)
vector< SPbyte > SPserialize (vector< SPMessageClass * > messages)
vector< SPbyte > SPserializesingle (SPMessageClass *message)
vector< SPMessageClass * > SPdeserialize (vector< SPbyte > mess)
SPMessageClassSPsingledeserialize (vector< SPbyte > mess)
vector< SPbyte > encodestringArr (vector< string > strArr, int MAXElemLength, int MAXnumElem, int MAXarrLen)
vector< string > decodestringArr (vector< SPbyte > btArr, int MAXEntryLength, int MAXnumElem, int MAXarrLen)
vector< SPMessageClass * > addMessArrEl (vector< SPMessageClass * > messes, SPMessageClass *mess)
vector< SPbyte > SPserializeDouble (SPMessageClass *primary, SPMessageClass *alt)
vector< SPMessageClass * > SPdeserializeDouble (vector< SPbyte > mess)
vector< SPbyte > SPseralizeByteArr (vector< vector< SPbyte > * > SPbyteMessages)

Static Public Attributes

const int ONEMESSAGE = 1
const int RELAYMESSAGE = 4
const int BMAXMESSAGESLENGTH = 4
const int BMAXNUMMESSAGELENGTH = 1
const int BMAXSINGLEMESSLENGTH = 1
const int BMAXRECEIVERCOUNT = 1
const int BMAXRECEIVERSLENGTH = 1
const int BMAXNAMELENGTH = 1
const int BMAXMESSAGEBODYPARTS = 16
const int BMAXMESSAGEBODYPARTLENGTH = 1
const int BMAXMESSAGEBODYLENGTH = 16
const int BMAXSIGNLENGTH = 30


Detailed Description

This class is used to serialize and deserialize SPMessageClass objects into binary encoded messages.
Author:
IT GlobalSecure Inc.
See also:
SecurePlay License Information


Member Function Documentation

vector< SPMessageClass * > SPUBinaryCodingClass::addMessArrEl vector< SPMessageClass * >  messes,
SPMessageClass mess
[static]
 

This is a private method used only in multiple message deserialization method. It takes an array of SPAbstractMessageClasses and safely adds another one.

Parameters:
messes SPAbstractMessage[] - the array to which the new message will be added.
mess SPMessageClass - the message class to be added.
Returns:
messages - SPAbstractMessage[] - message array with the new added message.

vector< string > SPUBinaryCodingClass::decodestringArr vector< SPbyte >  btArr,
int  MAXEntryLength,
int  MAXnumElem,
int  MAXarrLen
[static]
 

This method deserializes a string array form byte array.

Parameters:
btArr byte[] - byte array to be deserialized.
Returns:
strArr - String[] - deserialized string array.

vector< SPbyte > SPUBinaryCodingClass::encodestringArr vector< string >  strArr,
int  MAXElemLength,
int  MAXnumElem,
int  MAXarrLen
[static]
 

This method is used to serialize a string array into byte array.

Parameters:
strArr String[] - the string array to be seralized
Returns:
strArrser - byte[] - serializedstring array.

vector< SPMessageClass * > SPUBinaryCodingClass::SPdeserialize vector< SPbyte >  mess  )  [static]
 

This method deserializes multiple messages from binary to Message ojects.

Parameters:
mess byte[] - byte array that contains the messages.
Returns:
messages - SPMessageClass[] - messages that were deserialized from the byte array.

vector< SPMessageClass * > SPUBinaryCodingClass::SPdeserializeDouble vector< SPbyte >  mess  )  [static]
 

Deserializes two messages for double message. Used only to recieve relay messages.

Parameters:
mess byte[] - serialized double message.
Returns:
SPMessageClass[]

vector< SPbyte > SPUBinaryCodingClass::SPseralizeByteArr vector< vector< SPbyte > * >  SPbyteMessages  )  [static]
 

This method serializes messages of byte arrays in to one big byte array.

Parameters:
byteMessages Vector - byte[] messages to be serialized.
Returns:
byte[]

vector< SPbyte > SPUBinaryCodingClass::SPserialize vector< SPMessageClass * >  messages  )  [static]
 

This method takes several instances of the SPMessageClass and serializes it into byte array.

Parameters:
messages SPMessageClass[] - a message to be seriealized into byte array
Returns:
mess - byte[] - the serialized byte array of all the messages.

vector< SPbyte > SPUBinaryCodingClass::SPserialize SPMessageClass message  )  [static]
 

vector< SPbyte > SPUBinaryCodingClass::SPserializeDouble SPMessageClass primary,
SPMessageClass alt
[static]
 

Serializes two messages for double message. Used only to send relay messages.

Parameters:
primary SPMessageClass - primary message.
alt SPMessageClass - alternative message.
Returns:
byte[]

vector< SPbyte > SPUBinaryCodingClass::SPserializesingle SPMessageClass message  )  [static]
 

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

Parameters:
message SPMessageClass - a message to be seriealized into binary array
Returns:
mess - byte[] - the serialized byte array of the message

SPMessageClass * SPUBinaryCodingClass::SPsingledeserialize vector< SPbyte >  mess  )  [static]
 

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

Parameters:
mess byte[] - serialized message object
Returns:
messobj - SPMessageClass - an instance of SPMessageClass


Member Data Documentation

const int SPUBinaryCodingClass::BMAXMESSAGEBODYLENGTH = 16 [static]
 

maximum message body length

const int SPUBinaryCodingClass::BMAXMESSAGEBODYPARTLENGTH = 1 [static]
 

maximum message body part length

const int SPUBinaryCodingClass::BMAXMESSAGEBODYPARTS = 16 [static]
 

maximum number of body parts

const int SPUBinaryCodingClass::BMAXMESSAGESLENGTH = 4 [static]
 

maximum total messages length

const int SPUBinaryCodingClass::BMAXNAMELENGTH = 1 [static]
 

number of characters lenght allowed in a name

const int SPUBinaryCodingClass::BMAXNUMMESSAGELENGTH = 1 [static]
 

maximum number of messages

const int SPUBinaryCodingClass::BMAXRECEIVERCOUNT = 1 [static]
 

number of receivers allowed

const int SPUBinaryCodingClass::BMAXRECEIVERSLENGTH = 1 [static]
 

maximum total recievers length

const int SPUBinaryCodingClass::BMAXSIGNLENGTH = 30 [static]
 

maximum signature length

const int SPUBinaryCodingClass::BMAXSINGLEMESSLENGTH = 1 [static]
 

maximum length of one messages

const int SPUBinaryCodingClass::ONEMESSAGE = 1 [static]
 

tags that are used to indicate wether the message contains multiple or single message

const int SPUBinaryCodingClass::RELAYMESSAGE = 4 [static]
 

tag used to indicate that the following two messages are doubple.


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.