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
asnber.h
Go to the documentation of this file.
1 /*
2 * asnper.h
3 *
4 * Abstract Syntax Notation Encoding Rules classes
5 *
6 * Portable Windows Library
7 *
8 */
9
10 #ifdef P_INCLUDE_BER
11
14 class PBER_Stream : public PASN_Stream
15 {
16 PCLASSINFO(PBER_Stream, PASN_Stream);
17 public:
18 PBER_Stream();
19 PBER_Stream(const PBYTEArray & bytes);
20 PBER_Stream(const BYTE * buf, PINDEX size);
21
22 PBER_Stream & operator=(const PBYTEArray & bytes);
23
24 virtual PBoolean Read(PChannel & chan);
25 virtual PBoolean Write(PChannel & chan);
26
27 virtual PBoolean NullDecode(PASN_Null &);
28 virtual void NullEncode(const PASN_Null &);
29 virtual PBoolean BooleanDecode(PASN_Boolean &);
30 virtual void BooleanEncode(const PASN_Boolean &);
31 virtual PBoolean IntegerDecode(PASN_Integer &);
32 virtual void IntegerEncode(const PASN_Integer &);
33 virtual PBoolean EnumerationDecode(PASN_Enumeration &);
34 virtual void EnumerationEncode(const PASN_Enumeration &);
35 virtual PBoolean RealDecode(PASN_Real &);
36 virtual void RealEncode(const PASN_Real &);
37 virtual PBoolean ObjectIdDecode(PASN_ObjectId &);
38 virtual void ObjectIdEncode(const PASN_ObjectId &);
39 virtual PBoolean BitStringDecode(PASN_BitString &);
40 virtual void BitStringEncode(const PASN_BitString &);
41 virtual PBoolean OctetStringDecode(PASN_OctetString &);
42 virtual void OctetStringEncode(const PASN_OctetString &);
43 virtual PBoolean ConstrainedStringDecode(PASN_ConstrainedString &);
44 virtual void ConstrainedStringEncode(const PASN_ConstrainedString &);
45 virtual PBoolean BMPStringDecode(PASN_BMPString &);
46 virtual void BMPStringEncode(const PASN_BMPString &);
47 virtual PBoolean ChoiceDecode(PASN_Choice &);
48 virtual void ChoiceEncode(const PASN_Choice &);
49 virtual PBoolean ArrayDecode(PASN_Array &);
50 virtual void ArrayEncode(const PASN_Array &);
51 virtual PBoolean SequencePreambleDecode(PASN_Sequence &);
52 virtual void SequencePreambleEncode(const PASN_Sequence &);
53 virtual PBoolean SequenceKnownDecode(PASN_Sequence &, PINDEX, PASN_Object &);
54 virtual void SequenceKnownEncode(const PASN_Sequence &, PINDEX, const PASN_Object &);
55 virtual PBoolean SequenceUnknownDecode(PASN_Sequence &);
56 virtual void SequenceUnknownEncode(const PASN_Sequence &);
57
58 virtual PASN_Object * CreateObject(unsigned tag,
59 PASN_Object::TagClass tagClass,
60 PBoolean primitive) const;
61
62 PBoolean HeaderDecode(unsigned & tagVal,
63 PASN_Object::TagClass & tagClass,
64 PBoolean & primitive,
65 unsigned & len);
66 PBoolean HeaderDecode(PASN_Object & obj, unsigned & len);
67 void HeaderEncode(const PASN_Object & obj);
68 };
69
70
71 #endif
72
73
74 // End Of File ///////////////////////////////////////////////////////////////