#ifndef  MSRPCODETS_H
#define  MSRPCODETS_H

#include <t3devlib/t3devlib.h>

namespace t3devlib {
namespace gen {

//MSRP definitions
//type charstring TransactionID;
T3DEVLIB_BASIC_DEFINITION (LibMsrp_TypesAndValues, TransactionID, Charstring);
//type charstring Ident length (3..31);
T3DEVLIB_VARIABLE_SIZE_STRING_DEFINITION (LibMsrp_TypesAndValues, Ident, Charstring, (3*8), (31*8));
//type octetstring Token;
T3DEVLIB_BASIC_DEFINITION (LibMsrp_TypesAndValues, Token, Charstring);
//type integer Namespace;// length (3);
T3DEVLIB_ASCII_INTEGER_DEFINITION (LibMsrp_TypesAndValues, Namespace, Unsigned);
//type integer StatusCode;
T3DEVLIB_ASCII_INTEGER_DEFINITION (LibMsrp_TypesAndValues, StatusCode, Unsigned);
//type charstring Qop_Value;
T3DEVLIB_BASIC_DEFINITION (LibMsrp_TypesAndValues, Qop_Value, Charstring);
//type charstring SessionID;
T3DEVLIB_BASIC_DEFINITION (LibMsrp_TypesAndValues, SessionID, Charstring);
//type octetstring Data;
T3DEVLIB_BASIC_DEFINITION (LibMsrp_TypesAndValues, Data, Octetstring);

//
// Implementation of enumerated types (not handled by the generator yet)
//

class MsrpKeywords : public ::t3devlib::Enum
{
private:
	static const char* msKeywordEnums[];
	static const char* msKeywordStrings[];
public:
	MsrpKeywords() : Enum (msKeywordEnums) {}

	const char* GetModuleName() const { return "LibMsrp_TypesAndValues"; }
	const char* GetTypeName() const   { return "MsrpKeywords"; }

	void Encode (Buffer& buffer) throw (EncodeError);
	void Decode (Buffer& buffer) throw (DecodeError);
};

class MsrpMethod : public ::t3devlib::Enum
{
private:
	static const char* msMethodEnumNames[];
	static const char* msMethodStringValues[];
public:
	MsrpMethod() : Enum (msMethodEnumNames) {}

	const char* GetModuleName() const { return "LibMsrp_TypesAndValues"; }
	const char* GetTypeName() const   { return "MsrpMethod"; }

	void Encode (Buffer& buffer) throw (EncodeError);
	void Decode (Buffer& buffer) throw (DecodeError);
};

class HeaderName : public ::t3devlib::Enum
{
private:
	static const char* msHeaderEnumNames[];
	static const char* msHeaderStringValues[];
public:
	HeaderName() : Enum (msHeaderEnumNames) {}

	const char* GetModuleName() const { return "LibMsrp_TypesAndValues"; }
	const char* GetTypeName() const   { return "HeaderName"; }

	void Encode (Buffer& buffer) throw (EncodeError);
	void Decode (Buffer& buffer) throw (DecodeError);
};

class ContinuationFlag : public ::t3devlib::Enum
{
private:
	static const char* msContinuationFlagNames[];
	static const char* msContinuationFlagValues[];
public:
	ContinuationFlag() : Enum (msContinuationFlagNames) {}

	const char* GetModuleName() const { return "LibMsrp_TypesAndValues"; }
	const char* GetTypeName() const   { return "ContinuationFlag"; }

	void Encode (Buffer& buffer) throw (EncodeError);
	void Decode (Buffer& buffer) throw (DecodeError);
};


#define DEFINITIONS_MimeExtensionField()	std::string m_shname;
#define DEFINITIONS_Digest()  bool b_needComma;
#define DEFINITIONS_DigestResponse()  bool b_needComma;
#define DEFINITIONS_AInfo() bool bIsFirstField;
}} //namespaces

#endif

