mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Fix line endings and tabs
This commit is contained in:
@ -1,22 +1,22 @@
|
||||
include_directories("../../CoreLib")
|
||||
include_directories("../../NucleusLib/inc")
|
||||
include_directories("../../NucleusLib")
|
||||
include_directories("../../PubUtilLib")
|
||||
|
||||
set(plNetMessage_SOURCES
|
||||
plNetMessage.cpp
|
||||
plNetMsgHelpers.cpp
|
||||
)
|
||||
|
||||
set(plNetMessage_HEADERS
|
||||
plNetCommonMessage.h
|
||||
plNetMessage.h
|
||||
plNetMessageCreatable.h
|
||||
plNetMsgHelpers.h
|
||||
plNetMsgVersion.h
|
||||
)
|
||||
|
||||
add_library(plNetMessage STATIC ${plNetMessage_SOURCES} ${plNetMessage_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${plNetMessage_SOURCES})
|
||||
source_group("Header Files" FILES ${plNetMessage_HEADERS})
|
||||
include_directories("../../CoreLib")
|
||||
include_directories("../../NucleusLib/inc")
|
||||
include_directories("../../NucleusLib")
|
||||
include_directories("../../PubUtilLib")
|
||||
|
||||
set(plNetMessage_SOURCES
|
||||
plNetMessage.cpp
|
||||
plNetMsgHelpers.cpp
|
||||
)
|
||||
|
||||
set(plNetMessage_HEADERS
|
||||
plNetCommonMessage.h
|
||||
plNetMessage.h
|
||||
plNetMessageCreatable.h
|
||||
plNetMsgHelpers.h
|
||||
plNetMsgVersion.h
|
||||
)
|
||||
|
||||
add_library(plNetMessage STATIC ${plNetMessage_SOURCES} ${plNetMessage_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${plNetMessage_SOURCES})
|
||||
source_group("Header Files" FILES ${plNetMessage_HEADERS})
|
||||
|
@ -1,83 +1,83 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#ifndef plNetCommonMessage_inc
|
||||
#define plNetCommonMessage_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "hsSafeRefCnt.h"
|
||||
|
||||
//
|
||||
// refcntable data
|
||||
//
|
||||
class plNetCommonMessageData : public hsSafeRefCnt
|
||||
{
|
||||
private:
|
||||
char *fData; // sent
|
||||
public:
|
||||
plNetCommonMessageData(char* d) : fData(d) {}
|
||||
~plNetCommonMessageData()
|
||||
{
|
||||
hsAssert(RefCnt()==1, "illegal refcnt");
|
||||
delete [] fData;
|
||||
}
|
||||
|
||||
char* GetData() const { return fData; }
|
||||
};
|
||||
|
||||
//
|
||||
// basic msg payload w/ refcntable data
|
||||
//
|
||||
class plNetCommonMessage
|
||||
{
|
||||
plNetCommonMessage(const plNetCommonMessage & other);
|
||||
private:
|
||||
plNetCommonMessageData* fMsgData;
|
||||
protected:
|
||||
UInt32 fLen; // sent
|
||||
public:
|
||||
plNetCommonMessage() : fLen(0),fMsgData(nil) {}
|
||||
virtual ~plNetCommonMessage() { hsRefCnt_SafeUnRef(fMsgData); }
|
||||
|
||||
// setters
|
||||
void SetData(char *d)
|
||||
{
|
||||
plNetCommonMessageData* n = d ? TRACKED_NEW plNetCommonMessageData(d) : nil;
|
||||
hsRefCnt_SafeAssign(fMsgData, n);
|
||||
hsRefCnt_SafeUnRef(n);
|
||||
}
|
||||
void SetMsgData(plNetCommonMessageData* d)
|
||||
{
|
||||
hsRefCnt_SafeAssign(fMsgData, d);
|
||||
}
|
||||
void SetLen(UInt32 l) { fLen=l; }
|
||||
|
||||
// getters
|
||||
char* GetData() const { return fMsgData ? fMsgData->GetData() : nil; }
|
||||
virtual UInt32 GetDataLen() { return fLen; }
|
||||
UInt32 GetLen() const { return fLen; }
|
||||
plNetCommonMessageData* GetMsgData() const { return fMsgData; }
|
||||
};
|
||||
#endif // plNetCommonMessage_inc
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#ifndef plNetCommonMessage_inc
|
||||
#define plNetCommonMessage_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "hsSafeRefCnt.h"
|
||||
|
||||
//
|
||||
// refcntable data
|
||||
//
|
||||
class plNetCommonMessageData : public hsSafeRefCnt
|
||||
{
|
||||
private:
|
||||
char *fData; // sent
|
||||
public:
|
||||
plNetCommonMessageData(char* d) : fData(d) {}
|
||||
~plNetCommonMessageData()
|
||||
{
|
||||
hsAssert(RefCnt()==1, "illegal refcnt");
|
||||
delete [] fData;
|
||||
}
|
||||
|
||||
char* GetData() const { return fData; }
|
||||
};
|
||||
|
||||
//
|
||||
// basic msg payload w/ refcntable data
|
||||
//
|
||||
class plNetCommonMessage
|
||||
{
|
||||
plNetCommonMessage(const plNetCommonMessage & other);
|
||||
private:
|
||||
plNetCommonMessageData* fMsgData;
|
||||
protected:
|
||||
UInt32 fLen; // sent
|
||||
public:
|
||||
plNetCommonMessage() : fLen(0),fMsgData(nil) {}
|
||||
virtual ~plNetCommonMessage() { hsRefCnt_SafeUnRef(fMsgData); }
|
||||
|
||||
// setters
|
||||
void SetData(char *d)
|
||||
{
|
||||
plNetCommonMessageData* n = d ? TRACKED_NEW plNetCommonMessageData(d) : nil;
|
||||
hsRefCnt_SafeAssign(fMsgData, n);
|
||||
hsRefCnt_SafeUnRef(n);
|
||||
}
|
||||
void SetMsgData(plNetCommonMessageData* d)
|
||||
{
|
||||
hsRefCnt_SafeAssign(fMsgData, d);
|
||||
}
|
||||
void SetLen(UInt32 l) { fLen=l; }
|
||||
|
||||
// getters
|
||||
char* GetData() const { return fMsgData ? fMsgData->GetData() : nil; }
|
||||
virtual UInt32 GetDataLen() { return fLen; }
|
||||
UInt32 GetLen() const { return fLen; }
|
||||
plNetCommonMessageData* GetMsgData() const { return fMsgData; }
|
||||
};
|
||||
#endif // plNetCommonMessage_inc
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,77 +1,77 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#ifndef plNetMsgCreatable_h
|
||||
#define plNetMsgCreatable_h
|
||||
|
||||
// kept separate for a reason
|
||||
|
||||
#include "pnFactory/plCreator.h"
|
||||
#include "plNetMessage.h"
|
||||
|
||||
// NON CREATABLES
|
||||
REGISTER_NONCREATABLE(plNetMessage);
|
||||
REGISTER_NONCREATABLE(plNetMsgObject);
|
||||
REGISTER_NONCREATABLE(plNetMsgStream);
|
||||
REGISTER_NONCREATABLE(plNetMsgRoomsList);
|
||||
REGISTER_NONCREATABLE(plNetMsgStreamedObject);
|
||||
REGISTER_NONCREATABLE(plNetMsgSharedState);
|
||||
|
||||
// HELPERS
|
||||
REGISTER_CREATABLE(plNetMsgStreamHelper);
|
||||
REGISTER_CREATABLE(plNetMsgObjectHelper);
|
||||
REGISTER_CREATABLE(plNetMsgObjectListHelper);
|
||||
REGISTER_CREATABLE(plNetMsgMemberInfoHelper);
|
||||
REGISTER_CREATABLE(plNetMsgMemberListHelper);
|
||||
REGISTER_CREATABLE(plNetMsgStreamableHelper);
|
||||
REGISTER_CREATABLE(plNetMsgReceiversListHelper);
|
||||
REGISTER_CREATABLE(plNetMsgCreatableHelper);
|
||||
|
||||
// CLIENT MSGS
|
||||
REGISTER_CREATABLE(plNetMsgGameStateRequest);
|
||||
REGISTER_CREATABLE(plNetMsgSDLState);
|
||||
REGISTER_CREATABLE(plNetMsgSDLStateBCast);
|
||||
REGISTER_CREATABLE(plNetMsgLoadClone);
|
||||
REGISTER_CREATABLE(plNetMsgPlayerPage);
|
||||
REGISTER_CREATABLE(plNetMsgGameMessage);
|
||||
REGISTER_CREATABLE(plNetMsgGameMessageDirected);
|
||||
REGISTER_CREATABLE(plNetMsgPagingRoom);
|
||||
REGISTER_CREATABLE(plNetMsgGroupOwner);
|
||||
REGISTER_CREATABLE(plNetMsgVoice);
|
||||
REGISTER_CREATABLE(plNetMsgTestAndSet);
|
||||
REGISTER_CREATABLE(plNetMsgGetSharedState);
|
||||
REGISTER_CREATABLE(plNetMsgObjStateRequest);
|
||||
REGISTER_CREATABLE(plNetMsgObjectUpdateFilter);
|
||||
REGISTER_CREATABLE(plNetMsgMembersListReq );
|
||||
REGISTER_CREATABLE(plNetMsgMembersList );
|
||||
REGISTER_CREATABLE(plNetMsgServerToClient);
|
||||
REGISTER_CREATABLE(plNetMsgMemberUpdate );
|
||||
REGISTER_CREATABLE(plNetMsgListenListUpdate);
|
||||
|
||||
REGISTER_CREATABLE(plNetMsgInitialAgeStateSent);
|
||||
REGISTER_CREATABLE(plNetMsgRelevanceRegions);
|
||||
|
||||
|
||||
#endif // plNetMsgCreatable_h
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#ifndef plNetMsgCreatable_h
|
||||
#define plNetMsgCreatable_h
|
||||
|
||||
// kept separate for a reason
|
||||
|
||||
#include "pnFactory/plCreator.h"
|
||||
#include "plNetMessage.h"
|
||||
|
||||
// NON CREATABLES
|
||||
REGISTER_NONCREATABLE(plNetMessage);
|
||||
REGISTER_NONCREATABLE(plNetMsgObject);
|
||||
REGISTER_NONCREATABLE(plNetMsgStream);
|
||||
REGISTER_NONCREATABLE(plNetMsgRoomsList);
|
||||
REGISTER_NONCREATABLE(plNetMsgStreamedObject);
|
||||
REGISTER_NONCREATABLE(plNetMsgSharedState);
|
||||
|
||||
// HELPERS
|
||||
REGISTER_CREATABLE(plNetMsgStreamHelper);
|
||||
REGISTER_CREATABLE(plNetMsgObjectHelper);
|
||||
REGISTER_CREATABLE(plNetMsgObjectListHelper);
|
||||
REGISTER_CREATABLE(plNetMsgMemberInfoHelper);
|
||||
REGISTER_CREATABLE(plNetMsgMemberListHelper);
|
||||
REGISTER_CREATABLE(plNetMsgStreamableHelper);
|
||||
REGISTER_CREATABLE(plNetMsgReceiversListHelper);
|
||||
REGISTER_CREATABLE(plNetMsgCreatableHelper);
|
||||
|
||||
// CLIENT MSGS
|
||||
REGISTER_CREATABLE(plNetMsgGameStateRequest);
|
||||
REGISTER_CREATABLE(plNetMsgSDLState);
|
||||
REGISTER_CREATABLE(plNetMsgSDLStateBCast);
|
||||
REGISTER_CREATABLE(plNetMsgLoadClone);
|
||||
REGISTER_CREATABLE(plNetMsgPlayerPage);
|
||||
REGISTER_CREATABLE(plNetMsgGameMessage);
|
||||
REGISTER_CREATABLE(plNetMsgGameMessageDirected);
|
||||
REGISTER_CREATABLE(plNetMsgPagingRoom);
|
||||
REGISTER_CREATABLE(plNetMsgGroupOwner);
|
||||
REGISTER_CREATABLE(plNetMsgVoice);
|
||||
REGISTER_CREATABLE(plNetMsgTestAndSet);
|
||||
REGISTER_CREATABLE(plNetMsgGetSharedState);
|
||||
REGISTER_CREATABLE(plNetMsgObjStateRequest);
|
||||
REGISTER_CREATABLE(plNetMsgObjectUpdateFilter);
|
||||
REGISTER_CREATABLE(plNetMsgMembersListReq );
|
||||
REGISTER_CREATABLE(plNetMsgMembersList );
|
||||
REGISTER_CREATABLE(plNetMsgServerToClient);
|
||||
REGISTER_CREATABLE(plNetMsgMemberUpdate );
|
||||
REGISTER_CREATABLE(plNetMsgListenListUpdate);
|
||||
|
||||
REGISTER_CREATABLE(plNetMsgInitialAgeStateSent);
|
||||
REGISTER_CREATABLE(plNetMsgRelevanceRegions);
|
||||
|
||||
|
||||
#endif // plNetMsgCreatable_h
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,327 +1,327 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#ifndef PL_NET_MSG_HELPERS_inc
|
||||
#define PL_NET_MSG_HELPERS_inc
|
||||
|
||||
//
|
||||
// These are not messages per se, but helper classes which are used
|
||||
// in to avoid multiple derivation by net messages.
|
||||
//
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "hsUtils.h"
|
||||
#include "hsStream.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "pnNetCommon/pnNetCommon.h"
|
||||
#include "pnFactory/plCreatable.h"
|
||||
#include "pnKeyedObject/plUoid.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
#include "plUnifiedTime/plUnifiedTime.h"
|
||||
#include "plNetCommon/plClientGuid.h"
|
||||
#include <algorithm>
|
||||
|
||||
class plKey;
|
||||
class hsStream;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// plNetMsgStreamableHelper
|
||||
// Will peek/poke anything derived from hsStreamable
|
||||
|
||||
class plNetMsgStreamableHelper : public plCreatable
|
||||
{
|
||||
hsStreamable * fObject;
|
||||
public:
|
||||
plNetMsgStreamableHelper():fObject(nil){}
|
||||
plNetMsgStreamableHelper(hsStreamable * object):fObject(object){}
|
||||
plNetMsgStreamableHelper & operator =(hsStreamable * value);
|
||||
operator hsStreamable *() const { return fObject;}
|
||||
operator const hsStreamable *() const { return fObject;}
|
||||
CLASSNAME_REGISTER( plNetMsgStreamableHelper );
|
||||
GETINTERFACE_ANY(plNetMsgStreamableHelper, plCreatable);
|
||||
void SetObject(hsStreamable * object) { fObject=object;}
|
||||
hsStreamable * GetObject() const { return fObject;}
|
||||
int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// plNetMsgCreatableHelper
|
||||
// Will peek/poke anything derived from plCreatable.
|
||||
// Will create the object upon read if it hasn't been set by SetObject().
|
||||
// When helper goes away, object will be unref-ed if it was created by
|
||||
// the helper, so if you GetObject() and want to keep it longer than the
|
||||
// lifetime of the helper, ref it.
|
||||
|
||||
class plNetMsgCreatableHelper : public plCreatable
|
||||
{
|
||||
plCreatable * fCreatable;
|
||||
bool fWeCreatedIt;
|
||||
public:
|
||||
plNetMsgCreatableHelper(plCreatable * object = nil);
|
||||
~plNetMsgCreatableHelper();
|
||||
plNetMsgCreatableHelper & operator =(plCreatable * value);
|
||||
operator plCreatable*();
|
||||
operator const plCreatable*();
|
||||
CLASSNAME_REGISTER( plNetMsgCreatableHelper );
|
||||
GETINTERFACE_ANY(plNetMsgCreatableHelper, plCreatable);
|
||||
void SetObject(plCreatable * object);
|
||||
plCreatable * GetObject();
|
||||
int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Net msg helper class for a stream buffer of some type (saveState, voice, plMessage...)
|
||||
//
|
||||
class plNetMsgStreamHelper : public plCreatable
|
||||
{
|
||||
private:
|
||||
enum ContentsFlags
|
||||
{
|
||||
kUncompressedSize,
|
||||
kStreamBuf,
|
||||
kStreamLen,
|
||||
kCompressionType,
|
||||
};
|
||||
protected:
|
||||
UInt32 fUncompressedSize;
|
||||
Int16 fStreamType; // set to creatable type, not read/written, gleaned from creatable stream
|
||||
UInt8* fStreamBuf;
|
||||
UInt32 fStreamLen;
|
||||
UInt8 fCompressionType; // see plNetMessage::CompressionType
|
||||
UInt32 fCompressionThreshold; // NOT WRITTEN
|
||||
|
||||
void IAllocStream(UInt32 len);
|
||||
|
||||
public:
|
||||
enum { kDefaultCompressionThreshold = 255 }; // bytes
|
||||
|
||||
plNetMsgStreamHelper();
|
||||
virtual ~plNetMsgStreamHelper() { delete [] fStreamBuf; }
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgStreamHelper );
|
||||
GETINTERFACE_ANY(plNetMsgStreamHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
// creatable ops
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr) { Peek(s); }
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr) { Poke(s); }
|
||||
|
||||
void ReadVersion(hsStream* s, hsResMgr* mgr);
|
||||
void WriteVersion(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
void Clear();
|
||||
|
||||
// copiers
|
||||
void CopyFrom(const plNetMsgStreamHelper* other);
|
||||
void CopyStream(hsStream* ssStream); // copies to fStream
|
||||
void CopyStream(Int32 len, const void* buf); // copies to fStream
|
||||
|
||||
// setters
|
||||
void SetCompressionType(UInt8 t) { fCompressionType=t; }
|
||||
void SetStreamLen(UInt32 l) { fStreamLen=l; }
|
||||
void SetStreamBuf(UInt8* b) { fStreamBuf=b; }
|
||||
void SetUncompressedSize(UInt32 s) { fUncompressedSize=s; }
|
||||
|
||||
// Getters
|
||||
UInt8 GetCompressionType() const { return fCompressionType; }
|
||||
Int16 GetStreamType() const { return fStreamType; }
|
||||
UInt32 GetStreamLen() const { return fStreamLen; }
|
||||
UInt8* GetStreamBuf() const { return fStreamBuf; }
|
||||
UInt32 GetUncompressedSize() const { return fUncompressedSize; }
|
||||
|
||||
bool Compress(int offset=2 /* skip 2 bytes as creatable index */ );
|
||||
bool Uncompress(int offset=2 /* skip 2 bytes as creatable index */ );
|
||||
bool IsCompressed() const;
|
||||
bool IsCompressable() const;
|
||||
UInt32 GetCompressionThreshold() const { return fCompressionThreshold; }
|
||||
void SetCompressionThreshold( UInt32 v ) { fCompressionThreshold=v; }
|
||||
};
|
||||
|
||||
//
|
||||
// Contains info about a scene object
|
||||
//
|
||||
class plNetMsgObjectHelper : public plCreatable
|
||||
{
|
||||
private:
|
||||
enum ContentFlags
|
||||
{
|
||||
kObjHelperUoid,
|
||||
};
|
||||
protected:
|
||||
// string names for debug purposes only
|
||||
plUoid fUoid;
|
||||
// update operator()= fxn when adding new members
|
||||
public:
|
||||
|
||||
plNetMsgObjectHelper() {}
|
||||
plNetMsgObjectHelper(const plKey key) { SetFromKey(key); }
|
||||
virtual ~plNetMsgObjectHelper() { }
|
||||
CLASSNAME_REGISTER( plNetMsgObjectHelper );
|
||||
GETINTERFACE_ANY(plNetMsgObjectHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
plNetMsgObjectHelper & operator =(const plNetMsgObjectHelper & other);
|
||||
|
||||
// setters
|
||||
hsBool SetFromKey(const plKey &key);
|
||||
void SetUoid(const plUoid &u) { fUoid=u; }
|
||||
|
||||
// getters
|
||||
const char* GetObjectName() const { return fUoid.GetObjectName(); }
|
||||
UInt32 GetPageID() const { return fUoid.GetLocation().GetSequenceNumber(); }
|
||||
const plUoid& GetUoid() const { return fUoid; }
|
||||
|
||||
void ReadVersion(hsStream* s, hsResMgr* mgr);
|
||||
void WriteVersion(hsStream* s, hsResMgr* mgr);
|
||||
};
|
||||
|
||||
//
|
||||
// Contains a list of info about scene objects.
|
||||
//
|
||||
class plNetMsgObjectListHelper : public plCreatable
|
||||
{
|
||||
protected:
|
||||
std::vector<plNetMsgObjectHelper*> fObjects;
|
||||
public:
|
||||
plNetMsgObjectListHelper() {}
|
||||
virtual ~plNetMsgObjectListHelper();
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgObjectListHelper );
|
||||
GETINTERFACE_ANY(plNetMsgObjectListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
void Reset();
|
||||
int GetNumObjects() const { return fObjects.size(); }
|
||||
plNetMsgObjectHelper* GetObject(int i) { return fObjects[i]; }
|
||||
void AddObject(plKey key) { fObjects.push_back(TRACKED_NEW plNetMsgObjectHelper(key)); }
|
||||
};
|
||||
|
||||
//
|
||||
// Contains a info about a net member.
|
||||
//
|
||||
class plNetMsgMemberInfoHelper : public plCreatable
|
||||
{
|
||||
protected:
|
||||
UInt32 fFlags;
|
||||
plUoid fAvatarUoid;
|
||||
plClientGuid fClientGuid;
|
||||
public:
|
||||
plNetMsgMemberInfoHelper();
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgMemberInfoHelper );
|
||||
GETINTERFACE_ANY( plNetMsgMemberInfoHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
const plClientGuid * GetClientGuid() const { return &fClientGuid; }
|
||||
plClientGuid * GetClientGuid() { return &fClientGuid; }
|
||||
|
||||
UInt32 GetFlags() const { return fFlags; }
|
||||
plUoid GetAvatarUoid() const { return fAvatarUoid; }
|
||||
|
||||
void SetFlags(UInt32 v) { fFlags=v; }
|
||||
void SetAvatarUoid(plUoid u) { fAvatarUoid=u; }
|
||||
};
|
||||
|
||||
//
|
||||
// Contains a info about a list of net members.
|
||||
// This is sent from server to client.
|
||||
//
|
||||
class plNetMsgMemberListHelper : public plCreatable
|
||||
{
|
||||
public:
|
||||
typedef std::vector<plNetMsgMemberInfoHelper*> MemberInfoHelperVec;
|
||||
struct MatchesPlayerID
|
||||
{
|
||||
UInt32 fID;
|
||||
MatchesPlayerID( UInt32 id ): fID( id ){}
|
||||
bool operator()( const plNetMsgMemberInfoHelper * mbr ) const
|
||||
{
|
||||
return ( mbr && mbr->GetClientGuid()->GetPlayerID()==fID );
|
||||
}
|
||||
};
|
||||
|
||||
protected:
|
||||
MemberInfoHelperVec fMembers;
|
||||
|
||||
public:
|
||||
plNetMsgMemberListHelper() {}
|
||||
virtual ~plNetMsgMemberListHelper();
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgMemberListHelper );
|
||||
GETINTERFACE_ANY( plNetMsgMemberListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
int GetNumMembers() const { return fMembers.size(); }
|
||||
const plNetMsgMemberInfoHelper* GetMember(int i) const { return fMembers[i]; }
|
||||
void AddMember(plNetMsgMemberInfoHelper* a) { fMembers.push_back(a); }
|
||||
const MemberInfoHelperVec * GetMembers() const { return &fMembers;}
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// Contains a list of other players (members).
|
||||
// This is commonly used to route p2p msgs to groups of players.
|
||||
// Sent client to server.
|
||||
//
|
||||
class plNetMsgReceiversListHelper : public plCreatable
|
||||
{
|
||||
protected:
|
||||
std::vector<UInt32> fPlayerIDList;
|
||||
public:
|
||||
plNetMsgReceiversListHelper() {}
|
||||
virtual ~plNetMsgReceiversListHelper() {}
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgReceiversListHelper );
|
||||
GETINTERFACE_ANY( plNetMsgReceiversListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
void Clear() { fPlayerIDList.clear(); }
|
||||
int GetNumReceivers() const { return fPlayerIDList.size(); }
|
||||
UInt32 GetReceiverPlayerID(int i) const { return fPlayerIDList[i]; }
|
||||
void AddReceiverPlayerID(UInt32 a) { fPlayerIDList.push_back(a); }
|
||||
bool RemoveReceiverPlayerID(UInt32 n); // returns true if found and removed
|
||||
};
|
||||
|
||||
|
||||
#endif // PL_NET_MSG__HELPERS_inc
|
||||
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#ifndef PL_NET_MSG_HELPERS_inc
|
||||
#define PL_NET_MSG_HELPERS_inc
|
||||
|
||||
//
|
||||
// These are not messages per se, but helper classes which are used
|
||||
// in to avoid multiple derivation by net messages.
|
||||
//
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "hsUtils.h"
|
||||
#include "hsStream.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "pnNetCommon/pnNetCommon.h"
|
||||
#include "pnFactory/plCreatable.h"
|
||||
#include "pnKeyedObject/plUoid.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
#include "plUnifiedTime/plUnifiedTime.h"
|
||||
#include "plNetCommon/plClientGuid.h"
|
||||
#include <algorithm>
|
||||
|
||||
class plKey;
|
||||
class hsStream;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// plNetMsgStreamableHelper
|
||||
// Will peek/poke anything derived from hsStreamable
|
||||
|
||||
class plNetMsgStreamableHelper : public plCreatable
|
||||
{
|
||||
hsStreamable * fObject;
|
||||
public:
|
||||
plNetMsgStreamableHelper():fObject(nil){}
|
||||
plNetMsgStreamableHelper(hsStreamable * object):fObject(object){}
|
||||
plNetMsgStreamableHelper & operator =(hsStreamable * value);
|
||||
operator hsStreamable *() const { return fObject;}
|
||||
operator const hsStreamable *() const { return fObject;}
|
||||
CLASSNAME_REGISTER( plNetMsgStreamableHelper );
|
||||
GETINTERFACE_ANY(plNetMsgStreamableHelper, plCreatable);
|
||||
void SetObject(hsStreamable * object) { fObject=object;}
|
||||
hsStreamable * GetObject() const { return fObject;}
|
||||
int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// plNetMsgCreatableHelper
|
||||
// Will peek/poke anything derived from plCreatable.
|
||||
// Will create the object upon read if it hasn't been set by SetObject().
|
||||
// When helper goes away, object will be unref-ed if it was created by
|
||||
// the helper, so if you GetObject() and want to keep it longer than the
|
||||
// lifetime of the helper, ref it.
|
||||
|
||||
class plNetMsgCreatableHelper : public plCreatable
|
||||
{
|
||||
plCreatable * fCreatable;
|
||||
bool fWeCreatedIt;
|
||||
public:
|
||||
plNetMsgCreatableHelper(plCreatable * object = nil);
|
||||
~plNetMsgCreatableHelper();
|
||||
plNetMsgCreatableHelper & operator =(plCreatable * value);
|
||||
operator plCreatable*();
|
||||
operator const plCreatable*();
|
||||
CLASSNAME_REGISTER( plNetMsgCreatableHelper );
|
||||
GETINTERFACE_ANY(plNetMsgCreatableHelper, plCreatable);
|
||||
void SetObject(plCreatable * object);
|
||||
plCreatable * GetObject();
|
||||
int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Net msg helper class for a stream buffer of some type (saveState, voice, plMessage...)
|
||||
//
|
||||
class plNetMsgStreamHelper : public plCreatable
|
||||
{
|
||||
private:
|
||||
enum ContentsFlags
|
||||
{
|
||||
kUncompressedSize,
|
||||
kStreamBuf,
|
||||
kStreamLen,
|
||||
kCompressionType,
|
||||
};
|
||||
protected:
|
||||
UInt32 fUncompressedSize;
|
||||
Int16 fStreamType; // set to creatable type, not read/written, gleaned from creatable stream
|
||||
UInt8* fStreamBuf;
|
||||
UInt32 fStreamLen;
|
||||
UInt8 fCompressionType; // see plNetMessage::CompressionType
|
||||
UInt32 fCompressionThreshold; // NOT WRITTEN
|
||||
|
||||
void IAllocStream(UInt32 len);
|
||||
|
||||
public:
|
||||
enum { kDefaultCompressionThreshold = 255 }; // bytes
|
||||
|
||||
plNetMsgStreamHelper();
|
||||
virtual ~plNetMsgStreamHelper() { delete [] fStreamBuf; }
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgStreamHelper );
|
||||
GETINTERFACE_ANY(plNetMsgStreamHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
// creatable ops
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr) { Peek(s); }
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr) { Poke(s); }
|
||||
|
||||
void ReadVersion(hsStream* s, hsResMgr* mgr);
|
||||
void WriteVersion(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
void Clear();
|
||||
|
||||
// copiers
|
||||
void CopyFrom(const plNetMsgStreamHelper* other);
|
||||
void CopyStream(hsStream* ssStream); // copies to fStream
|
||||
void CopyStream(Int32 len, const void* buf); // copies to fStream
|
||||
|
||||
// setters
|
||||
void SetCompressionType(UInt8 t) { fCompressionType=t; }
|
||||
void SetStreamLen(UInt32 l) { fStreamLen=l; }
|
||||
void SetStreamBuf(UInt8* b) { fStreamBuf=b; }
|
||||
void SetUncompressedSize(UInt32 s) { fUncompressedSize=s; }
|
||||
|
||||
// Getters
|
||||
UInt8 GetCompressionType() const { return fCompressionType; }
|
||||
Int16 GetStreamType() const { return fStreamType; }
|
||||
UInt32 GetStreamLen() const { return fStreamLen; }
|
||||
UInt8* GetStreamBuf() const { return fStreamBuf; }
|
||||
UInt32 GetUncompressedSize() const { return fUncompressedSize; }
|
||||
|
||||
bool Compress(int offset=2 /* skip 2 bytes as creatable index */ );
|
||||
bool Uncompress(int offset=2 /* skip 2 bytes as creatable index */ );
|
||||
bool IsCompressed() const;
|
||||
bool IsCompressable() const;
|
||||
UInt32 GetCompressionThreshold() const { return fCompressionThreshold; }
|
||||
void SetCompressionThreshold( UInt32 v ) { fCompressionThreshold=v; }
|
||||
};
|
||||
|
||||
//
|
||||
// Contains info about a scene object
|
||||
//
|
||||
class plNetMsgObjectHelper : public plCreatable
|
||||
{
|
||||
private:
|
||||
enum ContentFlags
|
||||
{
|
||||
kObjHelperUoid,
|
||||
};
|
||||
protected:
|
||||
// string names for debug purposes only
|
||||
plUoid fUoid;
|
||||
// update operator()= fxn when adding new members
|
||||
public:
|
||||
|
||||
plNetMsgObjectHelper() {}
|
||||
plNetMsgObjectHelper(const plKey key) { SetFromKey(key); }
|
||||
virtual ~plNetMsgObjectHelper() { }
|
||||
CLASSNAME_REGISTER( plNetMsgObjectHelper );
|
||||
GETINTERFACE_ANY(plNetMsgObjectHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
plNetMsgObjectHelper & operator =(const plNetMsgObjectHelper & other);
|
||||
|
||||
// setters
|
||||
hsBool SetFromKey(const plKey &key);
|
||||
void SetUoid(const plUoid &u) { fUoid=u; }
|
||||
|
||||
// getters
|
||||
const char* GetObjectName() const { return fUoid.GetObjectName(); }
|
||||
UInt32 GetPageID() const { return fUoid.GetLocation().GetSequenceNumber(); }
|
||||
const plUoid& GetUoid() const { return fUoid; }
|
||||
|
||||
void ReadVersion(hsStream* s, hsResMgr* mgr);
|
||||
void WriteVersion(hsStream* s, hsResMgr* mgr);
|
||||
};
|
||||
|
||||
//
|
||||
// Contains a list of info about scene objects.
|
||||
//
|
||||
class plNetMsgObjectListHelper : public plCreatable
|
||||
{
|
||||
protected:
|
||||
std::vector<plNetMsgObjectHelper*> fObjects;
|
||||
public:
|
||||
plNetMsgObjectListHelper() {}
|
||||
virtual ~plNetMsgObjectListHelper();
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgObjectListHelper );
|
||||
GETINTERFACE_ANY(plNetMsgObjectListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
void Reset();
|
||||
int GetNumObjects() const { return fObjects.size(); }
|
||||
plNetMsgObjectHelper* GetObject(int i) { return fObjects[i]; }
|
||||
void AddObject(plKey key) { fObjects.push_back(TRACKED_NEW plNetMsgObjectHelper(key)); }
|
||||
};
|
||||
|
||||
//
|
||||
// Contains a info about a net member.
|
||||
//
|
||||
class plNetMsgMemberInfoHelper : public plCreatable
|
||||
{
|
||||
protected:
|
||||
UInt32 fFlags;
|
||||
plUoid fAvatarUoid;
|
||||
plClientGuid fClientGuid;
|
||||
public:
|
||||
plNetMsgMemberInfoHelper();
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgMemberInfoHelper );
|
||||
GETINTERFACE_ANY( plNetMsgMemberInfoHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
const plClientGuid * GetClientGuid() const { return &fClientGuid; }
|
||||
plClientGuid * GetClientGuid() { return &fClientGuid; }
|
||||
|
||||
UInt32 GetFlags() const { return fFlags; }
|
||||
plUoid GetAvatarUoid() const { return fAvatarUoid; }
|
||||
|
||||
void SetFlags(UInt32 v) { fFlags=v; }
|
||||
void SetAvatarUoid(plUoid u) { fAvatarUoid=u; }
|
||||
};
|
||||
|
||||
//
|
||||
// Contains a info about a list of net members.
|
||||
// This is sent from server to client.
|
||||
//
|
||||
class plNetMsgMemberListHelper : public plCreatable
|
||||
{
|
||||
public:
|
||||
typedef std::vector<plNetMsgMemberInfoHelper*> MemberInfoHelperVec;
|
||||
struct MatchesPlayerID
|
||||
{
|
||||
UInt32 fID;
|
||||
MatchesPlayerID( UInt32 id ): fID( id ){}
|
||||
bool operator()( const plNetMsgMemberInfoHelper * mbr ) const
|
||||
{
|
||||
return ( mbr && mbr->GetClientGuid()->GetPlayerID()==fID );
|
||||
}
|
||||
};
|
||||
|
||||
protected:
|
||||
MemberInfoHelperVec fMembers;
|
||||
|
||||
public:
|
||||
plNetMsgMemberListHelper() {}
|
||||
virtual ~plNetMsgMemberListHelper();
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgMemberListHelper );
|
||||
GETINTERFACE_ANY( plNetMsgMemberListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
int GetNumMembers() const { return fMembers.size(); }
|
||||
const plNetMsgMemberInfoHelper* GetMember(int i) const { return fMembers[i]; }
|
||||
void AddMember(plNetMsgMemberInfoHelper* a) { fMembers.push_back(a); }
|
||||
const MemberInfoHelperVec * GetMembers() const { return &fMembers;}
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// Contains a list of other players (members).
|
||||
// This is commonly used to route p2p msgs to groups of players.
|
||||
// Sent client to server.
|
||||
//
|
||||
class plNetMsgReceiversListHelper : public plCreatable
|
||||
{
|
||||
protected:
|
||||
std::vector<UInt32> fPlayerIDList;
|
||||
public:
|
||||
plNetMsgReceiversListHelper() {}
|
||||
virtual ~plNetMsgReceiversListHelper() {}
|
||||
|
||||
CLASSNAME_REGISTER( plNetMsgReceiversListHelper );
|
||||
GETINTERFACE_ANY( plNetMsgReceiversListHelper, plCreatable);
|
||||
|
||||
virtual int Poke(hsStream* stream, UInt32 peekOptions=0);
|
||||
virtual int Peek(hsStream* stream, UInt32 peekOptions=0);
|
||||
|
||||
void Clear() { fPlayerIDList.clear(); }
|
||||
int GetNumReceivers() const { return fPlayerIDList.size(); }
|
||||
UInt32 GetReceiverPlayerID(int i) const { return fPlayerIDList[i]; }
|
||||
void AddReceiverPlayerID(UInt32 a) { fPlayerIDList.push_back(a); }
|
||||
bool RemoveReceiverPlayerID(UInt32 n); // returns true if found and removed
|
||||
};
|
||||
|
||||
|
||||
#endif // PL_NET_MSG__HELPERS_inc
|
||||
|
||||
|
@ -1,145 +1,145 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#ifndef plNetMsgVersion_h_inc
|
||||
#define plNetMsgVersion_h_inc
|
||||
|
||||
|
||||
// Changing the version number(s)? Make an entry in the corresponding log below.
|
||||
#define PLASMA2_NETMSG_MAJOR_VERSION 12
|
||||
#define PLASMA2_NETMSG_MINOR_VERSION 6
|
||||
/*--- Major Version Log ---
|
||||
# Date Who Comment
|
||||
2 10/05/01 eap Moved handling of VaultRequestData message from game server to lobby server
|
||||
3 10/09/01 ee Made Uoid changes that impact the net messages
|
||||
4 10/11/01 ee Made Uoid changes that impact the net messages
|
||||
5 02/12/02 eap Modified auth messages.
|
||||
6 4/18/02 MT Changed to using SDL saveStates
|
||||
7 04/18/02 eap Redesigned KI messaging
|
||||
8 05/17/02 Colin Changed format of Uoid
|
||||
9 07/01/02 rje Changed Authentication Scheme
|
||||
10 10/16/02 eap Removed low-level KI. Replaced with plVault.
|
||||
11 07/03/03 MT Optimized plNetMessage headers for size
|
||||
12 09/17/03 eap Removed UInt32 acctID. Added Uuid acctUUID. Changed PlayerUpdate enum values.
|
||||
*/
|
||||
|
||||
|
||||
/*--- Minor Version Log ---
|
||||
# Date Who Comment
|
||||
5 9/28/01 MT Added senderClientNum to GameMessages (mostly for debugging)
|
||||
0 10/05/01 eap Reset on Major Version change
|
||||
1 10/26/01 eap Upon sending join ack, the game server now sends a set of initial local unique ids to client.
|
||||
2 10/31/01 eap Added (Un)RegisterServer msgs (actually renamed from ServerStarted family msgs). Changed StartProcess msg a little.
|
||||
3 11/05/01 eap Changes to request/receive avatar msgs.
|
||||
4 11/21/01 MT Removed obsolete plNetMessage flags due to client task reorg
|
||||
5 02/02/02 eap Added/Updated KI message classes.
|
||||
0 02/12/02 eap Reset on major version change
|
||||
1 03/22/02 eap Removed acctID from plNetMsgCreatePlayer.
|
||||
2 3/31/02 MT moved uncompressed size from voiceMsg to streamHelper
|
||||
0 04/18/02 MT Reset on major version change.
|
||||
0 04/18/02 eap Reset on major version change
|
||||
1 4/29/02 MT added joinOrder to joinAck
|
||||
2 05/02/02 eap Changed plNetServerSessionInfo stream format.
|
||||
3 05/08/02 eap Changed KI stream formats.
|
||||
0 05/17/02 Colin Reset on major version change
|
||||
1 06/03/02 eap Changed KIOperations enum values. Affects KI messages.
|
||||
2 06/06/02 eap More changes to KI message format.
|
||||
3 6/07/02 MT Enabled compression on SDL msgs
|
||||
4 6/19/02 MT Removed general timeOffset in favor of UnifiedTime in game msg
|
||||
4 06/12/02 eap Yet more changes to KI messaging stuff
|
||||
1 7/01/02 MT Added a member to SDLBCast msgs
|
||||
2 07/16/02 eap Added linking rule info to net msgs related to age linking.
|
||||
3 08/15/02 eap Changed plNetMsgKI format.
|
||||
4 8/15/02 MT Changes related to cloning reorg
|
||||
5 08/21/02 eap Changed plNetMsgKI format.
|
||||
6 9/17/02 MT Added fIsPlayer to plNetMsgLoadClone
|
||||
7 9/24/02 rje Added Packet Size in Client Hello
|
||||
8 10/01/02 eap Changed the way the KI is fetched.
|
||||
9 10/02/02 eap Changed KI storable stream format (made flag-based instead of stream version-based)
|
||||
10 10/03/02 eap Changed KI manifest stream format.
|
||||
11 10/04/02 thamer Changed timeSent to be unified time not double, short-circuit version checking
|
||||
0 10/16/02 eap Reset on major version change.
|
||||
1 10/15/02 thamer minor changes for CCR
|
||||
2 11/04/02 eap Changed plNetMsgVault format.
|
||||
3 12/04/02 eap Moved compression into plNetMsgStreamHelper. Changed plNetMsgVault format.
|
||||
4 12/04/02 eap Changed plNetMsgStreamHelper fUncompressedSize type to UInt32.
|
||||
5 12/05/02 eap Added PlayerName and AvatarShape to CreatePlayer msg.
|
||||
6 12/11/02 thamer Moved PlayerID into the base class
|
||||
7 12/18/02 thamer Changed SDL format
|
||||
8 12/17/02 eap Changed format of vault negotiate manifest msg.
|
||||
9 01/14/03 eap Added CCRLevel to plClientGuid and plNetMsgSetMyActivePlayer. Removed from plNetMsgJoinReq
|
||||
10 01/30/03 eap Changed linking rules and associated net msgs.
|
||||
11 02/04/03 eap Changed vault msg format.
|
||||
12 02/05/03 thamer Added initial age state to joinAck
|
||||
13 02/10/03 eap Changed format of vault FetchNodes msg to support bundling of multiple nodes into one msg.
|
||||
14 02/12/03 eap Changed the way ages are (un)registered. client used to do it. now vault server does it.
|
||||
15 02/24/03 eap Added a byte to plNetMsgLeave to specify the reason for leaving.
|
||||
16 02/25/03 thamer Changed the auth response generation
|
||||
17 02/26/03 thamer again
|
||||
18 02/28/03 eap Support for multiple spawn points for vault age link nodes.
|
||||
19 03/14/03 eap Changed plVaultNode format.
|
||||
20 03/14/03 thamer Added buildType and 'experimental' values to authHello and JoinAck msgs
|
||||
21 03/17/03 thamer Added streamSubType var to StreamHelper
|
||||
22 03/21/03 eap Changed auth error enum values to be negative.
|
||||
23 03/24/03 rje Added Invites to CreatePlayer.
|
||||
24 04/11/03 eap Changed create player error enum values to be negative.
|
||||
25 04/14/03 thamer Changed SharedState R/W format
|
||||
26 05/13/03 eap Changed plNetMsgVault a little bit to allow multiple age vaults to live in one process.
|
||||
27 05/16/03 thamer Bob changed the LoadClone msg format
|
||||
28 05/30/03 thamer Optimized the Uoid read/write format
|
||||
29 06/01/03 eap Changed stream format of plGenericType class
|
||||
30 06/01/03 eap Changed stream format of plGenericType class
|
||||
31 06/02/03 thamer Changed plNetMsgLoadClone format
|
||||
32 06/06/03 eap Reimplemented inter-age messaging. Removed vaultserver from the process.
|
||||
33 06/10/03 eap Changed plVaultNode stream format
|
||||
34 06/24/03 eap Client is now in charge of creating personal age when needed.
|
||||
35 06/27/03 eap Added reply msg to SetActivePlayer
|
||||
36 06/25/03 thamer SDL size optimizations
|
||||
37 07/01/03 eap Vault db version bumped.
|
||||
0 07/03/03 thamer Reset on major version change.
|
||||
1 07/11/03 eap Added fCreateFlags to CreatePlayer msg.
|
||||
2 07/16/03 thamer Added flags to vault player list desc
|
||||
3 07/22/03 eap Changed plNetMsgVault and plNetMsgVaultTask format.
|
||||
4 07/23/03 eap Changed plNetMsgDeletePlayer format.
|
||||
5 07/28/03 thamer Changed StreamHelper format.
|
||||
6 08/01/03 eap Changed the format of some vault operations (RegisterOwnedAge et.al.)
|
||||
7 08/01/03 eap Added disconnect reply msg to vault protocol.
|
||||
8 08/06/03 eap Added some buffer room to the last enum value in plNetMsgTerminated/Leave/ServerMsgUpdatePlayer
|
||||
9 08/07/03 eap Fixed enum values in plNetMsgTerminated/Leave/ServerMsgUpdatePlayer
|
||||
10 08/22/03 eap Game server no longer queries auth server when authenticating a client.
|
||||
11 09/04/03 eap Added camera stack to plSpawnPointInfo.
|
||||
12 09/08/03 eap Added server guid to plNetMsgAuthenticated
|
||||
13 09/17/03 bob Changed format of Read/WriteSafeString, (and the "long" versions)
|
||||
0 09/17/03 eap Reset on major version change.
|
||||
1 10/22/03 eap Changed format of VaultFetchNodes message
|
||||
2 10/23/03 eap Changed format of VaultFetchNodes message again
|
||||
3 10/25/03 bob Changed the format of plLinkEffectsTriggerMsg, which the NetMsgScreener reads.
|
||||
4 11/18/03 eap Changed c/s initial SDL state send transaction.
|
||||
5 10/29/03 jeffrey Changed the plDynamicTextMsg to use unicode
|
||||
6 12/01/03 eap Changed plNetMessage flags (kNoGameTimeSent became kTimeSent)
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#ifndef plNetMsgVersion_h_inc
|
||||
#define plNetMsgVersion_h_inc
|
||||
|
||||
|
||||
// Changing the version number(s)? Make an entry in the corresponding log below.
|
||||
#define PLASMA2_NETMSG_MAJOR_VERSION 12
|
||||
#define PLASMA2_NETMSG_MINOR_VERSION 6
|
||||
/*--- Major Version Log ---
|
||||
# Date Who Comment
|
||||
2 10/05/01 eap Moved handling of VaultRequestData message from game server to lobby server
|
||||
3 10/09/01 ee Made Uoid changes that impact the net messages
|
||||
4 10/11/01 ee Made Uoid changes that impact the net messages
|
||||
5 02/12/02 eap Modified auth messages.
|
||||
6 4/18/02 MT Changed to using SDL saveStates
|
||||
7 04/18/02 eap Redesigned KI messaging
|
||||
8 05/17/02 Colin Changed format of Uoid
|
||||
9 07/01/02 rje Changed Authentication Scheme
|
||||
10 10/16/02 eap Removed low-level KI. Replaced with plVault.
|
||||
11 07/03/03 MT Optimized plNetMessage headers for size
|
||||
12 09/17/03 eap Removed UInt32 acctID. Added Uuid acctUUID. Changed PlayerUpdate enum values.
|
||||
*/
|
||||
|
||||
|
||||
/*--- Minor Version Log ---
|
||||
# Date Who Comment
|
||||
5 9/28/01 MT Added senderClientNum to GameMessages (mostly for debugging)
|
||||
0 10/05/01 eap Reset on Major Version change
|
||||
1 10/26/01 eap Upon sending join ack, the game server now sends a set of initial local unique ids to client.
|
||||
2 10/31/01 eap Added (Un)RegisterServer msgs (actually renamed from ServerStarted family msgs). Changed StartProcess msg a little.
|
||||
3 11/05/01 eap Changes to request/receive avatar msgs.
|
||||
4 11/21/01 MT Removed obsolete plNetMessage flags due to client task reorg
|
||||
5 02/02/02 eap Added/Updated KI message classes.
|
||||
0 02/12/02 eap Reset on major version change
|
||||
1 03/22/02 eap Removed acctID from plNetMsgCreatePlayer.
|
||||
2 3/31/02 MT moved uncompressed size from voiceMsg to streamHelper
|
||||
0 04/18/02 MT Reset on major version change.
|
||||
0 04/18/02 eap Reset on major version change
|
||||
1 4/29/02 MT added joinOrder to joinAck
|
||||
2 05/02/02 eap Changed plNetServerSessionInfo stream format.
|
||||
3 05/08/02 eap Changed KI stream formats.
|
||||
0 05/17/02 Colin Reset on major version change
|
||||
1 06/03/02 eap Changed KIOperations enum values. Affects KI messages.
|
||||
2 06/06/02 eap More changes to KI message format.
|
||||
3 6/07/02 MT Enabled compression on SDL msgs
|
||||
4 6/19/02 MT Removed general timeOffset in favor of UnifiedTime in game msg
|
||||
4 06/12/02 eap Yet more changes to KI messaging stuff
|
||||
1 7/01/02 MT Added a member to SDLBCast msgs
|
||||
2 07/16/02 eap Added linking rule info to net msgs related to age linking.
|
||||
3 08/15/02 eap Changed plNetMsgKI format.
|
||||
4 8/15/02 MT Changes related to cloning reorg
|
||||
5 08/21/02 eap Changed plNetMsgKI format.
|
||||
6 9/17/02 MT Added fIsPlayer to plNetMsgLoadClone
|
||||
7 9/24/02 rje Added Packet Size in Client Hello
|
||||
8 10/01/02 eap Changed the way the KI is fetched.
|
||||
9 10/02/02 eap Changed KI storable stream format (made flag-based instead of stream version-based)
|
||||
10 10/03/02 eap Changed KI manifest stream format.
|
||||
11 10/04/02 thamer Changed timeSent to be unified time not double, short-circuit version checking
|
||||
0 10/16/02 eap Reset on major version change.
|
||||
1 10/15/02 thamer minor changes for CCR
|
||||
2 11/04/02 eap Changed plNetMsgVault format.
|
||||
3 12/04/02 eap Moved compression into plNetMsgStreamHelper. Changed plNetMsgVault format.
|
||||
4 12/04/02 eap Changed plNetMsgStreamHelper fUncompressedSize type to UInt32.
|
||||
5 12/05/02 eap Added PlayerName and AvatarShape to CreatePlayer msg.
|
||||
6 12/11/02 thamer Moved PlayerID into the base class
|
||||
7 12/18/02 thamer Changed SDL format
|
||||
8 12/17/02 eap Changed format of vault negotiate manifest msg.
|
||||
9 01/14/03 eap Added CCRLevel to plClientGuid and plNetMsgSetMyActivePlayer. Removed from plNetMsgJoinReq
|
||||
10 01/30/03 eap Changed linking rules and associated net msgs.
|
||||
11 02/04/03 eap Changed vault msg format.
|
||||
12 02/05/03 thamer Added initial age state to joinAck
|
||||
13 02/10/03 eap Changed format of vault FetchNodes msg to support bundling of multiple nodes into one msg.
|
||||
14 02/12/03 eap Changed the way ages are (un)registered. client used to do it. now vault server does it.
|
||||
15 02/24/03 eap Added a byte to plNetMsgLeave to specify the reason for leaving.
|
||||
16 02/25/03 thamer Changed the auth response generation
|
||||
17 02/26/03 thamer again
|
||||
18 02/28/03 eap Support for multiple spawn points for vault age link nodes.
|
||||
19 03/14/03 eap Changed plVaultNode format.
|
||||
20 03/14/03 thamer Added buildType and 'experimental' values to authHello and JoinAck msgs
|
||||
21 03/17/03 thamer Added streamSubType var to StreamHelper
|
||||
22 03/21/03 eap Changed auth error enum values to be negative.
|
||||
23 03/24/03 rje Added Invites to CreatePlayer.
|
||||
24 04/11/03 eap Changed create player error enum values to be negative.
|
||||
25 04/14/03 thamer Changed SharedState R/W format
|
||||
26 05/13/03 eap Changed plNetMsgVault a little bit to allow multiple age vaults to live in one process.
|
||||
27 05/16/03 thamer Bob changed the LoadClone msg format
|
||||
28 05/30/03 thamer Optimized the Uoid read/write format
|
||||
29 06/01/03 eap Changed stream format of plGenericType class
|
||||
30 06/01/03 eap Changed stream format of plGenericType class
|
||||
31 06/02/03 thamer Changed plNetMsgLoadClone format
|
||||
32 06/06/03 eap Reimplemented inter-age messaging. Removed vaultserver from the process.
|
||||
33 06/10/03 eap Changed plVaultNode stream format
|
||||
34 06/24/03 eap Client is now in charge of creating personal age when needed.
|
||||
35 06/27/03 eap Added reply msg to SetActivePlayer
|
||||
36 06/25/03 thamer SDL size optimizations
|
||||
37 07/01/03 eap Vault db version bumped.
|
||||
0 07/03/03 thamer Reset on major version change.
|
||||
1 07/11/03 eap Added fCreateFlags to CreatePlayer msg.
|
||||
2 07/16/03 thamer Added flags to vault player list desc
|
||||
3 07/22/03 eap Changed plNetMsgVault and plNetMsgVaultTask format.
|
||||
4 07/23/03 eap Changed plNetMsgDeletePlayer format.
|
||||
5 07/28/03 thamer Changed StreamHelper format.
|
||||
6 08/01/03 eap Changed the format of some vault operations (RegisterOwnedAge et.al.)
|
||||
7 08/01/03 eap Added disconnect reply msg to vault protocol.
|
||||
8 08/06/03 eap Added some buffer room to the last enum value in plNetMsgTerminated/Leave/ServerMsgUpdatePlayer
|
||||
9 08/07/03 eap Fixed enum values in plNetMsgTerminated/Leave/ServerMsgUpdatePlayer
|
||||
10 08/22/03 eap Game server no longer queries auth server when authenticating a client.
|
||||
11 09/04/03 eap Added camera stack to plSpawnPointInfo.
|
||||
12 09/08/03 eap Added server guid to plNetMsgAuthenticated
|
||||
13 09/17/03 bob Changed format of Read/WriteSafeString, (and the "long" versions)
|
||||
0 09/17/03 eap Reset on major version change.
|
||||
1 10/22/03 eap Changed format of VaultFetchNodes message
|
||||
2 10/23/03 eap Changed format of VaultFetchNodes message again
|
||||
3 10/25/03 bob Changed the format of plLinkEffectsTriggerMsg, which the NetMsgScreener reads.
|
||||
4 11/18/03 eap Changed c/s initial SDL state send transaction.
|
||||
5 10/29/03 jeffrey Changed the plDynamicTextMsg to use unicode
|
||||
6 12/01/03 eap Changed plNetMessage flags (kNoGameTimeSent became kTimeSent)
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user