CSdpAttrValue Class Reference

#include <btsdp.h>

Link against: sdpdatabase.lib

class CSdpAttrValue : public CBase

Inherits from

  • CSdpAttrValue

    Detailed Description

    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 Bool() 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 Type() function to find the actual type being used, and upcast the pointer appropriately.

    Constructor & Destructor Documentation

    CSdpAttrValue ( )

    CSdpAttrValue()

    Default constructor.

    ~CSdpAttrValue ( )

    ~CSdpAttrValue()[virtual]

    Destructor.

    Member Function Documentation

    AcceptVisitorL ( MSdpAttributeValueVisitor & )

    voidAcceptVisitorL(MSdpAttributeValueVisitor &aVisitor)[virtual]

    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(), 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.

    See also: CSdpAttrValueList::AcceptVisitorL() MSdpAttributeValueVisitor::VisitAttributeValueL()

    ParameterDescription
    aVisitorAbstract interface that can be implemented to receive an enumeration of the values in an attribute list.

    Bool ( )

    TInt Bool()const [virtual]

    Gets a Boolean attribute value.

    The base class implementation panics.

    Returns: Attribute value

    DataSize ( )

    TUint DataSize()const [pure virtual]

    Gets the size of the attribute.

    Returns: Size of the attribute in bytes

    Des ( )

    const TPtrC8Des()const [virtual]

    Gets a data buffer attribute value.

    The base class implementation panics.

    Returns: Attribute value

    DoesIntFit ( )

    TBool DoesIntFit()const [virtual]

    Tests if the attribute can be stored in an integer value.

    The base class implementation returns EFalse.

    Returns: True if the attribute can be stored in an integer value

    Extension_ ( TUint, TAny *&, TAny * )

    TInt Extension_(TUintaExtensionId,
    TAny *&a0,
    TAny *a1
    )[protected, virtual]

    Reimplemented from CBase::Extension_(TUint,TAny *&,TAny *)

    The extension method provides a polymorphic behaviour to allow interface extension.

    The base class implementation panics.

    Int ( )

    TInt Int()const [virtual]

    Gets a signed integer attribute value.

    The base class implementation panics.

    Returns: Attribute value

    Type ( )

    TSdpElementType Type()const [pure virtual]

    Gets the attribute type.

    Returns: Attribute type

    UUID ( )

    const TUUID &UUID()const [virtual]

    Gets a UUID attribute value.

    The base class implementation panics.

    Returns: Attribute value

    Uint ( )

    TUint Uint()const [virtual]

    Gets an unsigned integer attribute value.

    The base class implementation panics.

    The size of the unsigned integer should be checked with DataSize() before calling.

    Returns: Attribute value

    Uint128 ( TUint64 &, TUint64 & )

    IMPORT_C voidUint128(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 DataSize() before calling.

    ParameterDescription
    aLoThe unsigned 64 bit integer contains the lower bits of the 128 bit integer contained in the descriptor
    aHiThe unsigned 64 bit integer contains the higher bits of the 128 bit integer contained in the descriptor

    Uint64 ( TUint64 & )

    IMPORT_C voidUint64(TUint64 &aValue)const

    Gets the value as an unsigned 64 bit integer

    The size of the unsigned integer should be checked with DataSize() before calling.

    ParameterDescription
    aValueA 64 bit unsigned integer