258 void PrintOn(ostream & strm)
const;
286 void PrintOn(ostream & strm)
const;
316 :
PASNString((const BYTE *)addr.GetPointer(), addr.GetSize()) { }
356 void PrintOn(ostream & strm)
const;
471 void PrintOn(ostream & strm)
const;
499 void PrintOn(ostream & strm)
const;
540 void PrintOn(ostream & strm)
const;
550 PASNObjectArray sequence;
558 #endif // PTLIB_PASN_H
PObject * Clone() const
Virtual function used to duplicate objects.
Definition: pasn.h:390
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:347
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:323
PASNTimeTicks(const PBYTEArray &buffer, PINDEX &ptr)
Definition: pasn.h:384
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:277
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:2164
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
Definition: pasn.h:329
PASNObject::ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
Definition: pasn.h:450
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:68
ASN Counter64.
Definition: pasn.h:80
PString GetTypeAsString() const
Return a string giving the type of the object.
ASN Octet String object.
Definition: pasn.h:70
PASNIPAddress(const PBYTEArray &buffer)
Definition: pasn.h:320
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:73
ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
PASNCounter(PASNUnsigned val)
Definition: pasn.h:408
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:76
ASN IPAddress object.
Definition: pasn.h:74
PString GetTypeAsString() const
Return a string giving the type of the object.
PASNGauge(PASNUnsigned val)
Definition: pasn.h:435
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:381
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:71
PASNCounter(const PBYTEArray &buffer, PINDEX &ptr)
Definition: pasn.h:411
void AppendInteger(PASNInt value)
PInt32 PASNInt
Definition: pasn.h:39
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:60
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:78
PObject * Clone() const
Virtual function used to duplicate objects.
Definition: pasn.h:447
maximum of number of ASN object types
Definition: pasn.h:84
void Encode(PBYTEArray &buffer)
Virtual function used to encode the object into ASN format.
Definition: pasn.h:387
PBoolean Decode(const PBYTEArray &buffer, PINDEX &i)
Array of unsigned characters.
Definition: array.h:605
A descendant of PASNObject which is an unsigned ASN ObjID type.
Definition: pasn.h:462
ASN Counter object.
Definition: pasn.h:75
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:302
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:251
static BYTE ASNTypeToType[ASNTypeMax]
Table to map enum ASNType values to ASN identifiers.
Definition: pasn.h:242
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:417
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:431
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.
bool PBoolean
Definition: object.h:174
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:985
A descendant of PASNObject which is an unsigned ASN time tick type.
Definition: pasn.h:377
virtual PASNUnsigned GetUnsigned() const
Return the value of the object as a PASNUnsigned.
ASN Null.
Definition: pasn.h:82
The character string class.
Definition: pstring.h:108
A descendant of PASNObject which is an unsigned ASN counter type.
Definition: pasn.h:404
static void EncodeASNLength(PBYTEArray &buffer, WORD length)
Encode an ASN length value.
WORD valueLen
Definition: pasn.h:303
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:414
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:393
PASNObject::ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
Definition: pasn.h:420
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:351
PASNIPAddress(const PIPSocket::Address &addr)
Definition: pasn.h:315
PASNUnsignedInteger()
Definition: pasn.h:362
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:444
A class describing an IP address.
Definition: ipsock.h:59
DWORD PASNOid
Definition: pasn.h:41
PASNGauge(const PBYTEArray &buffer, PINDEX &ptr)
Definition: pasn.h:438
ASN Unsigned integer 32.
Definition: pasn.h:81
void AppendObjectID(const PString &str)
PString GetString() const
Return the value of the object as a PString.
ASN Sequence object.
Definition: pasn.h:72
PASNObject::ASNType GetType() const
Return a value of type enum ASNType which indicates the type of the object.
Definition: pasn.h:326
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:288
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:516
static WORD GetASNLengthLength(WORD length)
Return the length of an encoded ASN length value.
PBoolean Decode(const PBYTEArray &buffer, PINDEX &i)
Definition: pasn.h:441
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:69
unknown ASN object type
Definition: pasn.h:83
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
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:40
ASN NsapAddress.
Definition: pasn.h:79
#define PNEW
Macro for overriding system default new operator.
Definition: object.h:1896
PObject * Clone() const
Virtual function used to duplicate objects.
Definition: pasn.h:336
A descendant of PASNObject which is the NULL type.
Definition: pasn.h:492
PASNObject()
Create an empty ASN object.
A descendant of PASNObject which is an IP address type.
Definition: pasn.h:311
ASN TimeTicks object.
Definition: pasn.h:77
PString GetTypeAsString() const
Return a string giving the type of the object.