[22] | 1 | #ifndef SIPCODETS_H |
---|
| 2 | #define SIPCODETS_H |
---|
| 3 | |
---|
| 4 | #include <t3devlib/t3devlib.h> |
---|
| 5 | |
---|
| 6 | namespace t3devlib { |
---|
| 7 | namespace gen { |
---|
| 8 | |
---|
| 9 | // |
---|
| 10 | // Implementation of subtypes defined in the module LibSip_SIPTypesAndValues |
---|
| 11 | // |
---|
| 12 | |
---|
| 13 | // aliases (subtypes without restrictions) |
---|
| 14 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, CallidString, Charstring); |
---|
| 15 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, ContentCoding, Charstring); |
---|
| 16 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, DeltaSec, Charstring); |
---|
| 17 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, LanguageTag, Charstring); |
---|
| 18 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, OptionTag, Charstring); |
---|
| 19 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, ServerVal, Charstring); |
---|
| 20 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, PAssertedServiceValue, Charstring); |
---|
| 21 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, PrivacyValue, Charstring); |
---|
| 22 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, EventType, Charstring); |
---|
| 23 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, SubState, Charstring); |
---|
| 24 | T3DEVLIB_BASIC_DEFINITION (LibSip_SIPTypesAndValues, PMediaAuthValue, Charstring); //HEXDIG "0"-"9", "A"-"F" |
---|
| 25 | T3DEVLIB_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 | |
---|
| 39 | class FieldName : public t3devlib::Enum |
---|
| 40 | { |
---|
| 41 | private: |
---|
| 42 | static const char* msFields[]; |
---|
| 43 | public: |
---|
| 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 | |
---|
| 53 | class Method : public t3devlib::Enum |
---|
| 54 | { |
---|
| 55 | private: |
---|
| 56 | static const char* msSipMethods[]; |
---|
| 57 | static const char* msMethodValues[]; |
---|
| 58 | public: |
---|
| 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 | |
---|