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;
475 void PrintOn(ostream & strm)
const;
503 void PrintOn(ostream & strm)
const;
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
PString GetString() const
Return the value of the object as a PString.
void PrintOn(ostream &strm) const
Virtual functions used by the PObject::operator<< function to print the value of the object...
PString GetString() const
Return the value of the object as a PString.
A descendant of PASNObject which is an unsigned ASN integer type.
Definition: pasn.h:351
PObject * Clone() const
Virtual function used to duplicate objects.
PString GetString() const
Return the value of the object as a PString.
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
PString GetTypeAsString() const
Return a string giving the type of the object.
PBoolean Decode(const PBYTEArray &buffer, PINDEX &i)
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.
#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
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
virtual PString GetTypeAsString() const
Return a string giving the type of the object.
WORD GetEncodedLength()
Virtual function used to get the length of object when encoded into ASN format.
PString GetTypeAsString() const
Return a string giving the type of the object.
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
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
PString GetTypeAsString() const
Return a string giving the type of the object.
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.
PObject * Clone() const
Virtual function used to duplicate objects.
ASN Sequence with discriminator.
Definition: pasn.h:77
ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
PASNCounter(PASNUnsigned val)
Definition: pasn.h:412
WORD GetEncodedLength()
Virtual function used to get the length of object when encoded into ASN format.
PString GetTypeAsString() const
Return a string giving the type of the object.
PASNInt GetInteger() const
Return the value of the ASN object as a PASNInt.
ASN Gauge object.
Definition: pasn.h:80
ASN IPAddress object.
Definition: pasn.h:78
PString GetTypeAsString() const
Return a string giving the type of the object.
PASNGauge(PASNUnsigned val)
Definition: pasn.h:439
virtual PASNInt GetInteger() const
Return the value of the ASN object as a PASNInt.
WORD GetEncodedLength()
Virtual function used to get the length of object when encoded into ASN format.
PString GetTypeAsString() const
Return a string giving the type of the object.
PASNTimeTicks(PASNUnsigned val)
Definition: pasn.h:385
PASNUnsigned GetUnsigned() const
Return the value of the object as a PASNUnsigned.
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
void AppendInteger(PASNInt value)
PInt32 PASNInt
Definition: pasn.h:43
const PASNSequence & GetSequence() const
Return the value of the object as a PString.
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.
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
PBoolean Decode(const PBYTEArray &buffer, PINDEX &i)
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
ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
void PrintOn(ostream &strm) const
Virtual functions used by the PObject::operator<< function to print the value of the object...
void PrintOn(ostream &strm) const
Virtual functions used by the PObject::operator<< function to print the value of the object...
WORD GetEncodedLength()
Virtual function used to get the length of object when encoded into ASN format.
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
PString GetString() const
Return the value of the object as a PString.
PObject * Clone() const
Virtual function used to duplicate objects.
void PrintOn(ostream &strm) const
Virtual functions used by the PObject::operator<< function to print the value of the object...
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
ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
A descendant of PASNObject which is an unsigned ASN guage type.
Definition: pasn.h:435
PIPSocket::Address GetIPAddress() const
Return the value of the object as an IPAddress.
PString GetTypeAsString() const
Return a string giving the type of the object.
virtual void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
PASNObjectID(const PString &str)
#define PARRAY(cls, T)
Declare an array to a specific type of object.
Definition: array.h:1084
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
ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
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
void PrintOn(ostream &strm) const
Virtual functions used by the PObject::operator<< function to print the value of the object...
PASNString(const PString &str)
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
void AppendObjectID(const PString &str)
PString GetString() const
Return the value of the object as a PString.
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
PString GetTypeAsString() const
Return a string giving the type of the object.
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
void AppendString(const PString &str)
static PBoolean DecodeASNLength(const PBYTEArray &buffer, PINDEX &ptr, WORD &len)
Decode an ASN length in the buffer at the given ptr.
PBoolean Decode(const PBYTEArray &buffer, PINDEX &i, PASNObject::ASNType type)
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...
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
static WORD GetASNUnsignedLength(PASNUnsigned data)
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
Definition: pasn.h:292
PASNObject & operator[](PINDEX idx) const
void Append(PASNObject *obj)
void PrintOn(ostream &strm) const
Virtual functions used by the PObject::operator<< function to print the value of the object...
ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
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
WORD GetEncodedLength()
Virtual function used to get the length of object when encoded into ASN format.
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
PString GetTypeAsString() const
Return a string giving the type of the object.