# asnber.h

Go to the documentation of this file.

    00001 /*
    00002  * asnper.h
    00003  *
    00004  * Abstract Syntax Notation Encoding Rules classes
    00005  *
    00006  * Portable Windows Library
    00007  *
    00008  */
    00009
    00010 #ifdef P_INCLUDE_BER
    00011
    00014 class PBER_Stream : public PASN_Stream
    00015 {
    00016     PCLASSINFO(PBER_Stream, PASN_Stream);
    00017   public:
    00018     PBER_Stream();
    00019     PBER_Stream(const PBYTEArray & bytes);
    00020     PBER_Stream(const BYTE * buf, PINDEX size);
    00021
    00022     PBER_Stream & operator=(const PBYTEArray & bytes);
    00023
    00024     virtual PBoolean Read(PChannel & chan);
    00025     virtual PBoolean Write(PChannel & chan);
    00026
    00027     virtual PBoolean NullDecode(PASN_Null &);
    00028     virtual void NullEncode(const PASN_Null &);
    00029     virtual PBoolean BooleanDecode(PASN_Boolean &);
    00030     virtual void BooleanEncode(const PASN_Boolean &);
    00031     virtual PBoolean IntegerDecode(PASN_Integer &);
    00032     virtual void IntegerEncode(const PASN_Integer &);
    00033     virtual PBoolean EnumerationDecode(PASN_Enumeration &);
    00034     virtual void EnumerationEncode(const PASN_Enumeration &);
    00035     virtual PBoolean RealDecode(PASN_Real &);
    00036     virtual void RealEncode(const PASN_Real &);
    00037     virtual PBoolean ObjectIdDecode(PASN_ObjectId &);
    00038     virtual void ObjectIdEncode(const PASN_ObjectId &);
    00039     virtual PBoolean BitStringDecode(PASN_BitString &);
    00040     virtual void BitStringEncode(const PASN_BitString &);
    00041     virtual PBoolean OctetStringDecode(PASN_OctetString &);
    00042     virtual void OctetStringEncode(const PASN_OctetString &);
    00043     virtual PBoolean ConstrainedStringDecode(PASN_ConstrainedString &);
    00044     virtual void ConstrainedStringEncode(const PASN_ConstrainedString &);
    00045     virtual PBoolean BMPStringDecode(PASN_BMPString &);
    00046     virtual void BMPStringEncode(const PASN_BMPString &);
    00047     virtual PBoolean ChoiceDecode(PASN_Choice &);
    00048     virtual void ChoiceEncode(const PASN_Choice &);
    00049     virtual PBoolean ArrayDecode(PASN_Array &);
    00050     virtual void ArrayEncode(const PASN_Array &);
    00051     virtual PBoolean SequencePreambleDecode(PASN_Sequence &);
    00052     virtual void SequencePreambleEncode(const PASN_Sequence &);
    00053     virtual PBoolean SequenceKnownDecode(PASN_Sequence &, PINDEX, PASN_Object &);
    00054     virtual void SequenceKnownEncode(const PASN_Sequence &, PINDEX, const PASN_Object &);
    00055     virtual PBoolean SequenceUnknownDecode(PASN_Sequence &);
    00056     virtual void SequenceUnknownEncode(const PASN_Sequence &);
    00057
    00058     virtual PASN_Object * CreateObject(unsigned tag,
    00059                                        PASN_Object::TagClass tagClass,
    00060                                        PBoolean primitive) const;
    00061
    00062     PBoolean HeaderDecode(unsigned & tagVal,
    00063                       PASN_Object::TagClass & tagClass,
    00064                       PBoolean & primitive,
    00065                       unsigned & len);
    00066     PBoolean HeaderDecode(PASN_Object & obj, unsigned & len);
    00067     void HeaderEncode(const PASN_Object & obj);
    00068 };
    00069
    00070
    00071 #endif
    00072
    00073
    00074 // End Of File ///////////////////////////////////////////////////////////////