source: trunk/ETSI-Testsuites/ETSI_auto_IOT/codec/c++/sip_codets.h @ 25

Last change on this file since 25 was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#ifndef  SIPCODETS_H
2#define  SIPCODETS_H
3
4#include <t3devlib/t3devlib.h>
5
6namespace t3devlib {
7namespace gen {
8
9//
10// Implementation of subtypes defined in the module LibSip_SIPTypesAndValues
11//
12
13// aliases (subtypes without restrictions)
14T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, CallidString, Charstring);
15T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, ContentCoding, Charstring);
16T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, DeltaSec, Charstring);
17T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, LanguageTag, Charstring);
18T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, OptionTag, Charstring);
19T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, ServerVal, Charstring);
20T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, PAssertedServiceValue, Charstring);
21T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, PrivacyValue, Charstring);
22T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, EventType, Charstring);
23T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, SubState, Charstring);
24T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, PMediaAuthValue, Charstring); //HEXDIG "0"-"9", "A"-"F"
25T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, Raw, Charstring);
26
27// subtypes of structured type
28// we just handle them by defining an alias to the base class
29//
30// FIXME: subtypes of structured types is not explicitely allowed in TTCN-3
31//        is this valid anyway ?
32#define PAssertedIDValue Addr_Union
33#define PPreferredIDValue Addr_Union
34
35//
36// Implementation of enumerated types (not handled by the generator yet)
37//
38
39class FieldName : public t3devlib::Enum
40{
41private:
42        static const char* msFields[];
43public:
44        FieldName() : Enum (msFields) {}
45
46        const char* GetModuleName() const { return "LibSip_SIPTypesAndValues"; }
47        const char* GetTypeName() const   { return "FieldName"; }
48
49        void Encode (Buffer& buffer) throw (EncodeError);
50        void Decode (Buffer& buffer) throw (DecodeError);
51};
52
53class Method : public t3devlib::Enum
54{
55private:
56        static const char* msSipMethods[];
57        static const char* msMethodValues[];
58public:
59        Method() : Enum (msSipMethods) {}
60
61        const char* GetModuleName() const { return "LibSip_SIPTypesAndValues"; }
62        const char* GetTypeName() const   { return "Method"; }
63
64        void Encode (Buffer& buffer) throw (EncodeError);
65        void Decode (Buffer& buffer) throw (DecodeError);
66};
67
68// definition additional attributes for the Addr_Union class
69// (included automatically in the generated codec)
70#define DEFINITIONS_Addr_Union()        int mPosition;
71
72
73}} //namespaces
74
75#endif
76
Note: See TracBrowser for help on using the repository browser.