#ifndef WIN32
#include <syslog.h>
#endif

// Auto-generated file -- do not edit

#ifndef AUTOGEN_BACKUPPROTOCOLSERVER_H
#define AUTOGEN_BACKUPPROTOCOLSERVER_H

#include "Protocol.h"
#include "ProtocolObject.h"
#include "ServerException.h"

class IOStream;

#include "BackupStoreFilename.h"

#include "Utils.h"

class BackupStoreContext;

class BackupProtocolServer;
	
class BackupProtocolObject : public ProtocolObject
{
public:
	BackupProtocolObject();
	virtual ~BackupProtocolObject();
	BackupProtocolObject(const BackupProtocolObject &rToCopy);
	
	virtual std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext);
	virtual void LogSysLog(const char *Action) const = 0;

};
class BackupProtocolServerError : public BackupProtocolObject
{
public:
	BackupProtocolServerError();
	BackupProtocolServerError(const BackupProtocolServerError &rToCopy);
	~BackupProtocolServerError();
	int GetType() const;
	enum
	{
		TypeID = 0
	};
	enum
	{
		ErrorType = 1000,
		Err_WrongVersion = 1,
		Err_NotInRightProtocolPhase = 2,
		Err_BadLogin = 3,
		Err_CannotLockStoreForWriting = 4,
		Err_SessionReadOnly = 5,
		Err_FileDoesNotVerify = 6,
		Err_DoesNotExist = 7,
		Err_DirectoryAlreadyExists = 8,
		Err_CannotDeleteRoot = 9,
		Err_TargetNameExists = 10,
		Err_StorageLimitExceeded = 11,
		Err_DiffFromFileDoesNotExist = 12,
		Err_DoesNotExistInDirectory = 13,
		Err_PatchConsistencyError = 14
	};
	bool IsError(int &rTypeOut, int &rSubTypeOut) const;
	std::string GetMessage() const;
	BackupProtocolServerError(int32_t Type, int32_t SubType);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetType(int32_t Type) {mType = Type;}
	void SetSubType(int32_t SubType) {mSubType = SubType;}
	virtual void LogSysLog(const char *Action) const;
private:
	int32_t mType;
	int32_t mSubType;
};

class BackupProtocolServerVersion : public BackupProtocolObject
{
public:
	BackupProtocolServerVersion();
	BackupProtocolServerVersion(const BackupProtocolServerVersion &rToCopy);
	~BackupProtocolServerVersion();
	int GetType() const;
	enum
	{
		TypeID = 1
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetVersion() {return mVersion;}
	BackupProtocolServerVersion(int32_t Version);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetVersion(int32_t Version) {mVersion = Version;}
	virtual void LogSysLog(const char *Action) const;
private:
	int32_t mVersion;
};

class BackupProtocolServerLogin : public BackupProtocolObject
{
public:
	BackupProtocolServerLogin();
	BackupProtocolServerLogin(const BackupProtocolServerLogin &rToCopy);
	~BackupProtocolServerLogin();
	int GetType() const;
	enum
	{
		TypeID = 2
	};
	enum
	{
		Flags_ReadOnly = 1
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetClientID() {return mClientID;}
	int32_t GetFlags() {return mFlags;}
	virtual void LogSysLog(const char *Action) const;
private:
	int32_t mClientID;
	int32_t mFlags;
};

class BackupProtocolServerLoginConfirmed : public BackupProtocolObject
{
public:
	BackupProtocolServerLoginConfirmed();
	BackupProtocolServerLoginConfirmed(const BackupProtocolServerLoginConfirmed &rToCopy);
	~BackupProtocolServerLoginConfirmed();
	int GetType() const;
	enum
	{
		TypeID = 3
	};
	BackupProtocolServerLoginConfirmed(int64_t ClientStoreMarker, int64_t BlocksUsed, int64_t BlocksSoftLimit, int64_t BlocksHardLimit);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetClientStoreMarker(int64_t ClientStoreMarker) {mClientStoreMarker = ClientStoreMarker;}
	void SetBlocksUsed(int64_t BlocksUsed) {mBlocksUsed = BlocksUsed;}
	void SetBlocksSoftLimit(int64_t BlocksSoftLimit) {mBlocksSoftLimit = BlocksSoftLimit;}
	void SetBlocksHardLimit(int64_t BlocksHardLimit) {mBlocksHardLimit = BlocksHardLimit;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mClientStoreMarker;
	int64_t mBlocksUsed;
	int64_t mBlocksSoftLimit;
	int64_t mBlocksHardLimit;
};

class BackupProtocolServerFinished : public BackupProtocolObject
{
public:
	BackupProtocolServerFinished();
	BackupProtocolServerFinished(const BackupProtocolServerFinished &rToCopy);
	~BackupProtocolServerFinished();
	int GetType() const;
	enum
	{
		TypeID = 4
	};
	bool IsConversationEnd() const;
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	virtual void LogSysLog(const char *Action) const;
private:
};

class BackupProtocolServerSuccess : public BackupProtocolObject
{
public:
	BackupProtocolServerSuccess();
	BackupProtocolServerSuccess(const BackupProtocolServerSuccess &rToCopy);
	~BackupProtocolServerSuccess();
	int GetType() const;
	enum
	{
		TypeID = 5
	};
	BackupProtocolServerSuccess(int64_t ObjectID);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetObjectID(int64_t ObjectID) {mObjectID = ObjectID;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
};

class BackupProtocolServerSetClientStoreMarker : public BackupProtocolObject
{
public:
	BackupProtocolServerSetClientStoreMarker();
	BackupProtocolServerSetClientStoreMarker(const BackupProtocolServerSetClientStoreMarker &rToCopy);
	~BackupProtocolServerSetClientStoreMarker();
	int GetType() const;
	enum
	{
		TypeID = 6
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetClientStoreMarker() {return mClientStoreMarker;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mClientStoreMarker;
};

class BackupProtocolServerGetObject : public BackupProtocolObject
{
public:
	BackupProtocolServerGetObject();
	BackupProtocolServerGetObject(const BackupProtocolServerGetObject &rToCopy);
	~BackupProtocolServerGetObject();
	int GetType() const;
	enum
	{
		TypeID = 10
	};
	enum
	{
		NoObject = 0
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetObjectID() {return mObjectID;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
};

class BackupProtocolServerMoveObject : public BackupProtocolObject
{
public:
	BackupProtocolServerMoveObject();
	BackupProtocolServerMoveObject(const BackupProtocolServerMoveObject &rToCopy);
	~BackupProtocolServerMoveObject();
	int GetType() const;
	enum
	{
		TypeID = 11
	};
	enum
	{
		Flags_MoveAllWithSameName = 1,
		Flags_AllowMoveOverDeletedObject = 2
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetObjectID() {return mObjectID;}
	int64_t GetMoveFromDirectory() {return mMoveFromDirectory;}
	int64_t GetMoveToDirectory() {return mMoveToDirectory;}
	int32_t GetFlags() {return mFlags;}
	const BackupStoreFilename& GetNewFilename() {return mNewFilename;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
	int64_t mMoveFromDirectory;
	int64_t mMoveToDirectory;
	int32_t mFlags;
	BackupStoreFilename mNewFilename;
};

class BackupProtocolServerGetObjectName : public BackupProtocolObject
{
public:
	BackupProtocolServerGetObjectName();
	BackupProtocolServerGetObjectName(const BackupProtocolServerGetObjectName &rToCopy);
	~BackupProtocolServerGetObjectName();
	int GetType() const;
	enum
	{
		TypeID = 12
	};
	enum
	{
		ObjectID_DirectoryOnly = 0
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetObjectID() {return mObjectID;}
	int64_t GetContainingDirectoryID() {return mContainingDirectoryID;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
	int64_t mContainingDirectoryID;
};

class BackupProtocolServerObjectName : public BackupProtocolObject
{
public:
	BackupProtocolServerObjectName();
	BackupProtocolServerObjectName(const BackupProtocolServerObjectName &rToCopy);
	~BackupProtocolServerObjectName();
	int GetType() const;
	enum
	{
		TypeID = 13
	};
	enum
	{
		NumNameElements_ObjectDoesntExist = 0
	};
	BackupProtocolServerObjectName(int32_t NumNameElements, int64_t ModificationTime, int64_t AttributesHash, int16_t Flags);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetNumNameElements(int32_t NumNameElements) {mNumNameElements = NumNameElements;}
	void SetModificationTime(int64_t ModificationTime) {mModificationTime = ModificationTime;}
	void SetAttributesHash(int64_t AttributesHash) {mAttributesHash = AttributesHash;}
	void SetFlags(int16_t Flags) {mFlags = Flags;}
	virtual void LogSysLog(const char *Action) const;
private:
	int32_t mNumNameElements;
	int64_t mModificationTime;
	int64_t mAttributesHash;
	int16_t mFlags;
};

class BackupProtocolServerCreateDirectory : public BackupProtocolObject
{
public:
	BackupProtocolServerCreateDirectory();
	BackupProtocolServerCreateDirectory(const BackupProtocolServerCreateDirectory &rToCopy);
	~BackupProtocolServerCreateDirectory();
	int GetType() const;
	enum
	{
		TypeID = 20
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetContainingDirectoryID() {return mContainingDirectoryID;}
	int64_t GetAttributesModTime() {return mAttributesModTime;}
	const BackupStoreFilename& GetDirectoryName() {return mDirectoryName;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mContainingDirectoryID;
	int64_t mAttributesModTime;
	BackupStoreFilename mDirectoryName;
};

class BackupProtocolServerListDirectory : public BackupProtocolObject
{
public:
	BackupProtocolServerListDirectory();
	BackupProtocolServerListDirectory(const BackupProtocolServerListDirectory &rToCopy);
	~BackupProtocolServerListDirectory();
	int GetType() const;
	enum
	{
		TypeID = 21
	};
	enum
	{
		Flags_INCLUDE_EVERYTHING = -1,
		Flags_EXCLUDE_NOTHING = 0,
		Flags_EXCLUDE_EVERYTHING = 15,
		Flags_File = 1,
		Flags_Dir = 2,
		Flags_Deleted = 4,
		Flags_OldVersion = 8,
		RootDirectory = 1
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetObjectID() {return mObjectID;}
	int16_t GetFlagsMustBeSet() {return mFlagsMustBeSet;}
	int16_t GetFlagsNotToBeSet() {return mFlagsNotToBeSet;}
	bool GetSendAttributes() {return mSendAttributes;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
	int16_t mFlagsMustBeSet;
	int16_t mFlagsNotToBeSet;
	bool mSendAttributes;
};

class BackupProtocolServerChangeDirAttributes : public BackupProtocolObject
{
public:
	BackupProtocolServerChangeDirAttributes();
	BackupProtocolServerChangeDirAttributes(const BackupProtocolServerChangeDirAttributes &rToCopy);
	~BackupProtocolServerChangeDirAttributes();
	int GetType() const;
	enum
	{
		TypeID = 22
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetObjectID() {return mObjectID;}
	int64_t GetAttributesModTime() {return mAttributesModTime;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
	int64_t mAttributesModTime;
};

class BackupProtocolServerDeleteDirectory : public BackupProtocolObject
{
public:
	BackupProtocolServerDeleteDirectory();
	BackupProtocolServerDeleteDirectory(const BackupProtocolServerDeleteDirectory &rToCopy);
	~BackupProtocolServerDeleteDirectory();
	int GetType() const;
	enum
	{
		TypeID = 23
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetObjectID() {return mObjectID;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
};

class BackupProtocolServerUndeleteDirectory : public BackupProtocolObject
{
public:
	BackupProtocolServerUndeleteDirectory();
	BackupProtocolServerUndeleteDirectory(const BackupProtocolServerUndeleteDirectory &rToCopy);
	~BackupProtocolServerUndeleteDirectory();
	int GetType() const;
	enum
	{
		TypeID = 24
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetObjectID() {return mObjectID;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
};

class BackupProtocolServerStoreFile : public BackupProtocolObject
{
public:
	BackupProtocolServerStoreFile();
	BackupProtocolServerStoreFile(const BackupProtocolServerStoreFile &rToCopy);
	~BackupProtocolServerStoreFile();
	int GetType() const;
	enum
	{
		TypeID = 30
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetDirectoryObjectID() {return mDirectoryObjectID;}
	int64_t GetModificationTime() {return mModificationTime;}
	int64_t GetAttributesHash() {return mAttributesHash;}
	int64_t GetDiffFromFileID() {return mDiffFromFileID;}
	const BackupStoreFilename& GetFilename() {return mFilename;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mDirectoryObjectID;
	int64_t mModificationTime;
	int64_t mAttributesHash;
	int64_t mDiffFromFileID;
	BackupStoreFilename mFilename;
};

class BackupProtocolServerGetFile : public BackupProtocolObject
{
public:
	BackupProtocolServerGetFile();
	BackupProtocolServerGetFile(const BackupProtocolServerGetFile &rToCopy);
	~BackupProtocolServerGetFile();
	int GetType() const;
	enum
	{
		TypeID = 31
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetInDirectory() {return mInDirectory;}
	int64_t GetObjectID() {return mObjectID;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mInDirectory;
	int64_t mObjectID;
};

class BackupProtocolServerSetReplacementFileAttributes : public BackupProtocolObject
{
public:
	BackupProtocolServerSetReplacementFileAttributes();
	BackupProtocolServerSetReplacementFileAttributes(const BackupProtocolServerSetReplacementFileAttributes &rToCopy);
	~BackupProtocolServerSetReplacementFileAttributes();
	int GetType() const;
	enum
	{
		TypeID = 32
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetInDirectory() {return mInDirectory;}
	int64_t GetAttributesHash() {return mAttributesHash;}
	const BackupStoreFilename& GetFilename() {return mFilename;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mInDirectory;
	int64_t mAttributesHash;
	BackupStoreFilename mFilename;
};

class BackupProtocolServerDeleteFile : public BackupProtocolObject
{
public:
	BackupProtocolServerDeleteFile();
	BackupProtocolServerDeleteFile(const BackupProtocolServerDeleteFile &rToCopy);
	~BackupProtocolServerDeleteFile();
	int GetType() const;
	enum
	{
		TypeID = 33
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetInDirectory() {return mInDirectory;}
	const BackupStoreFilename& GetFilename() {return mFilename;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mInDirectory;
	BackupStoreFilename mFilename;
};

class BackupProtocolServerGetBlockIndexByID : public BackupProtocolObject
{
public:
	BackupProtocolServerGetBlockIndexByID();
	BackupProtocolServerGetBlockIndexByID(const BackupProtocolServerGetBlockIndexByID &rToCopy);
	~BackupProtocolServerGetBlockIndexByID();
	int GetType() const;
	enum
	{
		TypeID = 34
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetObjectID() {return mObjectID;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mObjectID;
};

class BackupProtocolServerGetBlockIndexByName : public BackupProtocolObject
{
public:
	BackupProtocolServerGetBlockIndexByName();
	BackupProtocolServerGetBlockIndexByName(const BackupProtocolServerGetBlockIndexByName &rToCopy);
	~BackupProtocolServerGetBlockIndexByName();
	int GetType() const;
	enum
	{
		TypeID = 35
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetInDirectory() {return mInDirectory;}
	const BackupStoreFilename& GetFilename() {return mFilename;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mInDirectory;
	BackupStoreFilename mFilename;
};

class BackupProtocolServerUndeleteFile : public BackupProtocolObject
{
public:
	BackupProtocolServerUndeleteFile();
	BackupProtocolServerUndeleteFile(const BackupProtocolServerUndeleteFile &rToCopy);
	~BackupProtocolServerUndeleteFile();
	int GetType() const;
	enum
	{
		TypeID = 36
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetInDirectory() {return mInDirectory;}
	int64_t GetObjectID() {return mObjectID;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mInDirectory;
	int64_t mObjectID;
};

class BackupProtocolServerGetAccountUsage : public BackupProtocolObject
{
public:
	BackupProtocolServerGetAccountUsage();
	BackupProtocolServerGetAccountUsage(const BackupProtocolServerGetAccountUsage &rToCopy);
	~BackupProtocolServerGetAccountUsage();
	int GetType() const;
	enum
	{
		TypeID = 40
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	virtual void LogSysLog(const char *Action) const;
private:
};

class BackupProtocolServerAccountUsage : public BackupProtocolObject
{
public:
	BackupProtocolServerAccountUsage();
	BackupProtocolServerAccountUsage(const BackupProtocolServerAccountUsage &rToCopy);
	~BackupProtocolServerAccountUsage();
	int GetType() const;
	enum
	{
		TypeID = 41
	};
	BackupProtocolServerAccountUsage(int64_t BlocksUsed, int64_t BlocksInOldFiles, int64_t BlocksInDeletedFiles, int64_t BlocksInDirectories, int64_t BlocksSoftLimit, int64_t BlocksHardLimit, int32_t BlockSize);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetBlocksUsed(int64_t BlocksUsed) {mBlocksUsed = BlocksUsed;}
	void SetBlocksInOldFiles(int64_t BlocksInOldFiles) {mBlocksInOldFiles = BlocksInOldFiles;}
	void SetBlocksInDeletedFiles(int64_t BlocksInDeletedFiles) {mBlocksInDeletedFiles = BlocksInDeletedFiles;}
	void SetBlocksInDirectories(int64_t BlocksInDirectories) {mBlocksInDirectories = BlocksInDirectories;}
	void SetBlocksSoftLimit(int64_t BlocksSoftLimit) {mBlocksSoftLimit = BlocksSoftLimit;}
	void SetBlocksHardLimit(int64_t BlocksHardLimit) {mBlocksHardLimit = BlocksHardLimit;}
	void SetBlockSize(int32_t BlockSize) {mBlockSize = BlockSize;}
	virtual void LogSysLog(const char *Action) const;
private:
	int64_t mBlocksUsed;
	int64_t mBlocksInOldFiles;
	int64_t mBlocksInDeletedFiles;
	int64_t mBlocksInDirectories;
	int64_t mBlocksSoftLimit;
	int64_t mBlocksHardLimit;
	int32_t mBlockSize;
};

class BackupProtocolServerGetIsAlive : public BackupProtocolObject
{
public:
	BackupProtocolServerGetIsAlive();
	BackupProtocolServerGetIsAlive(const BackupProtocolServerGetIsAlive &rToCopy);
	~BackupProtocolServerGetIsAlive();
	int GetType() const;
	enum
	{
		TypeID = 42
	};
	std::auto_ptr<ProtocolObject> DoCommand(BackupProtocolServer &rProtocol, BackupStoreContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	virtual void LogSysLog(const char *Action) const;
private:
};

class BackupProtocolServerIsAlive : public BackupProtocolObject
{
public:
	BackupProtocolServerIsAlive();
	BackupProtocolServerIsAlive(const BackupProtocolServerIsAlive &rToCopy);
	~BackupProtocolServerIsAlive();
	int GetType() const;
	enum
	{
		TypeID = 43
	};
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	virtual void LogSysLog(const char *Action) const;
private:
};

class BackupProtocolServer : public Protocol
{
public:
	BackupProtocolServer(IOStream &rStream);
	virtual ~BackupProtocolServer();

	std::auto_ptr<BackupProtocolObject> Receive();
	void Send(const BackupProtocolObject &rObject);
	void SetLogToSysLog(bool Log = false) {mLogToSysLog = Log;}
	void DoServer(BackupStoreContext &rContext);

	void SendStreamAfterCommand(IOStream *pStream);

private:
	BackupProtocolServer(const BackupProtocolServer &rToCopy);
	std::vector<IOStream*> mStreamsToSend;
	void DeleteStreamsToSend();
	virtual void InformStreamReceiving(u_int32_t Size);
	virtual void InformStreamSending(u_int32_t Size);
private:
	bool mLogToSysLog;

protected:	
	virtual std::auto_ptr<ProtocolObject> MakeProtocolObject(int ObjType);
	virtual const char *GetIdentString();
};

#endif // AUTOGEN_BACKUPPROTOCOLSERVER_H

