262 void PrintOn(ostream & strm)
const;
290 void PrintOn(ostream & strm)
const;
320 :
PASNString((const BYTE *)addr.GetPointer(), addr.GetSize()) { }
360 void PrintOn(ostream & strm)
const;
443 { Decode(buffer, ptr); }
475 void PrintOn(ostream & strm)
const;
503 void PrintOn(ostream & strm)
const;
530 PINDEX GetSize()
const;
534 void AppendInteger (
PASNInt value);
535 void AppendString (
const PString & str);
536 void AppendObjectID(
const PString & str);
537 void AppendObjectID(
PASNOid * val, BYTE len);
544 void PrintOn(ostream & strm)
const;
554 PASNObjectArray sequence;
562 #endif // PTLIB_PASN_H PObject * Clone() const
Virtual function used to duplicate objects.
Definition: pasn.h:394
A descendant of PASNObject which is an unsigned ASN integer type.
Definition: pasn.h:351
PASNIPAddress(const PBYTEArray &buffer, PINDEX &ptr)
Definition: pasn.h:327
PASNTimeTicks(const PBYTEArray &buffer, PINDEX &ptr)
Definition: pasn.h:388
static PBoolean DecodeASNUnsigned(const PBYTEArray &buffer, PINDEX &ptr, PASNUnsigned &value, ASNType type=TimeTicks)
A descendant of PASNObject which is a simple ASN OctetStr type.
Definition: pasn.h:281
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
Definition: pasn.h:333
PASNObject::ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
Definition: pasn.h:454
virtual PString GetTypeAsString() const
Return a string giving the type of the object.
ASNType
Value returned by the GetType() function to indicate the type of an ASN object.
Definition: pasn.h:72
ASN Counter64.
Definition: pasn.h:84
ASN Octet String object.
Definition: pasn.h:74
PASNIPAddress(const PBYTEArray &buffer)
Definition: pasn.h:324
void Encode(PBYTEArray &buffer, PASNObject::ASNType theType)
virtual PIPSocket::Address GetIPAddress() const
Return the value of the object as an IPAddress.
ASN Sequence with discriminator.
Definition: pasn.h:77
PASNCounter(PASNUnsigned val)
Definition: pasn.h:412
ASN Gauge object.
Definition: pasn.h:80
ASN IPAddress object.
Definition: pasn.h:78
PASNGauge(PASNUnsigned val)
Definition: pasn.h:439
virtual PASNInt GetInteger() const
Return the value of the ASN object as a PASNInt.
PASNTimeTicks(PASNUnsigned val)
Definition: pasn.h:385
static WORD GetASNSequenceStartLength(WORD length)
Return the encoded length of a sequence if it has the specified length.
ASN Object ID object.
Definition: pasn.h:75
Array of unsigned long integers.
Definition: array.h:764
PASNCounter(const PBYTEArray &buffer, PINDEX &ptr)
Definition: pasn.h:415
PInt32 PASNInt
Definition: pasn.h:43
This class defines the common behviour of all ASN objects.
Definition: pasn.h:64
virtual PString GetString() const
Return the value of the object as a PString.
ASN Opaque object.
Definition: pasn.h:82
BOOL PBoolean
Definition: object.h:102
PObject * Clone() const
Virtual function used to duplicate objects.
Definition: pasn.h:451
maximum of number of ASN object types
Definition: pasn.h:88
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
Definition: pasn.h:391
Array of unsigned characters.
Definition: array.h:670
A descendant of PASNObject which is an unsigned ASN ObjID type.
Definition: pasn.h:466
ASN Counter object.
Definition: pasn.h:79
static WORD GetASNIntegerLength(PASNInt data)
PString value
Definition: pasn.h:306
static void EncodeASNSequenceStart(PBYTEArray &buffer, BYTE type, WORD length)
Encode a sequence header into the buffer at the specified offset.
static void EncodeASNInteger(PBYTEArray &buffer, PASNInt data, PASNObject::ASNType type)
A descendant of PASNObject which is a simple ASN integer type.
Definition: pasn.h:255
static BYTE ASNTypeToType[ASNTypeMax]
Table to map enum ASNType values to ASN identifiers.
Definition: pasn.h:246
virtual const PASNSequence & GetSequence() const
Return the value of the object as a PString.
virtual WORD GetEncodedLength()
Virtual function used to get the length of object when encoded into ASN format.
PObject * Clone() const
Virtual function used to duplicate objects.
Definition: pasn.h:421
A descendant of PASNObject which is an unsigned ASN guage type.
Definition: pasn.h:435
virtual void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
A descendant of PASNObject which is an unsigned ASN time tick type.
Definition: pasn.h:381
virtual PASNUnsigned GetUnsigned() const
Return the value of the object as a PASNUnsigned.
ASN Null.
Definition: pasn.h:86
The character string class.
Definition: pstring.h:108
A descendant of PASNObject which is an unsigned ASN counter type.
Definition: pasn.h:408
static void EncodeASNLength(PBYTEArray &buffer, WORD length)
Encode an ASN length value.
WORD valueLen
Definition: pasn.h:307
static PBoolean DecodeASNInteger(const PBYTEArray &buffer, PINDEX &ptr, PASNInt &value, ASNType type=Integer)
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
Definition: pasn.h:418
PASNObject::ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
Definition: pasn.h:397
PASNObject::ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
Definition: pasn.h:424
PBoolean Decode(const PBYTEArray &buffer, PINDEX &i, PASNObject::ASNType theType)
PASNUnsignedInteger(PASNUnsigned val)
Definition: pasn.h:355
PASNIPAddress(const PIPSocket::Address &addr)
Definition: pasn.h:319
PASNUnsignedInteger()
Definition: pasn.h:366
static void EncodeASNHeader(PBYTEArray &buffer, PASNObject::ASNType type, WORD length)
Encode an ASN object header into the buffer.
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
Definition: pasn.h:448
A class describing an IP address.
Definition: ipsock.h:75
DWORD PASNOid
Definition: pasn.h:45
PASNGauge(const PBYTEArray &buffer, PINDEX &ptr)
Definition: pasn.h:442
ASN Unsigned integer 32.
Definition: pasn.h:85
ASN Sequence object.
Definition: pasn.h:76
PASNObject::ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
Definition: pasn.h:330
static PBoolean DecodeASNLength(const PBYTEArray &buffer, PINDEX &ptr, WORD &len)
Decode an ASN length in the buffer at the given ptr.
int GetChoice() const
Return the descriminator for Choice sequences.
virtual void PrintOn(ostream &strm) const
Virtual functions used by the PObject::operator<< function to print the value of the object...
static WORD GetASNUnsignedLength(PASNUnsigned data)
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
Definition: pasn.h:292
PARRAY(PASNObjectArray, PASNObject)
A descendant of PASNObject which is the complex sequence type.
Definition: pasn.h:520
static WORD GetASNLengthLength(WORD length)
Return the length of an encoded ASN length value.
PBoolean Decode(const PBYTEArray &buffer, PINDEX &i)
Definition: pasn.h:445
static WORD GetASNHeaderLength(WORD length)
Return the length of an ASN object header if the object is the specified length.
ASN Integer object.
Definition: pasn.h:73
unknown ASN object type
Definition: pasn.h:87
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
static void EncodeASNUnsigned(PBYTEArray &buffer, PASNUnsigned data, PASNObject::ASNType type)
virtual PObject * Clone() const
Virtual function used to duplicate objects.
virtual ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
DWORD PASNUnsigned
Definition: pasn.h:44
ASN NsapAddress.
Definition: pasn.h:83
#define PNEW
Macro for overriding system default new operator.
Definition: object.h:890
PObject * Clone() const
Virtual function used to duplicate objects.
Definition: pasn.h:340
A descendant of PASNObject which is the NULL type.
Definition: pasn.h:496
PASNObject()
Create an empty ASN object.
A descendant of PASNObject which is an IP address type.
Definition: pasn.h:315
ASN TimeTicks object.
Definition: pasn.h:81