asner.h
Go to the documentation of this file.
/*
* asner.h
*
* Abstract Syntax Notation Encoding Rules classes
*
* Portable Windows Library
*
* Copyright (c) 1993-2002 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Portable Windows Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Contributor(s): ______________________________________.
*
* $Revision: 24177 $
* $Author: rjongbloed $
* $Date: 2010-04-05 06:52:04 -0500 (Mon, 05 Apr 2010) $
*/
#ifndef PTLIB_ASNER_H
#define PTLIB_ASNER_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
// provide options to omit vertain encodings, if needed
#define P_INCLUDE_PER
#define P_INCLUDE_BER
#define P_INCLUDE_XER
class PASN_Stream;
class PBER_Stream;
class PPER_Stream;
#ifdef P_EXPAT
class PXER_Stream;
class PXMLElement;
#else
#undef P_INCLUDE_XER
#endif
class PASN_Object : public PObject
{
PCLASSINFO(PASN_Object, PObject);
public:
virtual PString GetTypeAsString() const = 0;
PINDEX GetObjectLength() const;
virtual PINDEX GetDataLength() const = 0;
virtual PBoolean IsPrimitive() const { return true; }
virtual PBoolean Decode(PASN_Stream &) = 0;
virtual void Encode(PASN_Stream &) const = 0;
PBoolean IsExtendable() const { return extendable; }
void SetExtendable(PBoolean ext = true) { extendable = ext; }
enum TagClass {
UniversalTagClass,
ApplicationTagClass,
ContextSpecificTagClass,
PrivateTagClass,
DefaultTagClass
};
TagClass GetTagClass() const { return tagClass; }
enum UniversalTags {
InvalidUniversalTag,
UniversalBoolean,
UniversalInteger,
UniversalBitString,
UniversalOctetString,
UniversalNull,
UniversalObjectId,
UniversalObjectDescriptor,
UniversalExternalType,
UniversalReal,
UniversalEnumeration,
UniversalEmbeddedPDV,
UniversalSequence = 16,
UniversalSet,
UniversalNumericString,
UniversalPrintableString,
UniversalTeletexString,
UniversalVideotexString,
UniversalIA5String,
UniversalUTCTime,
UniversalGeneralisedTime,
UniversalGeneralizedTime = UniversalGeneralisedTime,
UniversalGraphicString,
UniversalVisibleString,
UniversalGeneralString,
UniversalUniversalString,
UniversalBMPString = 30
};
unsigned GetTag() const { return tag; }
virtual void SetTag(unsigned newTag, TagClass tagClass = DefaultTagClass);
enum ConstraintType {
Unconstrained,
PartiallyConstrained,
FixedConstraint,
ExtendableConstraint
};
enum MinimumValueTag { MinimumValue = INT_MIN };
enum MaximumValueTag { MaximumValue = INT_MAX };
void SetConstraints(ConstraintType type, int value)
{ SetConstraintBounds(type, value, value); }
void SetConstraints(ConstraintType, int lower, MaximumValueTag /*upper*/)
{ SetConstraintBounds(PartiallyConstrained, (int)lower, lower < 0 ? INT_MAX : UINT_MAX); }
void SetConstraints(ConstraintType, MinimumValueTag lower, unsigned upper)
{ SetConstraintBounds(PartiallyConstrained, (int)lower, (unsigned)upper); }
void SetConstraints(ConstraintType, MinimumValueTag lower, MaximumValueTag upper)
{ SetConstraintBounds(PartiallyConstrained, (int)lower, (unsigned)upper); }
void SetConstraints(ConstraintType type, int lower, unsigned upper)
{ SetConstraintBounds(type, lower, upper); }
virtual void SetConstraintBounds(ConstraintType type, int lower, unsigned upper);
virtual void SetCharacterSet(ConstraintType ctype, const char * charSet);
virtual void SetCharacterSet(ConstraintType ctype, unsigned firstChar, unsigned lastChar);
static PINDEX GetMaximumArraySize();
static void SetMaximumArraySize(PINDEX sz);
static PINDEX GetMaximumStringSize();
static void SetMaximumStringSize(PINDEX sz);
protected:
PASN_Object(unsigned tag, TagClass tagClass, PBoolean extend = false);
PBoolean extendable;
TagClass tagClass;
unsigned tag;
};
class PASN_ConstrainedObject : public PASN_Object
{
PCLASSINFO(PASN_ConstrainedObject, PASN_Object);
public:
PBoolean IsConstrained() const { return constraint != Unconstrained; }
int GetLowerLimit() const { return lowerLimit; }
unsigned GetUpperLimit() const { return upperLimit; }
PBoolean ConstrainedLengthDecode(PPER_Stream & strm, unsigned & length);
void ConstrainedLengthEncode(PPER_Stream & strm, unsigned length) const;
PBoolean ConstraintEncode(PPER_Stream & strm, unsigned value) const;
protected:
virtual void SetConstraintBounds(ConstraintType type, int lower, unsigned upper);
PASN_ConstrainedObject(unsigned tag, TagClass tagClass);
ConstraintType constraint;
int lowerLimit;
unsigned upperLimit;
};
class PASN_Null : public PASN_Object
{
PCLASSINFO(PASN_Null, PASN_Object);
public:
PASN_Null(unsigned tag = UniversalNull,
TagClass tagClass = UniversalTagClass);
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
};
class PASN_Boolean : public PASN_Object
{
PCLASSINFO(PASN_Boolean, PASN_Object);
public:
PASN_Boolean(PBoolean val = false);
PASN_Boolean(unsigned tag, TagClass tagClass, PBoolean val = false);
PASN_Boolean & operator=(PBoolean v) { value = v; return *this; }
operator PBoolean() const { return value; }
PBoolean GetValue() const { return value; }
void SetValue(PBoolean v) { value = v; }
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
protected:
PBoolean value;
};
class PASN_Integer : public PASN_ConstrainedObject
{
PCLASSINFO(PASN_Integer, PASN_ConstrainedObject);
public:
PASN_Integer(unsigned val = 0);
PASN_Integer(unsigned tag, TagClass tagClass, unsigned val = 0);
PASN_Integer & operator=(unsigned value);
operator unsigned() const { return value; }
unsigned GetValue() const { return value; }
void SetValue(unsigned v) { operator=(v); }
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual void SetConstraintBounds(ConstraintType type, int lower, unsigned upper);
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
#ifdef P_INCLUDE_PER
PBoolean DecodePER(PPER_Stream & strm);
void EncodePER(PPER_Stream & strm) const;
#endif
PBoolean IsUnsigned() const;
protected:
unsigned value;
};
struct PASN_Names{
const char * name;
PINDEX value;
};
class PASN_Enumeration : public PASN_Object
{
PCLASSINFO(PASN_Enumeration, PASN_Object);
public:
PASN_Enumeration(unsigned val = 0);
PASN_Enumeration(unsigned tag,
TagClass tagClass,
unsigned nEnums = P_MAX_INDEX,
PBoolean extendable = false,
unsigned val = 0);
PASN_Enumeration(unsigned tag,
TagClass tagClass,
unsigned nEnums,
PBoolean extendable,
const PASN_Names * nameSpec,
unsigned namesCnt,
unsigned val = 0);
PASN_Enumeration & operator=(unsigned v) { value = v; return *this; }
operator unsigned() const { return value; }
unsigned GetValue() const { return value; }
void SetValue(unsigned v) { value = v; }
unsigned GetMaximum() const { return maxEnumValue; }
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
#ifdef P_INCLUDE_PER
PBoolean DecodePER(PPER_Stream & strm);
void EncodePER(PPER_Stream & strm) const;
#endif
#ifdef P_INCLUDE_XER
virtual PBoolean DecodeXER(PXER_Stream & strm);
virtual void EncodeXER(PXER_Stream & strm) const;
#endif
PINDEX GetValueByName(PString name) const;
protected:
unsigned maxEnumValue;
unsigned value;
const PASN_Names *names;
unsigned namesCount;
};
class PASN_Real : public PASN_Object
{
PCLASSINFO(PASN_Real, PASN_Object);
public:
PASN_Real(double val = 0);
PASN_Real(unsigned tag, TagClass tagClass, double val = 0);
PASN_Real & operator=(double val) { value = val; return *this; }
operator double() const { return value; }
double GetValue() const { return value; }
void SetValue(double v) { value = v; }
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
protected:
double value;
};
class PASN_ObjectId : public PASN_Object
{
PCLASSINFO(PASN_ObjectId, PASN_Object);
public:
PASN_ObjectId(const char * dotstr = NULL);
PASN_ObjectId(unsigned tag, TagClass tagClass);
PASN_ObjectId(const PASN_ObjectId & other);
PASN_ObjectId & operator=(const PASN_ObjectId & other);
PASN_ObjectId & operator=(const char * dotstr);
PASN_ObjectId & operator=(const PString & dotstr);
PASN_ObjectId & operator=(const PUnsignedArray & numbers);
void SetValue(const PString & dotstr);
void SetValue(const PUnsignedArray & numbers) { value = numbers; }
void SetValue(const unsigned * numbers, PINDEX size);
bool operator==(const char * dotstr) const;
bool operator!=(const char * dotstr) const { return !operator==(dotstr); }
bool operator==(const PString & dotstr) const { return operator==((const char *)dotstr); }
bool operator!=(const PString & dotstr) const { return !operator==((const char *)dotstr); }
bool operator==(const PASN_ObjectId & id) const { return value == id.value; }
PINDEX GetSize() const { return value.GetSize(); }
unsigned operator[](PINDEX idx) const { return value[idx]; }
const PUnsignedArray & GetValue() const { return value; }
PString AsString() const;
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
PBoolean CommonDecode(PASN_Stream & strm, unsigned dataLen);
void CommonEncode(PBYTEArray & eObjId) const;
protected:
PUnsignedArray value;
};
class PASN_BitString : public PASN_ConstrainedObject
{
PCLASSINFO(PASN_BitString, PASN_ConstrainedObject);
public:
PASN_BitString(unsigned nBits = 0, const BYTE * buf = NULL);
PASN_BitString(unsigned tag, TagClass tagClass, unsigned nBits = 0);
PASN_BitString(const PASN_BitString & other);
PASN_BitString & operator=(const PASN_BitString & other);
void SetData(unsigned nBits, const PBYTEArray & bytes);
void SetData(unsigned nBits, const BYTE * buf, PINDEX size = 0);
const BYTE * GetDataPointer() const { return bitData; }
unsigned GetSize() const { return totalBits; }
PBoolean SetSize(unsigned nBits);
bool operator[](PINDEX bit) const;
void Set(unsigned bit);
void Clear(unsigned bit);
void Invert(unsigned bit);
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual void SetConstraintBounds(ConstraintType type, int lower, unsigned upper);
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
#ifdef P_INCLUDE_BER
PBoolean DecodeBER(PBER_Stream & strm, unsigned len);
void EncodeBER(PBER_Stream & strm) const;
#endif
#ifdef P_INCLUDE_PER
PBoolean DecodePER(PPER_Stream & strm);
void EncodePER(PPER_Stream & strm) const;
#endif
PBoolean DecodeSequenceExtensionBitmap(PPER_Stream & strm);
void EncodeSequenceExtensionBitmap(PPER_Stream & strm) const;
protected:
unsigned totalBits;
PBYTEArray bitData;
};
class PASN_OctetString : public PASN_ConstrainedObject
{
PCLASSINFO(PASN_OctetString, PASN_ConstrainedObject);
public:
PASN_OctetString(const char * str = NULL, PINDEX size = 0);
PASN_OctetString(unsigned tag, TagClass tagClass);
PASN_OctetString(const PASN_OctetString & other);
PASN_OctetString & operator=(const PASN_OctetString & other);
PASN_OctetString & operator=(const char * str);
PASN_OctetString & operator=(const PString & str);
PASN_OctetString & operator=(const PBYTEArray & arr);
void SetValue(const char * str) { operator=(str); }
void SetValue(const PString & str) { operator=(str); }
void SetValue(const PBYTEArray & arr) { operator=(arr); }
void SetValue(const BYTE * data, PINDEX len);
const PBYTEArray & GetValue() const { return value; }
operator const PBYTEArray &() const { return value; }
operator const BYTE *() const { return value; }
PString AsString() const;
BYTE operator[](PINDEX i) const { return value[i]; }
BYTE & operator[](PINDEX i) { return value[i]; }
BYTE * GetPointer(PINDEX sz = 0) { return value.GetPointer(sz); }
PINDEX GetSize() const { return value.GetSize(); }
PBoolean SetSize(PINDEX newSize);
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual void SetConstraintBounds(ConstraintType type, int lower, unsigned upper);
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
#ifdef P_INCLUDE_PER
PBoolean DecodePER(PPER_Stream & strm);
void EncodePER(PPER_Stream & strm) const;
#endif
PBoolean DecodeSubType(PASN_Object &) const;
void EncodeSubType(const PASN_Object &);
protected:
PBYTEArray value;
};
class PASN_ConstrainedString : public PASN_ConstrainedObject
{
PCLASSINFO(PASN_ConstrainedString, PASN_ConstrainedObject);
public:
PASN_ConstrainedString & operator=(const char * str);
PASN_ConstrainedString & operator=(const PString & str) { return operator=((const char *)str); }
operator const PString &() const { return value; }
const PString & GetValue() const { return value; }
void SetValue(const char * v) { operator=(v); }
void SetValue(const PString & v) { operator=(v); }
char operator[](PINDEX idx) const { return value[idx]; }
void SetCharacterSet(ConstraintType ctype, const char * charSet);
void SetCharacterSet(ConstraintType ctype, unsigned firstChar = 0, unsigned lastChar = 255);
void SetCharacterSet(const char * charSet, PINDEX size, ConstraintType ctype);
virtual Comparison Compare(const PObject & obj) const;
virtual void PrintOn(ostream & strm) const;
virtual void SetConstraintBounds(ConstraintType type, int lower, unsigned upper);
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
#ifdef P_INCLUDE_BER
PBoolean DecodeBER(PBER_Stream & strm, unsigned len);
void EncodeBER(PBER_Stream & strm) const;
#endif
#ifdef P_INCLUDE_PER
PBoolean DecodePER(PPER_Stream & strm);
void EncodePER(PPER_Stream & strm) const;
#endif
protected:
PASN_ConstrainedString(const char * canonicalSet, PINDEX setSize,
unsigned tag, TagClass tagClass);
PString value;
PCharArray characterSet;
const char * canonicalSet;
PINDEX canonicalSetSize;
unsigned canonicalSetBits;
unsigned charSetUnalignedBits;
unsigned charSetAlignedBits;
};
#define DECLARE_STRING_CLASS(name) \
class PASN_##name##String : public PASN_ConstrainedString { \
PCLASSINFO(PASN_##name##String, PASN_ConstrainedString); \
public: \
PASN_##name##String(const char * str = NULL); \
PASN_##name##String(unsigned tag, TagClass tagClass); \
PASN_##name##String & operator=(const char * str); \
PASN_##name##String & operator=(const PString & str); \
virtual PObject * Clone() const; \
virtual PString GetTypeAsString() const; \
}
DECLARE_STRING_CLASS(Numeric);
DECLARE_STRING_CLASS(Printable);
DECLARE_STRING_CLASS(Visible);
DECLARE_STRING_CLASS(IA5);
DECLARE_STRING_CLASS(General);
class PASN_BMPString : public PASN_ConstrainedObject
{
PCLASSINFO(PASN_BMPString, PASN_ConstrainedObject);
public:
PASN_BMPString(const char * str = NULL);
PASN_BMPString(const PWCharArray & wstr);
PASN_BMPString(unsigned tag, TagClass tagClass);
PASN_BMPString(const PASN_BMPString & other);
PASN_BMPString & operator=(const PASN_BMPString & other);
PASN_BMPString & operator=(const char * v) { return operator=(PString(v).AsUCS2()); }
PASN_BMPString & operator=(const PString & v) { return operator=(v.AsUCS2()); }
PASN_BMPString & operator=(const PWCharArray & v);
operator PString() const { return GetValue(); }
operator PWCharArray() const { return value; }
PString GetValue() const { return value; }
void GetValue(PWCharArray & v) const { v = value; }
void SetValue(const char * v) { operator=(PString(v).AsUCS2()); }
void SetValue(const PString & v) { operator=(v.AsUCS2()); }
void SetValue(const PWCharArray & v) { operator=(v); }
void SetValue(const PASN_BMPString & v) { operator=(v.value); }
void SetValueRaw(const PWCharArray & v) { SetValueRaw(v, v.GetSize()); }
void SetValueRaw(const wchar_t * val, PINDEX len);
void SetCharacterSet(ConstraintType ctype, const char * charSet);
void SetCharacterSet(ConstraintType ctype, const PWCharArray & charSet);
void SetCharacterSet(ConstraintType ctype, unsigned firstChar, unsigned lastChar);
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
#ifdef P_INCLUDE_BER
PBoolean DecodeBER(PBER_Stream & strm, unsigned len);
void EncodeBER(PBER_Stream & strm) const;
#endif
#ifdef P_INCLUDE_PER
PBoolean DecodePER(PPER_Stream & strm);
void EncodePER(PPER_Stream & strm) const;
#endif
protected:
void Construct();
PBoolean IsLegalCharacter(WORD ch);
PWCharArray value;
PWCharArray characterSet;
wchar_t firstChar, lastChar;
unsigned charSetUnalignedBits;
unsigned charSetAlignedBits;
};
class PASN_GeneralisedTime : public PASN_VisibleString
{
PCLASSINFO(PASN_GeneralisedTime, PASN_VisibleString);
public:
PASN_GeneralisedTime()
: PASN_VisibleString(UniversalGeneralisedTime, UniversalTagClass) { }
PASN_GeneralisedTime(const PTime & time)
: PASN_VisibleString(UniversalGeneralisedTime, UniversalTagClass) { SetValue(time); }
PASN_GeneralisedTime(unsigned theTag, TagClass theTagClass)
: PASN_VisibleString(theTag, theTagClass) { }
PASN_GeneralisedTime & operator=(const PTime & time);
void SetValue(const PTime & time) { operator=(time); }
PTime GetValue() const;
};
class PASN_UniversalTime : public PASN_VisibleString
{
PCLASSINFO(PASN_UniversalTime, PASN_VisibleString);
public:
PASN_UniversalTime()
: PASN_VisibleString(UniversalUTCTime, UniversalTagClass) { }
PASN_UniversalTime(const PTime & time)
: PASN_VisibleString(UniversalUTCTime, UniversalTagClass) { SetValue(time); }
PASN_UniversalTime(unsigned theTag, TagClass theTagClass)
: PASN_VisibleString(theTag, theTagClass) { }
PASN_UniversalTime & operator=(const PTime & time);
void SetValue(const PTime & time) { operator=(time); }
PTime GetValue() const;
};
class PASN_Sequence;
class PASN_Choice : public PASN_Object
{
PCLASSINFO(PASN_Choice, PASN_Object);
public:
~PASN_Choice();
virtual void SetTag(unsigned newTag, TagClass tagClass = DefaultTagClass);
PString GetTagName() const;
PASN_Object & GetObject() const;
PBoolean IsValid() const { return choice != NULL; }
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
operator PASN_Null &() const;
operator PASN_Boolean &() const;
operator PASN_Integer &() const;
operator PASN_Enumeration &() const;
operator PASN_Real &() const;
operator PASN_ObjectId &() const;
operator PASN_BitString &() const;
operator PASN_OctetString &() const;
operator PASN_NumericString &() const;
operator PASN_PrintableString &() const;
operator PASN_VisibleString &() const;
operator PASN_IA5String &() const;
operator PASN_GeneralString &() const;
operator PASN_BMPString &() const;
operator PASN_Sequence &() const;
#else
operator PASN_Null &();
operator PASN_Boolean &();
operator PASN_Integer &();
operator PASN_Enumeration &();
operator PASN_Real &();
operator PASN_ObjectId &();
operator PASN_BitString &();
operator PASN_OctetString &();
operator PASN_NumericString &();
operator PASN_PrintableString &();
operator PASN_VisibleString &();
operator PASN_IA5String &();
operator PASN_GeneralString &();
operator PASN_BMPString &();
operator PASN_Sequence &();
operator const PASN_Null &() const;
operator const PASN_Boolean &() const;
operator const PASN_Integer &() const;
operator const PASN_Enumeration &() const;
operator const PASN_Real &() const;
operator const PASN_ObjectId &() const;
operator const PASN_BitString &() const;
operator const PASN_OctetString &() const;
operator const PASN_NumericString &() const;
operator const PASN_PrintableString &() const;
operator const PASN_VisibleString &() const;
operator const PASN_IA5String &() const;
operator const PASN_GeneralString &() const;
operator const PASN_BMPString &() const;
operator const PASN_Sequence &() const;
#endif
virtual PBoolean CreateObject() = 0;
virtual Comparison Compare(const PObject & obj) const;
virtual void PrintOn(ostream & strm) const;
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean IsPrimitive() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
#ifdef P_INCLUDE_PER
virtual PBoolean DecodePER(PPER_Stream &);
virtual void EncodePER(PPER_Stream &) const;
#endif
#ifdef P_INCLUDE_XER
PBoolean DecodeXER(PXER_Stream &);
void EncodeXER(PXER_Stream &) const;
#endif
PASN_Choice & operator=(const PASN_Choice & other);
PINDEX GetValueByName(PString name) const;
protected:
PASN_Choice(unsigned nChoices = 0, PBoolean extend = false);
PASN_Choice(unsigned tag, TagClass tagClass, unsigned nChoices, PBoolean extend);
PASN_Choice(unsigned tag, TagClass tagClass, unsigned nChoices, PBoolean extend, const PASN_Names * nameSpec,unsigned namesCnt);
PASN_Choice(const PASN_Choice & other);
PBoolean CheckCreate() const;
unsigned numChoices;
PASN_Object * choice;
const PASN_Names *names;
unsigned namesCount;
};
PARRAY(PASN_ObjectArray, PASN_Object);
class PASN_Sequence : public PASN_Object
{
PCLASSINFO(PASN_Sequence, PASN_Object);
public:
PASN_Sequence(unsigned tag = UniversalSequence,
TagClass tagClass = UniversalTagClass,
unsigned nOpts = 0, PBoolean extend = false, unsigned nExtend = 0);
PASN_Sequence(const PASN_Sequence & other);
PASN_Sequence & operator=(const PASN_Sequence & other);
PINDEX GetSize() const { return fields.GetSize(); }
PBoolean SetSize(PINDEX newSize);
PASN_Object & operator[](PINDEX i) const { return fields[i]; }
PBoolean HasOptionalField(PINDEX opt) const;
void IncludeOptionalField(PINDEX opt);
void RemoveOptionalField(PINDEX opt);
virtual Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const;
virtual void PrintOn(ostream & strm) const;
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean IsPrimitive() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
PBoolean PreambleDecode(PASN_Stream & strm);
void PreambleEncode(PASN_Stream & strm) const;
PBoolean KnownExtensionDecode(PASN_Stream & strm, PINDEX fld, PASN_Object & field);
void KnownExtensionEncode(PASN_Stream & strm, PINDEX fld, const PASN_Object & field) const;
PBoolean UnknownExtensionsDecode(PASN_Stream & strm);
void UnknownExtensionsEncode(PASN_Stream & strm) const;
#ifdef P_INCLUDE_BER
PBoolean PreambleDecodeBER(PBER_Stream & strm);
void PreambleEncodeBER(PBER_Stream & strm) const;
PBoolean KnownExtensionDecodeBER(PBER_Stream & strm, PINDEX fld, PASN_Object & field);
void KnownExtensionEncodeBER(PBER_Stream & strm, PINDEX fld, const PASN_Object & field) const;
PBoolean UnknownExtensionsDecodeBER(PBER_Stream & strm);
void UnknownExtensionsEncodeBER(PBER_Stream & strm) const;
#endif
#ifdef P_INCLUDE_PER
PBoolean PreambleDecodePER(PPER_Stream & strm);
void PreambleEncodePER(PPER_Stream & strm) const;
PBoolean KnownExtensionDecodePER(PPER_Stream & strm, PINDEX fld, PASN_Object & field);
void KnownExtensionEncodePER(PPER_Stream & strm, PINDEX fld, const PASN_Object & field) const;
PBoolean UnknownExtensionsDecodePER(PPER_Stream & strm);
void UnknownExtensionsEncodePER(PPER_Stream & strm) const;
#endif
#ifdef P_INCLUDE_XER
virtual PBoolean PreambleDecodeXER(PXER_Stream & strm);
virtual void PreambleEncodeXER(PXER_Stream & strm) const;
virtual PBoolean KnownExtensionDecodeXER(PXER_Stream & strm, PINDEX fld, PASN_Object & field);
virtual void KnownExtensionEncodeXER(PXER_Stream & strm, PINDEX fld, const PASN_Object & field) const;
virtual PBoolean UnknownExtensionsDecodeXER(PXER_Stream & strm);
virtual void UnknownExtensionsEncodeXER(PXER_Stream & strm) const;
#endif
protected:
PBoolean NoExtensionsToDecode(PPER_Stream & strm);
PBoolean NoExtensionsToEncode(PPER_Stream & strm);
PASN_ObjectArray fields;
PASN_BitString optionMap;
int knownExtensions;
int totalExtensions;
PASN_BitString extensionMap;
PINDEX endBasicEncoding;
};
class PASN_Set : public PASN_Sequence
{
PCLASSINFO(PASN_Set, PASN_Sequence);
public:
PASN_Set(unsigned tag = UniversalSet,
TagClass tagClass = UniversalTagClass,
unsigned nOpts = 0, PBoolean extend = false, unsigned nExtend = 0);
virtual PObject * Clone() const;
virtual PString GetTypeAsString() const;
};
class PASN_Array : public PASN_ConstrainedObject
{
PCLASSINFO(PASN_Array, PASN_ConstrainedObject);
public:
PINDEX GetSize() const { return array.GetSize(); }
PBoolean SetSize(PINDEX newSize);
PASN_Object & operator[](PINDEX i) const { return array[i]; }
void Append(PASN_Object * obj) { array.SetAt(array.GetSize(), obj); }
void RemoveAt(PINDEX i) { array.RemoveAt(i); }
void RemoveAll() { array.RemoveAll(); }
virtual Comparison Compare(const PObject & obj) const;
virtual void PrintOn(ostream & strm) const;
virtual void SetConstraintBounds(ConstraintType type, int lower, unsigned upper);
virtual PString GetTypeAsString() const;
virtual PINDEX GetDataLength() const;
virtual PBoolean IsPrimitive() const;
virtual PBoolean Decode(PASN_Stream &);
virtual void Encode(PASN_Stream &) const;
virtual PASN_Object * CreateObject() const = 0;
PASN_Array & operator=(const PASN_Array & other);
protected:
PASN_Array(unsigned tag = UniversalSequence,
TagClass tagClass = UniversalTagClass);
PASN_Array(const PASN_Array & other);
PASN_ObjectArray array;
};
class PASN_Stream : public PBYTEArray
{
PCLASSINFO(PASN_Stream, PBYTEArray);
public:
PASN_Stream();
PASN_Stream(const PBYTEArray & bytes);
PASN_Stream(const BYTE * buf, PINDEX size);
void PrintOn(ostream & strm) const;
PINDEX GetPosition() const { return byteOffset; }
void SetPosition(PINDEX newPos);
PBoolean IsAtEnd() { return byteOffset >= GetSize(); }
void ResetDecoder();
void BeginEncoding();
void CompleteEncoding();
virtual PBoolean Read(PChannel & chan) = 0;
virtual PBoolean Write(PChannel & chan) = 0;
virtual PBoolean NullDecode(PASN_Null &) = 0;
virtual void NullEncode(const PASN_Null &) = 0;
virtual PBoolean BooleanDecode(PASN_Boolean &) = 0;
virtual void BooleanEncode(const PASN_Boolean &) = 0;
virtual PBoolean IntegerDecode(PASN_Integer &) = 0;
virtual void IntegerEncode(const PASN_Integer &) = 0;
virtual PBoolean EnumerationDecode(PASN_Enumeration &) = 0;
virtual void EnumerationEncode(const PASN_Enumeration &) = 0;
virtual PBoolean RealDecode(PASN_Real &) = 0;
virtual void RealEncode(const PASN_Real &) = 0;
virtual PBoolean ObjectIdDecode(PASN_ObjectId &) = 0;
virtual void ObjectIdEncode(const PASN_ObjectId &) = 0;
virtual PBoolean BitStringDecode(PASN_BitString &) = 0;
virtual void BitStringEncode(const PASN_BitString &) = 0;
virtual PBoolean OctetStringDecode(PASN_OctetString &) = 0;
virtual void OctetStringEncode(const PASN_OctetString &) = 0;
virtual PBoolean ConstrainedStringDecode(PASN_ConstrainedString &) = 0;
virtual void ConstrainedStringEncode(const PASN_ConstrainedString &) = 0;
virtual PBoolean BMPStringDecode(PASN_BMPString &) = 0;
virtual void BMPStringEncode(const PASN_BMPString &) = 0;
virtual PBoolean ChoiceDecode(PASN_Choice &) = 0;
virtual void ChoiceEncode(const PASN_Choice &) = 0;
virtual PBoolean ArrayDecode(PASN_Array &) = 0;
virtual void ArrayEncode(const PASN_Array &) = 0;
virtual PBoolean SequencePreambleDecode(PASN_Sequence &) = 0;
virtual void SequencePreambleEncode(const PASN_Sequence &) = 0;
virtual PBoolean SequenceKnownDecode(PASN_Sequence &, PINDEX, PASN_Object &) = 0;
virtual void SequenceKnownEncode(const PASN_Sequence &, PINDEX, const PASN_Object &) = 0;
virtual PBoolean SequenceUnknownDecode(PASN_Sequence &) = 0;
virtual void SequenceUnknownEncode(const PASN_Sequence &) = 0;
BYTE ByteDecode();
void ByteEncode(unsigned value);
unsigned BlockDecode(BYTE * bufptr, unsigned nBytes);
void BlockEncode(const BYTE * bufptr, PINDEX nBytes);
void ByteAlign();
protected:
PINDEX byteOffset;
unsigned bitOffset;
private:
void Construct();
};
#ifdef P_INCLUDE_PER
#include "asnper.h"
#endif
#ifdef P_INCLUDE_BER
#include "asnber.h"
#endif
#ifdef P_INCLUDE_XER
#include "asnxer.h"
#endif
#endif // PTLIB_ASNER_H
// End Of File ///////////////////////////////////////////////////////////////
PASN_Object::UniversalGeneralisedTime
Definition: asner.h:106
PASN_Array::array
PASN_ObjectArray array
Definition: asner.h:911
PASN_BMPString::SetValue
void SetValue(const char *v)
Definition: asner.h:597
PASN_Object::TagClass
TagClass
Definition: asner.h:76
PASN_Names::value
PINDEX value
Definition: asner.h:269
PASN_Object::SetMaximumStringSize
static void SetMaximumStringSize(PINDEX sz)
PASN_Enumeration::maxEnumValue
unsigned maxEnumValue
Definition: asner.h:320
PObject::Clone
virtual PObject * Clone() const
Create a copy of the class on the heap.
PASN_BitString::GetSize
unsigned GetSize() const
Definition: asner.h:419
PASN_ConstrainedObject::upperLimit
unsigned upperLimit
Definition: asner.h:180
PASN_Object::UniversalBoolean
Definition: asner.h:87
PASN_Object::SetConstraints
void SetConstraints(ConstraintType, int lower, MaximumValueTag)
Definition: asner.h:129
PASN_GeneralisedTime
Definition: asner.h:639
PASN_Object::UniversalNumericString
Definition: asner.h:100
PASN_ConstrainedObject::GetUpperLimit
unsigned GetUpperLimit() const
Definition: asner.h:167
PObject::operator==
bool operator==(const PObject &obj) const
Compare the two objects.
Definition: object.h:1232
PASN_Boolean
Class for ASN Boolean type.
Definition: asner.h:206
PASN_OctetString::GetValue
const PBYTEArray & GetValue() const
Definition: asner.h:475
PASN_Enumeration::names
const PASN_Names * names
Definition: asner.h:322
PASN_Real::operator=
PASN_Real & operator=(double val)
Definition: asner.h:336
PObject::Compare
virtual Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
PASN_Object::IsPrimitive
virtual PBoolean IsPrimitive() const
Definition: asner.h:68
PASN_Boolean::operator=
PASN_Boolean & operator=(PBoolean v)
Definition: asner.h:213
PASN_ObjectId::SetValue
void SetValue(const PUnsignedArray &numbers)
Definition: asner.h:371
PCharArray
Array of characters.
Definition: array.h:551
PASN_BMPString::SetValue
void SetValue(const PString &v)
Definition: asner.h:598
PASN_ConstrainedString::GetValue
const PString & GetValue() const
Definition: asner.h:517
PASN_Object::UniversalTags
UniversalTags
Definition: asner.h:85
PCLASSINFO
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
PASN_Enumeration::value
unsigned value
Definition: asner.h:321
PASN_Enumeration::namesCount
unsigned namesCount
Definition: asner.h:323
PASN_Object::UniversalGeneralizedTime
Definition: asner.h:107
PASN_Sequence::totalExtensions
int totalExtensions
Definition: asner.h:857
PTime
This class defines an absolute time and date.
Definition: ptime.h:53
PASN_Choice::numChoices
unsigned numChoices
Definition: asner.h:775
PASN_Sequence::endBasicEncoding
PINDEX endBasicEncoding
Definition: asner.h:859
PASN_Object::UniversalOctetString
Definition: asner.h:90
PASN_Array::operator[]
PASN_Object & operator[](PINDEX i) const
Definition: asner.h:886
PASN_Names
Definition: asner.h:267
PASN_Object::UniversalIA5String
Definition: asner.h:104
PASN_ConstrainedString::operator[]
char operator[](PINDEX idx) const
Definition: asner.h:520
PASN_BMPString::characterSet
PWCharArray characterSet
Definition: asner.h:632
PASN_Sequence::extensionMap
PASN_BitString extensionMap
Definition: asner.h:858
PASN_Object::UniversalReal
Definition: asner.h:95
PASN_Real::GetValue
double GetValue() const
Definition: asner.h:338
PASN_Object::SetCharacterSet
virtual void SetCharacterSet(ConstraintType ctype, const char *charSet)
PASN_ConstrainedString::SetValue
void SetValue(const PString &v)
Definition: asner.h:519
PASN_BitString::bitData
PBYTEArray bitData
Definition: asner.h:452
PASN_Object::IsExtendable
PBoolean IsExtendable() const
Definition: asner.h:73
PASN_Object::FixedConstraint
Definition: asner.h:121
PObject::Comparison
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
PASN_Stream
Base class for ASN decoder/encoder stream.
Definition: asner.h:919
PASN_BMPString::operator=
PASN_BMPString & operator=(const char *v)
Definition: asner.h:590
PASN_Object::UniversalGeneralString
Definition: asner.h:110
PASN_BMPString::lastChar
wchar_t lastChar
Definition: asner.h:633
PASN_Object::SetExtendable
void SetExtendable(PBoolean ext=true)
Definition: asner.h:74
PASN_ConstrainedObject
Base class for constrained ASN encoding/decoding.
Definition: asner.h:161
PASN_BMPString::SetValue
void SetValue(const PASN_BMPString &v)
Definition: asner.h:600
PASN_Enumeration::GetMaximum
unsigned GetMaximum() const
Definition: asner.h:297
PASN_Stream::byteOffset
PINDEX byteOffset
Definition: asner.h:979
PASN_Object::ContextSpecificTagClass
Definition: asner.h:79
PASN_Object::GetTypeAsString
virtual PString GetTypeAsString() const =0
Return a string giving the type of the object.
PASN_Object::SetConstraints
void SetConstraints(ConstraintType type, int value)
Definition: asner.h:127
PASN_Object::UniversalEnumeration
Definition: asner.h:96
PASN_UniversalTime::PASN_UniversalTime
PASN_UniversalTime(const PTime &time)
Definition: asner.h:662
PASN_Object::UniversalNull
Definition: asner.h:91
PASN_Object::SetTag
virtual void SetTag(unsigned newTag, TagClass tagClass=DefaultTagClass)
PASN_Object::MinimumValue
Definition: asner.h:125
PASN_Array::RemoveAt
void RemoveAt(PINDEX i)
Definition: asner.h:888
PASN_Object::SetConstraints
void SetConstraints(ConstraintType, MinimumValueTag lower, MaximumValueTag upper)
Definition: asner.h:133
PASN_Sequence::optionMap
PASN_BitString optionMap
Definition: asner.h:855
PASN_Boolean::value
PBoolean value
Definition: asner.h:228
PASN_Object::UniversalSequence
Definition: asner.h:98
PASN_BMPString::GetValue
PString GetValue() const
Definition: asner.h:595
PASN_Enumeration::GetValue
unsigned GetValue() const
Definition: asner.h:294
PASN_GeneralisedTime::PASN_GeneralisedTime
PASN_GeneralisedTime(unsigned theTag, TagClass theTagClass)
Definition: asner.h:647
PASN_Sequence::GetSize
PINDEX GetSize() const
Definition: asner.h:798
PASN_Sequence::knownExtensions
int knownExtensions
Definition: asner.h:856
PASN_Object::UniversalObjectDescriptor
Definition: asner.h:93
asnper.h
PASN_ConstrainedString
Base class for ASN String types.
Definition: asner.h:510
PASN_Object::DefaultTagClass
Definition: asner.h:81
PObject::PrintOn
virtual void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
PASN_Integer::GetValue
unsigned GetValue() const
Definition: asner.h:243
PASN_Boolean::SetValue
void SetValue(PBoolean v)
Definition: asner.h:216
PASN_Object::UniversalExternalType
Definition: asner.h:94
PASN_Object::GetMaximumArraySize
static PINDEX GetMaximumArraySize()
PASN_OctetString::GetPointer
BYTE * GetPointer(PINDEX sz=0)
Definition: asner.h:481
PBoolean
BOOL PBoolean
Definition: object.h:102
PASN_Object::UniversalEmbeddedPDV
Definition: asner.h:97
PASN_Object::ApplicationTagClass
Definition: asner.h:78
PASN_Object::UniversalVideotexString
Definition: asner.h:103
PASN_Object::UniversalBMPString
Definition: asner.h:112
PASN_Sequence::operator[]
PASN_Object & operator[](PINDEX i) const
Definition: asner.h:800
PASN_ObjectId::operator!=
bool operator!=(const PString &dotstr) const
Definition: asner.h:377
PASN_Choice::names
const PASN_Names * names
Definition: asner.h:777
PASN_Object::GetTag
unsigned GetTag() const
Definition: asner.h:115
PASN_Enumeration::operator=
PASN_Enumeration & operator=(unsigned v)
Definition: asner.h:292
PASN_BMPString
Class for ASN BMP (16 bit) String type.
Definition: asner.h:579
PASN_Enumeration::SetValue
void SetValue(unsigned v)
Definition: asner.h:295
PASN_BMPString::charSetUnalignedBits
unsigned charSetUnalignedBits
Definition: asner.h:634
PASN_BitString::totalBits
unsigned totalBits
Definition: asner.h:451
PBYTEArray
Array of unsigned characters.
Definition: array.h:670
PASN_Sequence
Class for ASN Sequence type.
Definition: asner.h:787
PASN_ObjectId::GetSize
PINDEX GetSize() const
Definition: asner.h:380
PASN_Object::InvalidUniversalTag
Definition: asner.h:86
PASN_Object::UniversalBitString
Definition: asner.h:89
PASN_Object::Decode
virtual PBoolean Decode(PASN_Stream &)=0
PASN_Object::SetConstraints
void SetConstraints(ConstraintType type, int lower, unsigned upper)
Definition: asner.h:135
PASN_ConstrainedString::canonicalSetBits
unsigned canonicalSetBits
Definition: asner.h:552
PASN_Object::UniversalTeletexString
Definition: asner.h:102
PString::AsUCS2
PWCharArray AsUCS2() const
Convert UTF-8 string to UCS-2.
PASN_Object::GetObjectLength
PINDEX GetObjectLength() const
PASN_Object::ExtendableConstraint
Definition: asner.h:122
PChannel
Abstract class defining I/O channel semantics.
Definition: channel.h:107
PASN_Integer::SetValue
void SetValue(unsigned v)
Definition: asner.h:244
PASN_Object::SetConstraints
void SetConstraints(ConstraintType, MinimumValueTag lower, unsigned upper)
Definition: asner.h:131
PASN_Choice::namesCount
unsigned namesCount
Definition: asner.h:778
PASN_Sequence::fields
PASN_ObjectArray fields
Definition: asner.h:854
PASN_ConstrainedObject::constraint
ConstraintType constraint
Definition: asner.h:178
PASN_ConstrainedObject::lowerLimit
int lowerLimit
Definition: asner.h:179
PASN_Choice::IsValid
PBoolean IsValid() const
Definition: asner.h:686
PASN_Object::SetConstraintBounds
virtual void SetConstraintBounds(ConstraintType type, int lower, unsigned upper)
PASN_Object::MaximumValue
Definition: asner.h:126
PASN_Object::UniversalUniversalString
Definition: asner.h:111
PASN_Object::Unconstrained
Definition: asner.h:119
PASN_Object::UniversalGraphicString
Definition: asner.h:108
PASN_UniversalTime::PASN_UniversalTime
PASN_UniversalTime()
Definition: asner.h:660
PASN_ConstrainedString::characterSet
PCharArray characterSet
Definition: asner.h:549
PASN_BMPString::value
PWCharArray value
Definition: asner.h:631
PASN_BMPString::operator=
PASN_BMPString & operator=(const PString &v)
Definition: asner.h:591
PASN_ObjectId::value
PUnsignedArray value
Definition: asner.h:398
PASN_BitString::GetDataPointer
const BYTE * GetDataPointer() const
Definition: asner.h:417
PASN_OctetString::GetSize
PINDEX GetSize() const
Definition: asner.h:482
PString
The character string class.
Definition: pstring.h:108
PASN_OctetString::SetValue
void SetValue(const char *str)
Definition: asner.h:471
PASN_BMPString::GetValue
void GetValue(PWCharArray &v) const
Definition: asner.h:596
PUnsignedArray
Array of unsigned integers.
Definition: array.h:737
PXMLElement
Definition: pxml.h:353
asnber.h
PASN_OctetString::operator[]
BYTE operator[](PINDEX i) const
Definition: asner.h:479
PASN_Object::tag
unsigned tag
ASN object tag.
Definition: asner.h:155
PASN_Object::GetMaximumStringSize
static PINDEX GetMaximumStringSize()
PASN_Stream::bitOffset
unsigned bitOffset
Definition: asner.h:980
PASN_Set
Class for ASN Set type.
Definition: asner.h:865
PASN_Enumeration
Class for ASN Enumerated type.
Definition: asner.h:274
PASN_GeneralisedTime::SetValue
void SetValue(const PTime &time)
Definition: asner.h:651
PASN_BMPString::SetValue
void SetValue(const PWCharArray &v)
Definition: asner.h:599
PASN_Choice
Class for ASN Choice type.
Definition: asner.h:677
PASN_Object::PrivateTagClass
Definition: asner.h:80
PASN_ObjectId::operator!=
bool operator!=(const char *dotstr) const
Definition: asner.h:375
PASN_Object::GetDataLength
virtual PINDEX GetDataLength() const =0
PASN_BMPString::charSetAlignedBits
unsigned charSetAlignedBits
Definition: asner.h:635
PASN_Object::GetTagClass
TagClass GetTagClass() const
Definition: asner.h:83
PASN_ObjectId::GetValue
const PUnsignedArray & GetValue() const
Definition: asner.h:382
DECLARE_STRING_CLASS
#define DECLARE_STRING_CLASS(name)
Definition: asner.h:558
asnxer.h
PASN_UniversalTime::SetValue
void SetValue(const PTime &time)
Definition: asner.h:668
PASN_Array::RemoveAll
void RemoveAll()
Definition: asner.h:889
PASN_ObjectId::operator==
bool operator==(const PASN_ObjectId &id) const
Definition: asner.h:378
PASN_Object::tagClass
TagClass tagClass
BER tag class.
Definition: asner.h:153
PASN_Object::ConstraintType
ConstraintType
Definition: asner.h:118
PASN_ConstrainedString::SetValue
void SetValue(const char *v)
Definition: asner.h:518
PASN_Stream::GetPosition
PINDEX GetPosition() const
Definition: asner.h:929
PASN_Array::GetSize
PINDEX GetSize() const
Definition: asner.h:884
PASN_Object::extendable
PBoolean extendable
PER extension capability.
Definition: asner.h:151
PASN_Object::PASN_Object
PASN_Object(unsigned tag, TagClass tagClass, PBoolean extend=false)
PASN_Names::name
const char * name
Definition: asner.h:268
PASN_Object::MinimumValueTag
MinimumValueTag
Definition: asner.h:125
PASN_Null
Class for ASN Null type.
Definition: asner.h:186
PASN_Real
Class for ASN floating point type.
Definition: asner.h:329
PASN_ObjectId::operator==
bool operator==(const PString &dotstr) const
Definition: asner.h:376
PASN_OctetString
Class for ASN Octet String type.
Definition: asner.h:458
PASN_Real::SetValue
void SetValue(double v)
Definition: asner.h:339
PASN_Array::Append
void Append(PASN_Object *obj)
Definition: asner.h:887
PASN_Object::UniversalUTCTime
Definition: asner.h:105
PASN_Object::Encode
virtual void Encode(PASN_Stream &) const =0
PASN_Object::UniversalObjectId
Definition: asner.h:92
PASN_OctetString::operator[]
BYTE & operator[](PINDEX i)
Definition: asner.h:480
PASN_Object::MaximumValueTag
MaximumValueTag
Definition: asner.h:126
PASN_Integer
Class for ASN Integer type.
Definition: asner.h:234
PASN_Object::UniversalInteger
Definition: asner.h:88
PASN_GeneralisedTime::PASN_GeneralisedTime
PASN_GeneralisedTime(const PTime &time)
Definition: asner.h:645
PASN_BMPString::SetValueRaw
void SetValueRaw(const PWCharArray &v)
Definition: asner.h:601
PASN_Object::UniversalPrintableString
Definition: asner.h:101
PASN_ConstrainedString::charSetAlignedBits
unsigned charSetAlignedBits
Definition: asner.h:554
PASN_UniversalTime::PASN_UniversalTime
PASN_UniversalTime(unsigned theTag, TagClass theTagClass)
Definition: asner.h:664
PASN_Choice::choice
PASN_Object * choice
Definition: asner.h:776
PASN_Object::UniversalTagClass
Definition: asner.h:77
PASN_GeneralisedTime::PASN_GeneralisedTime
PASN_GeneralisedTime()
Definition: asner.h:643
PASN_Object::UniversalSet
Definition: asner.h:99
PASN_Boolean::GetValue
PBoolean GetValue() const
Definition: asner.h:215
PASN_ConstrainedString::operator=
PASN_ConstrainedString & operator=(const PString &str)
Definition: asner.h:515
PASN_Real::value
double value
Definition: asner.h:351
PASN_ObjectId
Class for ASN Object Identifier type.
Definition: asner.h:357
PASN_Stream::IsAtEnd
PBoolean IsAtEnd()
Definition: asner.h:931
PASN_Array
Class for ASN Array type.
Definition: asner.h:880
PObject
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PARRAY
PARRAY(PASN_ObjectArray, PASN_Object)
PASN_ConstrainedString::canonicalSet
const char * canonicalSet
Definition: asner.h:550
PASN_Object::PartiallyConstrained
Definition: asner.h:120
PASN_BitString
Class for ASN Bit String type.
Definition: asner.h:404
PASN_ObjectId::operator[]
unsigned operator[](PINDEX idx) const
Definition: asner.h:381
PASN_UniversalTime
Definition: asner.h:656
PASN_Object::UniversalVisibleString
Definition: asner.h:109
PASN_ConstrainedString::charSetUnalignedBits
unsigned charSetUnalignedBits
Definition: asner.h:553
PASN_ConstrainedObject::IsConstrained
PBoolean IsConstrained() const
Definition: asner.h:165
PASN_ConstrainedString::value
PString value
Definition: asner.h:548
PASN_ConstrainedString::canonicalSetSize
PINDEX canonicalSetSize
Definition: asner.h:551
PASN_Integer::value
unsigned value
Definition: asner.h:264
PASN_Object
Base class for ASN encoding/decoding.
Definition: asner.h:59
PASN_OctetString::value
PBYTEArray value
Definition: asner.h:504
PASN_OctetString::SetValue
void SetValue(const PString &str)
Definition: asner.h:472
PASN_Object::SetMaximumArraySize
static void SetMaximumArraySize(PINDEX sz)
PASN_OctetString::SetValue
void SetValue(const PBYTEArray &arr)
Definition: asner.h:473
PASN_ConstrainedObject::GetLowerLimit
int GetLowerLimit() const
Definition: asner.h:166