PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
asnxer.h
Go to the documentation of this file.
1 /*
2 * asnxer.h
3 *
4 * Abstract Syntax Notation Encoding Rules classes
5 *
6 * Portable Windows Library
7 *
8 */
9
10 #ifdef P_INCLUDE_XER
11
14 class PXER_Stream : public PASN_Stream
15 {
16 PCLASSINFO(PXER_Stream, PASN_Stream);
17 public:
18 PXER_Stream(PXMLElement * elem);
19 PXER_Stream(PXMLElement * elem, const PBYTEArray & bytes);
20 PXER_Stream(PXMLElement * elem, const BYTE * buf, PINDEX size);
21
22 virtual PBoolean Read(PChannel & chan);
23 virtual PBoolean Write(PChannel & chan);
24
25 virtual PBoolean NullDecode(PASN_Null &);
26 virtual void NullEncode(const PASN_Null &);
27 virtual PBoolean BooleanDecode(PASN_Boolean &);
28 virtual void BooleanEncode(const PASN_Boolean &);
29 virtual PBoolean IntegerDecode(PASN_Integer &);
30 virtual void IntegerEncode(const PASN_Integer &);
31 virtual PBoolean EnumerationDecode(PASN_Enumeration &);
32 virtual void EnumerationEncode(const PASN_Enumeration &);
33 virtual PBoolean RealDecode(PASN_Real &);
34 virtual void RealEncode(const PASN_Real &);
35 virtual PBoolean ObjectIdDecode(PASN_ObjectId &);
36 virtual void ObjectIdEncode(const PASN_ObjectId &);
37 virtual PBoolean BitStringDecode(PASN_BitString &);
38 virtual void BitStringEncode(const PASN_BitString &);
39 virtual PBoolean OctetStringDecode(PASN_OctetString &);
40 virtual void OctetStringEncode(const PASN_OctetString &);
41 virtual PBoolean ConstrainedStringDecode(PASN_ConstrainedString &);
42 virtual void ConstrainedStringEncode(const PASN_ConstrainedString &);
43 virtual PBoolean BMPStringDecode(PASN_BMPString &);
44 virtual void BMPStringEncode(const PASN_BMPString &);
45 virtual PBoolean ChoiceDecode(PASN_Choice &);
46 virtual void ChoiceEncode(const PASN_Choice &);
47 virtual PBoolean ArrayDecode(PASN_Array &);
48 virtual void ArrayEncode(const PASN_Array &);
49 virtual PBoolean SequencePreambleDecode(PASN_Sequence &);
50 virtual void SequencePreambleEncode(const PASN_Sequence &);
51 virtual PBoolean SequenceKnownDecode(PASN_Sequence &, PINDEX, PASN_Object &);
52 virtual void SequenceKnownEncode(const PASN_Sequence &, PINDEX, const PASN_Object &);
53 virtual PBoolean SequenceUnknownDecode(PASN_Sequence &);
54 virtual void SequenceUnknownEncode(const PASN_Sequence &);
55
56 PXMLElement * GetCurrentElement() { return position; }
57 PXMLElement * SetCurrentElement(PXMLElement * elem) { return position = elem; }
58
59 protected:
60 PXMLElement * position;
61 };
62
63 #endif
64
65
66 // End Of File ///////////////////////////////////////////////////////////////