
// Auto-generated file -- do not edit

#ifndef AUTOGEN_TESTPROTOCOLCLIENT_H
#define AUTOGEN_TESTPROTOCOLCLIENT_H

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

class IOStream;


class TestProtocolClientError : public ProtocolObject
{
public:
	TestProtocolClientError();
	TestProtocolClientError(const TestProtocolClientError &rToCopy);
	~TestProtocolClientError();
	int GetType() const;
	enum
	{
		TypeID = 0
	};
	bool IsError(int &rTypeOut, int &rSubTypeOut) const;
	std::string GetMessage() const;
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetType() {return mType;}
	int32_t GetSubType() {return mSubType;}
private:
	int32_t mType;
	int32_t mSubType;
};

class TestProtocolClientHello : public ProtocolObject
{
public:
	TestProtocolClientHello();
	TestProtocolClientHello(const TestProtocolClientHello &rToCopy);
	~TestProtocolClientHello();
	int GetType() const;
	enum
	{
		TypeID = 1
	};
	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;}
	TestProtocolClientHello(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 TestProtocolClientLists : public ProtocolObject
{
public:
	TestProtocolClientLists();
	TestProtocolClientLists(const TestProtocolClientLists &rToCopy);
	~TestProtocolClientLists();
	int GetType() const;
	enum
	{
		TypeID = 2
	};
	TestProtocolClientLists(const std::vector<std::string>& LotsOfText);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetLotsOfText(const std::vector<std::string>& LotsOfText) {mLotsOfText = LotsOfText;}
private:
	std::vector<std::string> mLotsOfText;
};

class TestProtocolClientListsReply : public ProtocolObject
{
public:
	TestProtocolClientListsReply();
	TestProtocolClientListsReply(const TestProtocolClientListsReply &rToCopy);
	~TestProtocolClientListsReply();
	int GetType() const;
	enum
	{
		TypeID = 3
	};
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetNumberOfStrings() {return mNumberOfStrings;}
private:
	int32_t mNumberOfStrings;
};

class TestProtocolClientQuit : public ProtocolObject
{
public:
	TestProtocolClientQuit();
	TestProtocolClientQuit(const TestProtocolClientQuit &rToCopy);
	~TestProtocolClientQuit();
	int GetType() const;
	enum
	{
		TypeID = 4
	};
	bool IsConversationEnd() const;
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
private:
};

class TestProtocolClientSimple : public ProtocolObject
{
public:
	TestProtocolClientSimple();
	TestProtocolClientSimple(const TestProtocolClientSimple &rToCopy);
	~TestProtocolClientSimple();
	int GetType() const;
	enum
	{
		TypeID = 5
	};
	TestProtocolClientSimple(int32_t Value);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetValue(int32_t Value) {mValue = Value;}
private:
	int32_t mValue;
};

class TestProtocolClientSimpleReply : public ProtocolObject
{
public:
	TestProtocolClientSimpleReply();
	TestProtocolClientSimpleReply(const TestProtocolClientSimpleReply &rToCopy);
	~TestProtocolClientSimpleReply();
	int GetType() const;
	enum
	{
		TypeID = 6
	};
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetValuePlusOne() {return mValuePlusOne;}
private:
	int32_t mValuePlusOne;
};

class TestProtocolClientGetStream : public ProtocolObject
{
public:
	TestProtocolClientGetStream();
	TestProtocolClientGetStream(const TestProtocolClientGetStream &rToCopy);
	~TestProtocolClientGetStream();
	int GetType() const;
	enum
	{
		TypeID = 7
	};
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	int32_t GetStartingValue() {return mStartingValue;}
	bool GetUncertainSize() {return mUncertainSize;}
	TestProtocolClientGetStream(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 TestProtocolClientSendStream : public ProtocolObject
{
public:
	TestProtocolClientSendStream();
	TestProtocolClientSendStream(const TestProtocolClientSendStream &rToCopy);
	~TestProtocolClientSendStream();
	int GetType() const;
	enum
	{
		TypeID = 8
	};
	TestProtocolClientSendStream(int64_t Value);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetValue(int64_t Value) {mValue = Value;}
private:
	int64_t mValue;
};

class TestProtocolClientString : public ProtocolObject
{
public:
	TestProtocolClientString();
	TestProtocolClientString(const TestProtocolClientString &rToCopy);
	~TestProtocolClientString();
	int GetType() const;
	enum
	{
		TypeID = 9
	};
	void SetPropertiesFromStreamData(Protocol &rProtocol);
	const std::string& GetTest() {return mTest;}
	TestProtocolClientString(const std::string& Test);
	void WritePropertiesToStreamData(Protocol &rProtocol) const;
	void SetTest(const std::string& Test) {mTest = Test;}
private:
	std::string mTest;
};

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

	std::auto_ptr<ProtocolObject> Receive();
	void Send(const ProtocolObject &rObject);
	std::auto_ptr<TestProtocolClientHello> Query(const TestProtocolClientHello &rQuery);
	std::auto_ptr<TestProtocolClientListsReply> Query(const TestProtocolClientLists &rQuery);
	std::auto_ptr<TestProtocolClientQuit> Query(const TestProtocolClientQuit &rQuery);
	std::auto_ptr<TestProtocolClientSimpleReply> Query(const TestProtocolClientSimple &rQuery);
	std::auto_ptr<TestProtocolClientGetStream> Query(const TestProtocolClientGetStream &rQuery);
	std::auto_ptr<TestProtocolClientGetStream> Query(const TestProtocolClientSendStream &rQuery, IOStream &rStream);
	std::auto_ptr<TestProtocolClientString> Query(const TestProtocolClientString &rQuery);

	inline std::auto_ptr<TestProtocolClientHello> QueryHello(int32_t Number32, int16_t Number16, int8_t Number8, const std::string& Text)
	{
		TestProtocolClientHello send(Number32, Number16, Number8, Text);
		return Query(send);
	}
	inline std::auto_ptr<TestProtocolClientListsReply> QueryLists(const std::vector<std::string>& LotsOfText)
	{
		TestProtocolClientLists send(LotsOfText);
		return Query(send);
	}
	inline std::auto_ptr<TestProtocolClientQuit> QueryQuit()
	{
		TestProtocolClientQuit send;
		return Query(send);
	}
	inline std::auto_ptr<TestProtocolClientSimpleReply> QuerySimple(int32_t Value)
	{
		TestProtocolClientSimple send(Value);
		return Query(send);
	}
	inline std::auto_ptr<TestProtocolClientGetStream> QueryGetStream(int32_t StartingValue, bool UncertainSize)
	{
		TestProtocolClientGetStream send(StartingValue, UncertainSize);
		return Query(send);
	}
	inline std::auto_ptr<TestProtocolClientGetStream> QuerySendStream(int64_t Value, IOStream &rStream)
	{
		TestProtocolClientSendStream send(Value);
		return Query(send, rStream);
	}
	inline std::auto_ptr<TestProtocolClientString> QueryString(const std::string& Test)
	{
		TestProtocolClientString send(Test);
		return Query(send);
	}

private:
	TestProtocolClient(const TestProtocolClient &rToCopy);

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

#endif // AUTOGEN_TESTPROTOCOLCLIENT_H

