
// Auto-generated file -- do not edit

#ifndef AUTOGEN_TESTPROTOCOLSERVER_H
#define AUTOGEN_TESTPROTOCOLSERVER_H

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

class IOStream;


#include "Utils.h"

class TestContext;

class TestProtocolServer;
	
class TestProtocolObject : public ProtocolObject
{
public:
	TestProtocolObject();
	virtual ~TestProtocolObject();
	TestProtocolObject(const TestProtocolObject &rToCopy);
	
	virtual std::auto_ptr<ProtocolObject> DoCommand(TestProtocolServer &rProtocol, TestContext &rContext);

};
class TestProtocolServerError : public TestProtocolObject
{
public:
	TestProtocolServerError();
	TestProtocolServerError(const TestProtocolServerError &rToCopy);
	~TestProtocolServerError();
	int GetType() const;
	enum
	{
		TypeID = 0
	};
	bool IsError(int &rTypeOut, int &rSubTypeOut) const;
	std::string GetMessage() const;
	TestProtocolServerError(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;}
private:
	int32_t mType;
	int32_t mSubType;
};

class TestProtocolServerHello : public TestProtocolObject
{
public:
	TestProtocolServerHello();
	TestProtocolServerHello(const TestProtocolServerHello &rToCopy);
	~TestProtocolServerHello();
	int GetType() const;
	enum
	{
		TypeID = 1
	};
	std::auto_ptr<ProtocolObject> DoCommand(TestProtocolServer &rProtocol, TestContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetNumber32() {return mNumber32;}
	int16_t GetNumber16() {return mNumber16;}
	int8_t GetNumber8() {return mNumber8;}
	const std::string& GetText() {return mText;}
	TestProtocolServerHello(int32_t Number32, int16_t Number16, int8_t Number8, const std::string& Text);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetNumber32(int32_t Number32) {mNumber32 = Number32;}
	void SetNumber16(int16_t Number16) {mNumber16 = Number16;}
	void SetNumber8(int8_t Number8) {mNumber8 = Number8;}
	void SetText(const std::string& Text) {mText = Text;}
private:
	int32_t mNumber32;
	int16_t mNumber16;
	int8_t mNumber8;
	std::string mText;
};

class TestProtocolServerLists : public TestProtocolObject
{
public:
	TestProtocolServerLists();
	TestProtocolServerLists(const TestProtocolServerLists &rToCopy);
	~TestProtocolServerLists();
	int GetType() const;
	enum
	{
		TypeID = 2
	};
	std::auto_ptr<ProtocolObject> DoCommand(TestProtocolServer &rProtocol, TestContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	const std::vector<std::string>& GetLotsOfText() {return mLotsOfText;}
private:
	std::vector<std::string> mLotsOfText;
};

class TestProtocolServerListsReply : public TestProtocolObject
{
public:
	TestProtocolServerListsReply();
	TestProtocolServerListsReply(const TestProtocolServerListsReply &rToCopy);
	~TestProtocolServerListsReply();
	int GetType() const;
	enum
	{
		TypeID = 3
	};
	TestProtocolServerListsReply(int32_t NumberOfStrings);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetNumberOfStrings(int32_t NumberOfStrings) {mNumberOfStrings = NumberOfStrings;}
private:
	int32_t mNumberOfStrings;
};

class TestProtocolServerQuit : public TestProtocolObject
{
public:
	TestProtocolServerQuit();
	TestProtocolServerQuit(const TestProtocolServerQuit &rToCopy);
	~TestProtocolServerQuit();
	int GetType() const;
	enum
	{
		TypeID = 4
	};
	bool IsConversationEnd() const;
	std::auto_ptr<ProtocolObject> DoCommand(TestProtocolServer &rProtocol, TestContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
private:
};

class TestProtocolServerSimple : public TestProtocolObject
{
public:
	TestProtocolServerSimple();
	TestProtocolServerSimple(const TestProtocolServerSimple &rToCopy);
	~TestProtocolServerSimple();
	int GetType() const;
	enum
	{
		TypeID = 5
	};
	std::auto_ptr<ProtocolObject> DoCommand(TestProtocolServer &rProtocol, TestContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetValue() {return mValue;}
private:
	int32_t mValue;
};

class TestProtocolServerSimpleReply : public TestProtocolObject
{
public:
	TestProtocolServerSimpleReply();
	TestProtocolServerSimpleReply(const TestProtocolServerSimpleReply &rToCopy);
	~TestProtocolServerSimpleReply();
	int GetType() const;
	enum
	{
		TypeID = 6
	};
	TestProtocolServerSimpleReply(int32_t ValuePlusOne);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetValuePlusOne(int32_t ValuePlusOne) {mValuePlusOne = ValuePlusOne;}
private:
	int32_t mValuePlusOne;
};

class TestProtocolServerGetStream : public TestProtocolObject
{
public:
	TestProtocolServerGetStream();
	TestProtocolServerGetStream(const TestProtocolServerGetStream &rToCopy);
	~TestProtocolServerGetStream();
	int GetType() const;
	enum
	{
		TypeID = 7
	};
	std::auto_ptr<ProtocolObject> DoCommand(TestProtocolServer &rProtocol, TestContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetStartingValue() {return mStartingValue;}
	bool GetUncertainSize() {return mUncertainSize;}
	TestProtocolServerGetStream(int32_t StartingValue, bool UncertainSize);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetStartingValue(int32_t StartingValue) {mStartingValue = StartingValue;}
	void SetUncertainSize(bool UncertainSize) {mUncertainSize = UncertainSize;}
private:
	int32_t mStartingValue;
	bool mUncertainSize;
};

class TestProtocolServerSendStream : public TestProtocolObject
{
public:
	TestProtocolServerSendStream();
	TestProtocolServerSendStream(const TestProtocolServerSendStream &rToCopy);
	~TestProtocolServerSendStream();
	int GetType() const;
	enum
	{
		TypeID = 8
	};
	std::auto_ptr<ProtocolObject> DoCommand(TestProtocolServer &rProtocol, TestContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int64_t GetValue() {return mValue;}
private:
	int64_t mValue;
};

class TestProtocolServerString : public TestProtocolObject
{
public:
	TestProtocolServerString();
	TestProtocolServerString(const TestProtocolServerString &rToCopy);
	~TestProtocolServerString();
	int GetType() const;
	enum
	{
		TypeID = 9
	};
	std::auto_ptr<ProtocolObject> DoCommand(TestProtocolServer &rProtocol, TestContext &rContext); // IMPLEMENT THIS
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	const std::string& GetTest() {return mTest;}
	TestProtocolServerString(const std::string& Test);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetTest(const std::string& Test) {mTest = Test;}
private:
	std::string mTest;
};

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

	std::auto_ptr<TestProtocolObject> Receive();
	void Send(const TestProtocolObject &rObject);
	void DoServer(TestContext &rContext);

	void SendStreamAfterCommand(IOStream *pStream);

private:
	TestProtocolServer(const TestProtocolServer &rToCopy);
	std::vector<IOStream*> mStreamsToSend;
	void DeleteStreamsToSend();

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

#endif // AUTOGEN_TESTPROTOCOLSERVER_H

