Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: SdpAttributeField.h
Link against: sdpcodec.lib

Class CSdpAttributeField

class CSdpAttributeField : public CBase;

Description

This class encapsulates the attribute field of Session Description Protocol for media and session level attributes. Media format/payload type level attributes are supported by the CSdpFmtAttributeField class.

The normative reference for correct formatting and values is draft-ietf-mmusic-sdp-new-14 unless specified otherwise in member documentation. The implementation supports this normative reference, but does not enforce it fully.

sdpcodec.lib

Derivation

Members

Defined in CSdpAttributeField:
AssignTo(), Attribute(), BelongsTo(), CloneL(), DecodeL(), DecodeLC(), EncodeL(), NewL(), NewLC(), SetL(), Value(), operator==(), ~CSdpAttributeField()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C CSdpAttributeField *NewL(RStringF aAttribute, const TDesC8 &aValue);

Description

Constructs a new attribute field.

Parameters

RStringF aAttribute

The attribute name. It can be a pre- defined name in the SDP string pool or defined by the client.

const TDesC8 &aValue

A valid attribute value or an empty descriptor to omit the value part.

Return value

CSdpAttributeField *

a new instance.


NewLC()

static IMPORT_C CSdpAttributeField *NewLC(RStringF aAttribute, const TDesC8 &aValue);

Description

Constructs a new attribute field and adds the pointer to the cleanup stack.

Parameters

RStringF aAttribute

The attribute name. It can be a pre-defined name in the SDP string pool or defined by the client.

const TDesC8 &aValue

A valid attribute value or an empty descriptor to omit the value part.

Return value

CSdpAttributeField *

a new instance.


~CSdpAttributeField()

IMPORT_C ~CSdpAttributeField();

Description

Deletes the resources held by the instance.

[Top]


Member functions


DecodeL()

static IMPORT_C CSdpAttributeField *DecodeL(const TDesC8 &aText);

Description

Constructs a new attribute field.

Parameters

const TDesC8 &aText

A string containing a correctly formatted field value terminated by a CRLF.

Return value

CSdpAttributeField *

a new instance.


DecodeLC()

static IMPORT_C CSdpAttributeField *DecodeLC(const TDesC8 &aText);

Description

Constructs a new attribute field and adds the pointer to the cleanup stack.

Parameters

const TDesC8 &aText

Return value

CSdpAttributeField *

a new instance.


EncodeL()

IMPORT_C void EncodeL(RWriteStream &aStream) const;

Description

Outputs the field formatted according to SDP syntax and including the terminating CRLF.

Parameters

RWriteStream &aStream

Stream used for output. On return the stream includes correctly formatted attribute field.


CloneL()

IMPORT_C CSdpAttributeField *CloneL() const;

Description

Creates a new instance that is equal to the target.

Return value

CSdpAttributeField *

a new instance.


operator==()

IMPORT_C TBool operator==(const CSdpAttributeField &aObj) const;

Description

Compares this instance to another for equality.

Parameters

const CSdpAttributeField &aObj

Return value

TBool

ETrue if equal, EFalse if not.


Attribute()

IMPORT_C RStringF Attribute() const;

Description

Gets the attribute name.

Return value

RStringF

The attribute name. The name can be pre-defined name in the SDP string table or defined by the client.


Value()

IMPORT_C const TDesC8 &Value() const;

Description

Gets the attribute.

Return value

const TDesC8 &

The value or an empty descriptor if there is no value part.


SetL()

IMPORT_C void SetL(RStringF aAttribute, const TDesC8 &aValue);

Description

Sets the attribute and attribute value.

Parameters

RStringF aAttribute

A valid attribute name. It can be a pre-defined name in the SDP string pool or defined by the client.

const TDesC8 &aValue

A valid attribute value or an empty descriptor to omit the value part.

Leave codes

KErrSdpCodecAttributeField

if the attribute part is not pre-defined EAttributeFmtp or EAttributeRtpmap.


AssignTo()

IMPORT_C void AssignTo(const CSdpFmtAttributeField &aFmtAttribute);

Description

Assigns attribute to the format level attribute. In the final output the attribute will placed after format level attribute.

Parameters

const CSdpFmtAttributeField &aFmtAttribute

A format level attribute this attribute is assigned to.


BelongsTo()

IMPORT_C TBool BelongsTo(const CSdpFmtAttributeField &aFmtAttribute) const;

Description

Test if the attribute belongs to the given format level attribute. Note, that the check can be true for the media level paremeter if it appears after the last format level attribute.

Parameters

const CSdpFmtAttributeField &aFmtAttribute

Return value

TBool

ETrue if attribute belongs to the format level attribute, EFalse otherwise.