Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cXProtocolServerStreamImpl Class Reference

#include <cXProtocolServer.h>

Inheritance diagram for GrayLib::cXProtocolServerStreamImpl:
GrayLib::cXProtocolServerStream Gray::cRefBase GrayLib::cProtocolStream GrayLib::cXProtocolBase GrayLib::cXProtocolRx GrayLib::cXProtocolServerTx IAuthUser Gray::cStreamOutput IUnknown GrayLib::cXProtocolTx Gray::cStreamBase

Public Member Functions

 cXProtocolServerStreamImpl (cXProtocolFactory *pProtocolFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut)
 
 IUNKNOWN_DISAMBIG (cRefBase)
 
- Public Member Functions inherited from GrayLib::cXProtocolServerStream
 cXProtocolServerStream (cXProtocolFactory *pProtocolFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut)
 
virtual ~cXProtocolServerStream ()
 
HASHCODE_t get_HashCode () const noexcept
 
virtual bool isClientSide () const override
 
 STDMETHOD_ (cString, get_Name)() const override
 
 STDMETHOD_ (PLEVEL_TYPE, get_PrivLevel)() const override
 
 STDMETHOD_ (bool, CanBeDetectedBy)(const IAuthUser *pViewer) const override
 
virtual HRESULT DisposeThis () override
 
virtual HRESULT ProcessStreamPacket () override
 
virtual HRESULT WriteString (const char *pszStr) override
 
virtual HRESULT OnTickStream () override
 
- Public Member Functions inherited from GrayLib::cProtocolStream
 cProtocolStream (IProtocolFactory *pProtocolFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut)
 
virtual ~cProtocolStream ()
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept override
 
 STDMETHOD_ (cString, get_Name)() const override
 
 STDMETHOD_ (cStringA, get_SymName)() const override
 
bool isConnected () const
 
cStreamInputget_StreamInp () const
 
cStreamOutputget_StreamOut () const
 
virtual size_t get_ProtocolMaxMessageSize () const
 
- Public Member Functions inherited from GrayLib::cXProtocolBase
 cXProtocolBase (cXProtocolDataMgr *pProtocolDataMgr)
 
virtual ~cXProtocolBase ()
 
cXProtocolDataMgrget_DataMgr () const
 
- Public Member Functions inherited from GrayLib::cXProtocolServerTx
 cXProtocolServerTx (cXProtocolBase &rBase, cStreamOutput *pOut)
 
virtual ~cXProtocolServerTx ()
 
HRESULT Send_Interfaces (cXObject *pObj)
 
HRESULT Send_InterfaceDef (const cScriptableInterfaceDef *pInterfaceDef)
 
HRESULT Send_InterfaceDef (SCRIPTINTERFACEID_t bInterfaceID)
 
HRESULT Send_InterfaceDefs (cXObject *pObj)
 
HRESULT Send_InterfaceDefs (UID_t uid)
 
HRESULT Send_TagDef (cAtomRef atomref)
 
HRESULT Send_PropsI (cXObject *pObj, const cScriptableInterfaceDef *pInterfaceDef)
 
HRESULT Send_Props (cXObject *pObj, const cScriptableInterfaceDef *pInterfaceDef)
 
HRESULT Send_Props (cXObject *pObj, SCRIPTINTERFACEID_t bInterfaceID)
 
HRESULT Send_Prop (UID_t uid, SCRIPTINTERFACEID_t bInterfaceID, SCRIPTPROPID_t bPropIndex, const cVariant &vVal)
 
HRESULT Send_Prop (cXObject *pObj, const cScriptableProp *pProp, const cVariant &vVal)
 
HRESULT Send_PropGet (cXObject *pObj, const cScriptableProp *pProp)
 
HRESULT Send_InvokeResponse (UID_t uid, SCRIPTINTERFACEID_t bInterfaceID, SCRIPTPROPID_t bMethodIndex, const cVariant &vValRet)
 
HRESULT Send_InvokeResponse (cXObject *pObj, const cScriptableMethod *pMethod, const cVariant &vValRet)
 
HRESULT Send_Tags (cXObject *pObj, bool bSendIfEmpty)
 
HRESULT Send_InvokeResponseV (const cVariant &vValRet)
 
- Public Member Functions inherited from Gray::cStreamOutput
 cStreamOutput () noexcept
 
virtual ~cStreamOutput ()
 
virtual HRESULT WriteX (const void *pData, size_t nDataSize)
 
HRESULT WriteT (const void *pVal, size_t nDataSize)
 
template<typename TYPE >
HRESULT WriteT (TYPE val)
 
HRESULT WriteSize (size_t nSize)
 
HRESULT WriteHashCode (HASHCODE_t nHashCode)
 
HRESULT WriteN (const void *pBuffer, size_t nSize)
 
template<typename _CH >
HRESULT WriteStringN (const _CH *pszStr)
 
template<typename _CH >
HRESULT WriteCharRepeat (_CH nChar, int nCount=1)
 
virtual HRESULT WriteString (const wchar_t *pszStr)
 
StrLen_t VPrintf (const char *pszFormat, va_list args)
 
StrLen_t VPrintf (const wchar_t *pszFormat, va_list args)
 
StrLen_t _cdecl Printf (const char *pszFormat,...)
 
StrLen_t _cdecl Printf (const wchar_t *pszFormat,...)
 
HRESULT WriteStream (cStreamInput &sInp, STREAM_POS_t nSizeMax=k_FILE_BLOCK_SIZE, IStreamProgressCallback *pProgress=nullptr, TIMESYSD_t nTimeout=0)
 Copy cStreamInput to this stream. More...
 
virtual HRESULT FlushX ()
 
- Public Member Functions inherited from Gray::cStreamBase
virtual ~cStreamBase ()
 
virtual STREAM_SEEKRET_t Seek (STREAM_OFFSET_t iOffset, SEEK_ORIGIN_TYPE eSeekOrigin=SEEK_Set)
 
void SeekToBegin ()
 
STREAM_POS_t SeekToEnd ()
 
virtual STREAM_POS_t GetPosition () const
 
virtual STREAM_POS_t GetLength () const
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 

Additional Inherited Members

- Static Public Member Functions inherited from GrayLib::cXProtocolBase
static cStringA GRAYCALL GetMsgName (XPROTO_t bMsg)
 
- Public Attributes inherited from GrayLib::cXProtocolServerStream
cTimeSys m_timePing
 last time i got a ping from this client More...
 
- Public Attributes inherited from GrayLib::cProtocolStream
IProtocolFactory *const m_pProtocolFactory
 What IProtocolFactory produced this? More...
 
IUnkObject *const m_pServerConnection
 the cNetServerConnection or other top level parent for this protocol. More...
 
HASHCODE_t const m_nHashCode
 the m_pClient->get_HashCode() id for this client connection/stream. More...
 
- Public Attributes inherited from GrayLib::cXProtocolBase
cXProtocolDataMgr *const m_pProtocolDataMgr
 Point back to the protocol singleton. More...
 
bool m_bUseHashPropName
 for stuff i send, should i hash the prop names ? XPROTO_HashProp More...
 
cFile m_FileWork
 The local file we are reading or writing for XPROTO_File. More...
 
- Static Public Attributes inherited from GrayLib::cXProtocolBase
static const size_t k_Packet_Size_Max = cStream::k_FILE_BLOCK_SIZE + 16
 
- Static Public Attributes inherited from Gray::cStreamBase
static const BYTE k_SIZE_MASK = 0x80
 Used for WriteSize() More...
 
static const size_t k_FILE_BLOCK_SIZE = (32 * 1024)
 default arbitrary transfer block size. more than this is NOT more efficient. More...
 
- Protected Member Functions inherited from GrayLib::cXProtocolServerStream
HRESULT onReq_Error ()
 
HRESULT onReq_Interfaces ()
 Request a list of cXObject definitions. More...
 
HRESULT onReq_InterfaceDef ()
 Request the interface definition information from the server. More...
 
HRESULT onReq_Prop ()
 Request prop. More...
 
HRESULT onReq_Props ()
 Request props. More...
 
HRESULT onReq_Invoke ()
 Client Requests a method invocation. More...
 
HRESULT onReq_Tags ()
 
HRESULT onReq_TagDef ()
 
HRESULT onReq_File ()
 
virtual HRESULT onReq_File (const FILECHAR_t *pszReqName, size_t nFilePos)
 
HRESULT onReq_Ping ()
 
virtual HRESULT onX_Error (HRESULT hResRet, const cVariant &vVal) override
 
HRESULT onSet_Prop ()
 Client wants to set a prop on some object. More...
 
HRESULT onSet_Tag ()
 Client wants to set a tag on some object. More...
 
HRESULT onSet_TagDef ()
 
HRESULT onSet_File ()
 
virtual HRESULT ProcessStreamRxMsg () override
 
- Protected Member Functions inherited from GrayLib::cXProtocolRx
 cXProtocolRx (cXProtocolBase &rBase, cStreamInput *pStreamRx)
 
virtual ~cXProtocolRx ()
 
virtual HRESULT onXSet_Prop (cXObject *pObj, const cScriptableProp *pProp, const cVariant &vVal)
 
virtual HRESULT onXReq_Invoke (cXObject *pObj, const cScriptableMethod *pMethod, const cVariant &vArgs, OUT cVariant &vValRet)
 
virtual HRESULT onXSet_PropN (UID_t uidLastRx, const ATOMCHAR_t *pszPropName, ATOMCODE_t nPropName, const cVariant &vVal)
 
virtual HRESULT onXReq_InvokeN (UID_t uidLastRx, const ATOMCHAR_t *pszMethodName, ATOMCODE_t nMethodName, const cVariant &vArgs)
 
virtual HRESULT onXSet_File (const FILECHAR_t *pszReqName, size_t dwTotalLen)
 
void InitRx ()
 
HRESULT ReadUID ()
 
HRESULT on_Error ()
 
HRESULT onSet_PropN ()
 
HRESULT onReq_InvokeN ()
 
HRESULT onSet_File ()
 
HRESULT onSet_FileNext ()
 
cStreamInputget_StreamRx ()
 
- Protected Member Functions inherited from GrayLib::cXProtocolTx
void InitTx ()
 
HRESULT Send_MsgPropName (const ATOMCHAR_t *pszPropName)
 
cStreamOutputget_StreamTx () const
 
 cXProtocolTx (cXProtocolBase &rBase, cStreamOutput *pStreamTx)
 
virtual ~cXProtocolTx ()
 
bool IsTxMsgBuilding () const
 
HRESULT Send_MsgHeader (XPROTO_t bMsg)
 
HRESULT Send_MsgHeaderUID (XPROTO_t bMsg, UID_t uid)
 
void Send_MsgEnd ()
 
HRESULT Send_Error (HRESULT hResRet, const cVariant &vVal)
 
HRESULT Send_PropN (UID_t uid, const ATOMCHAR_t *pszPropName, const cVariant &vVal)
 
HRESULT Send_PropN (cXObject *pObj, const ATOMCHAR_t *pszPropName, const cVariant &vValRet)
 
HRESULT Send_PropN (cXObject *pObj, const cScriptableProp *pProp, const cVariant &vValRet)
 
HRESULT Request_InvokeN (UID_t uid, const ATOMCHAR_t *pszPropName, const cVariant &vArgs)
 
HRESULT Request_InvokeN (UID_t uid, const ATOMCHAR_t *pszPropName)
 
HRESULT Request_InvokeN (cXObject *pObj, const ATOMCHAR_t *pszPropName, const cVariant &vArgs)
 
HRESULT Request_InvokeN (cXObject *pObj, const ATOMCHAR_t *pszPropName)
 
HRESULT Request_InvokeN (cXObject *pObj, const cScriptableMethod *pMethod, const cVariant &vArgs)
 
HRESULT Send_FileChecked (const FILECHAR_t *pszSrcPath, const FILECHAR_t *pszDestName)
 
HRESULT Send_File (const FILECHAR_t *pszSrcPath, const FILECHAR_t *pszDestName, FILE_SIZE_t nOffsetStart, FILE_SIZE_t nSize)
 
HRESULT Send_FileNext ()
 
- Protected Attributes inherited from GrayLib::cProtocolStream
cStreamInputm_pStreamInp
 for use with ProcessStreamPacket() More...
 
cStreamOutputm_pStreamOut
 TX responses back to the remote client go here. (e.g. cNetServerConnection->cNetStream) More...
 
cString m_sName
 a user readable name. Usually the IP address or reverse DNS lookup. can be upgraded as lookup or login becomes avail. m_pClient->get_Name() More...
 
- Protected Attributes inherited from GrayLib::cXProtocolRx
cXProtocolBasem_rBase
 Input stream. More...
 
cStreamInputm_pStreamRx
 Where to RX from. More...
 
SCRIPTINTERFACEID_t m_bInterfaceIDUnk
 An interface received that I don't understand (yet)! client only. More...
 
XPROTO_t m_bMsgReading
 We are in the process of reading/dispatching a message. More...
 
XPROTO_t m_bMsgReadPrev
 Last message i got and understood. for debug. More...
 
int m_iMsgNumRx
 Count the messages we received. More...
 
UID_t m_uidLastRx
 Last UID sent from client. ( be careful order of messages does not change!) More...
 
- Protected Attributes inherited from GrayLib::cXProtocolTx
cXProtocolBasem_rBase
 My parent. dumb pointer. More...
 
cStreamOutputm_pStreamTx
 Where to TX to. More...
 
XPROTO_t m_bMsgBuilding
 We are in the process of building a message. not called Send_MsgEnd() yet. More...
 
bool m_bFileSending
 Must call Send_FileNext() until done. More...
 
int m_iMsgNumTx
 Count the messages we transmit. More...
 
UID_t m_uidLastTx
 Last UID i sent. Periodically resend this just in case the other side gets out of sync ? More...
 

Constructor & Destructor Documentation

◆ cXProtocolServerStreamImpl()

GrayLib::cXProtocolServerStreamImpl::cXProtocolServerStreamImpl ( cXProtocolFactory pProtocolFactory,
IUnkObject *  pServerConnection,
cStreamInput pStreamInp,
cStreamOutput pStreamOut 
)
inline

Member Function Documentation

◆ IUNKNOWN_DISAMBIG()

GrayLib::cXProtocolServerStreamImpl::IUNKNOWN_DISAMBIG ( cRefBase  )

The documentation for this class was generated from the following file: