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

SPUBinaryCodingClass.h File Reference

#include "SPMessageClass.h"
#include "SPGameClass.h"
#include "SPUtil.h"

Namespaces

namespace  SecurePlayLibrary

Functions

vector< byteSPUBserialize (vector< SPMessageClass * > messages)
vector< byteSPUBserializesingle (SPMessageClass *message)
vector< byteSPUBencodeStringArr (vector< string > strArr, int MAXElemLength, int MAXnumElem, int MAXarrLen)
SPMessageClass * SPUBsingledeserialize (vector< byte > mess)
vector< string > SPUBdecodeStringArr (vector< byte > btArr, int MAXEntryLength, int MAXnumElem, int MAXarrLen)
vector< SPMessageClass * > SPUBaddMessArrEl (vector< SPMessageClass * > messes, SPMessageClass *mess)
vector< byteSPUBserialize (SPMessageClass *message)
vector< SPMessageClass * > SPUBdeserialize (vector< byte > mess)

Variables

const int ONEMESSAGE = 1
const int MULTIMESSAGE = 2
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


Function Documentation

vector< SPMessageClass * > SecurePlayLibrary::SPUBaddMessArrEl vector< SPMessageClass * >  messes,
SPMessageClass *  mess
 

This is a private method used only in multiple message deserialization method. It takes an array of SPMessageClasses 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 > SecurePlayLibrary::SPUBdecodeStringArr vector< byte btArr,
int  MAXEntryLength,
int  MAXnumElem,
int  MAXarrLen
 

This method deserializes a string array form byte array.

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

vector<SPMessageClass*> SPUBdeserialize vector< byte mess  ) 
 

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< byte > SecurePlayLibrary::SPUBencodeStringArr vector< string >  strArr,
int  MAXElemLength,
int  MAXnumElem,
int  MAXarrLen
 

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<byte> SPUBserialize SPMessageClass *  message  ) 
 

vector< byte > SecurePlayLibrary::SPUBserialize vector< SPMessageClass * >  messages  ) 
 

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< byte > SecurePlayLibrary::SPUBserializesingle SPMessageClass *  message  ) 
 

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 * SecurePlayLibrary::SPUBsingledeserialize vector< byte mess  ) 
 

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

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


Variable Documentation

const int SecurePlayLibrary::BMAXMESSAGEBODYLENGTH = 16
 

maximum message body length

const int SecurePlayLibrary::BMAXMESSAGEBODYPARTLENGTH = 1
 

maximum message body part length

const int SecurePlayLibrary::BMAXMESSAGEBODYPARTS = 16
 

maximum number of body parts

const int SecurePlayLibrary::BMAXMESSAGESLENGTH = 4
 

maximum total messages length

const int SecurePlayLibrary::BMAXNAMELENGTH = 1
 

number of characters lenght allowed in a name

const int SecurePlayLibrary::BMAXNUMMESSAGELENGTH = 1
 

maximum number of messages

const int SecurePlayLibrary::BMAXRECEIVERCOUNT = 1
 

number of receivers allowed

const int SecurePlayLibrary::BMAXRECEIVERSLENGTH = 1
 

maximum total recievers length

const int SecurePlayLibrary::BMAXSIGNLENGTH = 30
 

maximum signature length

const int SecurePlayLibrary::BMAXSINGLEMESSLENGTH = 1
 

maximum length of one messages

const int SecurePlayLibrary::MULTIMESSAGE = 2
 

const int SecurePlayLibrary::ONEMESSAGE = 1
 

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

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.