|
||
class CSdpAttrValue : public CBase;
Base class for classes that encapsulate SDP attributes values.
Sub-classes of this wrap specific types of SDP service record attributes. For example, CSdpBoolean derives from CSdpAttrValue
to encapsulate boolean attributes. The base class defines getters for all types: for example, it declares a function CSdpAttrValue::Bool()const
that returns the attribute value as a TBool. Note though that the function would panic unless called on actual CSdpBoolean.
A common base class allows attributes of all types to be used polymorphically. You can use CSdpAttrValue's CSdpAttrValue::Type()const
function to find the actual type being used, and upcast the pointer appropriately.
CBase
-
Base class for all classes to be instantiated on the heap.
CSdpAttrValue
- Base class for classes that encapsulate SDP attributes values.
Defined in CSdpAttrValue
:
AcceptVisitorL(MSdpAttributeValueVisitor &)
Request a call back to pass the attribute value.Bool()const
Gets a Boolean attribute value.DataSize()const
Gets the size of the attribute.Des()const
Gets a data buffer attribute value.DoesIntFit()const
Tests if the attribute can be stored in an integer value.Int()const
Gets a signed integer attribute value.Type()const
Gets the attribute type.UUID()const
Gets a UUID attribute value.Uint()const
Gets an unsigned integer attribute value.Uint128(TUint64 &,TUint64 &)const
Gets two TUint64s, one being the high 64 bits and one being the low 64 bits of a...Uint64(TUint64 &)const
Gets the value as an unsigned 64 bit integer~CSdpAttrValue()
Destructor. Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...virtual TSdpElementType Type() const=0;
Gets the attribute type.
|
virtual TUint DataSize() const=0;
Gets the size of the attribute.
|
virtual TUint Uint() const;
Gets an unsigned integer attribute value.
The base class implementation panics.
The size of the unsigned integer should be checked with CSdpAttrValue::DataSize()const
before calling.
|
virtual TInt Int() const;
Gets a signed integer attribute value.
The base class implementation panics.
|
virtual TBool DoesIntFit() const;
Tests if the attribute can be stored in an integer value.
The base class implementation returns EFalse.
|
virtual TInt Bool() const;
Gets a Boolean attribute value.
The base class implementation panics.
|
virtual const TUUID& UUID() const;
Gets a UUID attribute value.
The base class implementation panics.
|
virtual const TPtrC8 Des() const;
Gets a data buffer attribute value.
The base class implementation panics.
|
virtual void AcceptVisitorL(MSdpAttributeValueVisitor &aVisitor);
Request a call back to pass the attribute value.
When called on attributes that are not lists (not DEA or DES), then this calls MSdpAttributeValueVisitor::VisitAttributeValueL(CSdpAttrValue &,TSdpElementType)
, passing the attribute value object itself (i.e. *this), and the value attribute type.
It is more useful when called on a DES or DEA object, as it then provides a simple method of enumerating each attribute in a list.
|
CSdpAttrValueList::AcceptVisitorL(MSdpAttributeValueVisitor &)
Requests a call back to pass the attribute value.MSdpAttributeValueVisitor::VisitAttributeValueL(CSdpAttrValue &,TSdpElementType)
Called to pass an attribute value.IMPORT_C void Uint64(TUint64 &aValue) const;
Gets the value as an unsigned 64 bit integer
The size of the unsigned integer should be checked with CSdpAttrValue::DataSize()const
before calling.
|
IMPORT_C void Uint128(TUint64 &aLo, TUint64 &aHi) const;
Gets two TUint64s, one being the high 64 bits and one being the low 64 bits of a 128 bit integer
The size of the unsigned integer should be checked with CSdpAttrValue::DataSize()const
before calling.
|