6 #ifndef _INC_cXProtocol_H
7 #define _INC_cXProtocol_H 0x1E
12 #include "../Proto/cPingClient.h"
13 #include "../Scriptable/IScriptableObj.h"
14 #include "../Scriptable/cScriptableInterface.h"
22 #define USE_XPROTO_LOGFILE
27 #ifdef USE_XPROTO_LOGFILE
45 #define cXProtocolMsg(a,b,c) XPROTO_##a,
67 #ifdef USE_XPROTO_LOGFILE
75 #ifdef USE_XPROTO_LOGFILE
76 void SetLogFile(
const FILECHAR_t* pszFilePath);
103 return this->m_pProtocolDataMgr;
112 #ifdef USE_XPROTO_LOGFILE
139 ASSERT(m_pStreamTx !=
nullptr);
150 return m_bMsgBuilding != XPROTO_NULL;
216 ASSERT(m_pStreamRx !=
nullptr);
220 virtual HRESULT ProcessStreamPacket();
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define ASSERT(exp)
Definition: cDebugAssert.h:87
Definition: cScriptableInterface.h:300
Definition: cScriptableInterface.h:97
Definition: cVariant.h:26
Definition: cXObject.h:78
Definition: cXProtocol.h:84
cFile m_FileWork
The local file we are reading or writing for XPROTO_File.
Definition: cXProtocol.h:95
virtual bool isClientSide() const =0
cXProtocolDataMgr * get_DataMgr() const
Definition: cXProtocol.h:101
STDMETHOD_(cString, get_Name)() const =0
STDMETHOD_(PLEVEL_TYPE, get_PrivLevel)() const =0
cXProtocolDataMgr *const m_pProtocolDataMgr
Point back to the protocol singleton.
Definition: cXProtocol.h:93
bool m_bUseHashPropName
for stuff i send, should i hash the prop names ? XPROTO_HashProp
Definition: cXProtocol.h:94
Definition: cXProtocol.h:60
cStringF m_sFileRootDir
This is the virtual root for this server. XPROTO_File (as the other side is concerned,...
Definition: cXProtocol.h:66
Definition: cXProtocol.h:175
SCRIPTINTERFACEID_t m_bInterfaceIDUnk
An interface received that I don't understand (yet)! client only.
Definition: cXProtocol.h:183
XPROTO_t m_bMsgReadPrev
Last message i got and understood. for debug.
Definition: cXProtocol.h:186
XPROTO_t m_bMsgReading
We are in the process of reading/dispatching a message.
Definition: cXProtocol.h:185
cXProtocolBase & m_rBase
Input stream.
Definition: cXProtocol.h:181
UID_t m_uidLastRx
Last UID sent from client. ( be careful order of messages does not change!)
Definition: cXProtocol.h:188
int m_iMsgNumRx
Count the messages we received.
Definition: cXProtocol.h:187
virtual HRESULT onX_Error(HRESULT hResRet, const cVariant &vVal)=0
cStreamInput * m_pStreamRx
Where to RX from.
Definition: cXProtocol.h:182
virtual HRESULT ProcessStreamRxMsg()=0
cStreamInput & get_StreamRx()
Definition: cXProtocol.h:214
Definition: cXProtocolServer.h:19
Definition: cXProtocol.h:119
bool m_bFileSending
Must call Send_FileNext() until done.
Definition: cXProtocol.h:129
bool IsTxMsgBuilding() const
Definition: cXProtocol.h:147
UID_t m_uidLastTx
Last UID i sent. Periodically resend this just in case the other side gets out of sync ?
Definition: cXProtocol.h:131
int m_iMsgNumTx
Count the messages we transmit.
Definition: cXProtocol.h:130
cStreamOutput & get_StreamTx() const
Definition: cXProtocol.h:137
cXProtocolBase & m_rBase
My parent. dumb pointer.
Definition: cXProtocol.h:126
XPROTO_t m_bMsgBuilding
We are in the process of building a message. not called Send_MsgEnd() yet.
Definition: cXProtocol.h:128
cStreamOutput * m_pStreamTx
Where to TX to.
Definition: cXProtocol.h:127
Definition: cLogAppender.h:168
Definition: cRefPtr.h:225
static const size_t k_FILE_BLOCK_SIZE
default arbitrary transfer block size. more than this is NOT more efficient.
Definition: cStream.h:89
Definition: cStream.h:126
BYTE XPROTO_t
XPROTO_TYPE_ + XPROTO_MASK bits.
Definition: cXProtocol.h:57
cRefPtr< cXObject > cXObjectPtr
Definition: cXObject.h:331
BYTE SCRIPTINTERFACEID_t
enumerate all the defined interface definitions.
Definition: cScriptableInterface.h:35
class __DECL_IMPORT cXObject
Definition: cXObject.h:33
PLEVEL_TYPE
Definition: PrivLevel.h:16
class __DECL_IMPORT cScriptTagDef
Definition: cXProtocol.h:34
cRefPtr< cLogAppendFile > cLogAppendFilePtr
Definition: cLogAppendFile.h:53
XPROTO_TYPE_
Definition: cXProtocol.h:39
@ XPROTO_NextChunk
Alternate name/usage for XPROTO_LastUID.
Definition: cXProtocol.h:54
@ XPROTO_Request
This is the request version of the message. (expect a response)
Definition: cXProtocol.h:52
@ XPROTO_QTY
Definition: cXProtocol.h:49
@ XPROTO_LastUID
Hint to Just use the last UID or this is the next chunk of a file.
Definition: cXProtocol.h:53
@ XPROTO_MASK
Mask XPROTO_QTY bits.
Definition: cXProtocol.h:51
@ XPROTO_HashProp
The prop name is a hash id number. variation of message.
Definition: cXProtocol.h:55
const SCRIPTINTERFACEID_t SCRIPTINTERFACEID_MAX
Definition: cScriptableInterface.h:36
class __DECL_IMPORT cVariant
Definition: cJSONWriter.h:19
class __DECL_IMPORT cScriptableInterfaceDynamic
Definition: cScriptableInterfaceDynamic.h:19
HASHCODE32_t UID_t
Sort of the same as a HASHCODE_t. not the same as UIDINDEX_t.
Definition: cUID.h:18
HASHCODE32_t ATOMCODE_t
Encode a atom as a 32 bit hashcode instead of using its name/pointer. StrT::GetHashCode32()
Definition: cAtom.h:18
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22
char ATOMCHAR_t
the char form (UNICODE or not) for an atom. (for symbolic names)
Definition: StrConst.h:15
UINT64 FILE_SIZE_t
similar to STREAM_POS_t size_t
Definition: cFileStatus.h:31