diff options
Diffstat (limited to 'lib/server/Protocol.h')
-rw-r--r-- | lib/server/Protocol.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/server/Protocol.h b/lib/server/Protocol.h index dc660ad5..42cb0ff8 100644 --- a/lib/server/Protocol.h +++ b/lib/server/Protocol.h @@ -12,22 +12,14 @@ #include <sys/types.h> -<<<<<<< HEAD -class IOStream; -#include "ProtocolObject.h" -======= ->>>>>>> 0.12 #include <memory> #include <vector> #include <string> -<<<<<<< HEAD -======= #include "Message.h" class IOStream; ->>>>>>> 0.12 // default timeout is 15 minutes #define PROTOCOL_DEFAULT_TIMEOUT (15*60*1000) // 16 default maximum object size -- should be enough @@ -50,13 +42,6 @@ public: private: Protocol(const Protocol &rToCopy); -<<<<<<< HEAD -public: - void Handshake(); - std::auto_ptr<ProtocolObject> Receive(); - void Send(const ProtocolObject &rObject); - -======= protected: // Unsafe to make public, as they may allow sending objects // from a different protocol. The derived class prevents this. @@ -65,7 +50,6 @@ protected: public: void Handshake(); ->>>>>>> 0.12 std::auto_ptr<IOStream> ReceiveStream(); void SendStream(IOStream &rStream); @@ -75,11 +59,6 @@ public: UnknownError = 0 }; -<<<<<<< HEAD - bool GetLastError(int &rTypeOut, int &rSubTypeOut); - -======= ->>>>>>> 0.12 // -------------------------------------------------------------------------- // // Function @@ -111,11 +90,7 @@ public: // -------------------------------------------------------------------------- void SetMaxObjectSize(unsigned int NewMaxObjSize) {mMaxObjectSize = NewMaxObjSize;} -<<<<<<< HEAD - // For ProtocolObject derived classes -======= // For Message derived classes ->>>>>>> 0.12 void Read(void *Buffer, int Size); void Read(std::string &rOut, int Size); void Read(int64_t &rOut); @@ -196,13 +171,6 @@ public: { ProtocolStream_SizeUncertain = 0xffffffff }; -<<<<<<< HEAD - -protected: - virtual std::auto_ptr<ProtocolObject> MakeProtocolObject(int ObjType) = 0; - virtual const char *GetIdentString() = 0; - void SetError(int Type, int SubType) {mLastErrorType = Type; mLastErrorSubType = SubType;} -======= bool GetLogToSysLog() { return mLogToSysLog; } FILE *GetLogToFile() { return mLogToFile; } void SetLogToSysLog(bool Log = false) {mLogToSysLog = Log;} @@ -212,7 +180,6 @@ protected: virtual std::auto_ptr<Message> MakeMessage(int ObjType) = 0; virtual const char *GetProtocolIdentString() = 0; ->>>>>>> 0.12 void CheckAndReadHdr(void *hdr); // don't use type here to avoid dependency // Will be used for logging @@ -223,10 +190,6 @@ private: void EnsureBufferAllocated(int Size); int SendStreamSendBlock(uint8_t *Block, int BytesInBlock); -<<<<<<< HEAD -private: -======= ->>>>>>> 0.12 IOStream &mrStream; bool mHandshakeDone; unsigned int mMaxObjectSize; @@ -236,17 +199,12 @@ private: int mReadOffset; int mWriteOffset; int mValidDataSize; -<<<<<<< HEAD - int mLastErrorType; - int mLastErrorSubType; -======= bool mLogToSysLog; FILE *mLogToFile; }; class ProtocolContext { ->>>>>>> 0.12 }; #endif // PROTOCOL__H |