CSdpAttributeField Class Reference

class CSdpAttributeField : public CBase

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

Inherits from

Public Member Functions
~CSdpAttributeField()
IMPORT_C voidAssignTo(const CSdpFmtAttributeField &)
IMPORT_C RStringFAttribute()
IMPORT_C TBoolBelongsTo(const CSdpFmtAttributeField &)
IMPORT_C CSdpAttributeField *CloneL()
IMPORT_C CSdpAttributeField *DecodeL(const TDesC8 &)
IMPORT_C CSdpAttributeField *DecodeLC(const TDesC8 &)
IMPORT_C voidEncodeL(RWriteStream &)
voidExternalizeL(RWriteStream &)
CSdpAttributeField *InternalizeL(RReadStream &)
TBool IsFmtAttribute()
IMPORT_C CSdpAttributeField *NewL(RStringF, const TDesC8 &)
IMPORT_C CSdpAttributeField *NewLC(RStringF, const TDesC8 &)
IMPORT_C voidSetL(RStringF, const TDesC8 &)
IMPORT_C const TDesC8 &Value()
IMPORT_C TBooloperator==(const CSdpAttributeField &)
Private Member Functions
CSdpAttributeField()
CSdpAttributeFieldPtrs &AttributeFieldPtrs()
const CSdpAttributeFieldPtrs &AttributeFieldPtrs()
voidCheckValidControlL(const TDesC8 &)
voidCheckValidCurrAndConfL(const TDesC8 &)
voidCheckValidDesL(const TDesC8 &)
voidCheckValidFmtpL(const TDesC8 &)
voidCheckValidFrameRateL(const TDesC8 &)
voidCheckValidGroupL(const TDesC8 &)
voidCheckValidLangStrL(const TDesC8 &)
voidCheckValidOrientL(const TDesC8 &)
voidCheckValidRangeL(const TDesC8 &)
voidCheckValidRtpmapL(const TDesC8 &)
voidConstructL(const TDesC8 &)
voidConstructL(RStringF, const TDesC8 &)
voidCreateAttributeAndValueStringsLC(RArray< TPtrC8 > &, HBufC8 *&, HBufC8 *&)
voidCreateAttributeFieldPtrsL()
voidFormatProperyAttributeL(const TDesC8 &)
voidFormatValueAttributeL(const TDesC8 &, const TDesC8 &)
voidSetNotPredefinedAttributeL(const TDesC8 &, const TDesC8 &)
voidValidValueInListL(TInt, const TText8 *const , const TDesC8 &)
voidVerifyValueAttributeL(SdpCodecStringConstants::TStrings, const TDesC8 &)
void__DbgTestInvariant()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
RStringF iAttribute
RStringPool iPool
TBool iPropertyAttribute
HBufC8 *iValue

Constructor & Destructor Documentation

CSdpAttributeField()

CSdpAttributeField()[private]

Constructor

~CSdpAttributeField()

IMPORT_C~CSdpAttributeField()

Deletes the resources held by the instance.

Member Functions Documentation

AssignTo(const CSdpFmtAttributeField &)

IMPORT_C voidAssignTo(const CSdpFmtAttributeField &aFmtAttribute)

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

Parameters

const CSdpFmtAttributeField & aFmtAttributeA format level attribute this attribute is assigned to.

Attribute()

IMPORT_C RStringFAttribute()const

Gets the attribute name.

AttributeFieldPtrs()

CSdpAttributeFieldPtrs &AttributeFieldPtrs()[private, inline]

AttributeFieldPtrs()

const CSdpAttributeFieldPtrs &AttributeFieldPtrs()const [private, inline]

BelongsTo(const CSdpFmtAttributeField &)

IMPORT_C TBoolBelongsTo(const CSdpFmtAttributeField &aFmtAttribute)const

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

CheckValidControlL(const TDesC8 &)

voidCheckValidControlL(const TDesC8 &aValue)[private]

Checks if the value is among valid uri value for control attribute

Parameters

const TDesC8 & aValueValue string

CheckValidCurrAndConfL(const TDesC8 &)

voidCheckValidCurrAndConfL(const TDesC8 &aValue)[private]

Checks if the value is valid value for curr and conf attribute as specified in RFC 3312

Parameters

const TDesC8 & aValueValue string

CheckValidDesL(const TDesC8 &)

voidCheckValidDesL(const TDesC8 &aValue)[private]

Checks if the value is valid value for des attribute as specified in RFC 3312

Parameters

const TDesC8 & aValueValue string

CheckValidFmtpL(const TDesC8 &)

voidCheckValidFmtpL(const TDesC8 &aValue)[private]

Checks if the value is valid fmtp string

Parameters

const TDesC8 & aValueValue string

CheckValidFrameRateL(const TDesC8 &)

voidCheckValidFrameRateL(const TDesC8 &aValue)[private]

Checks if the value is valid framerate attribute

Parameters

const TDesC8 & aValueValue string

CheckValidGroupL(const TDesC8 &)

voidCheckValidGroupL(const TDesC8 &aValue)[private]

Checks if the value is valid value for group attribute as specified in RFC 3388

Parameters

const TDesC8 & aValueValue string

CheckValidLangStrL(const TDesC8 &)

voidCheckValidLangStrL(const TDesC8 &aValue)[private]

Checks if the value is valid language attribute as specified in RFC 3066

Parameters

const TDesC8 & aValueValue string

CheckValidOrientL(const TDesC8 &)

voidCheckValidOrientL(const TDesC8 &aValue)[private]

Checks if the value is among the valid orient attributes

Parameters

const TDesC8 & aValueValue string

CheckValidRangeL(const TDesC8 &)

voidCheckValidRangeL(const TDesC8 &aValue)[private]

Checks if the value is valid value for range attribute as specified in RFC 2326

Parameters

const TDesC8 & aValueValue string

CheckValidRtpmapL(const TDesC8 &)

voidCheckValidRtpmapL(const TDesC8 &aValue)[private]

Checks if the value is valid rtpmap string

Parameters

const TDesC8 & aValueValue string

CloneL()

IMPORT_C CSdpAttributeField *CloneL()const

Creates a new instance that is equal to the target.

ConstructL(const TDesC8 &)

voidConstructL(const TDesC8 &aText)[private]

Second phase constructor

Parameters

const TDesC8 & aTextText string ending to LF character

ConstructL(RStringF, const TDesC8 &)

voidConstructL(RStringFaAttribute,
const TDesC8 &aValue
)[private]

Second phase constructor

Parameters

RStringF aAttributeAttribute identifier
const TDesC8 & aValueValue of the attribute of KNullDesC8

CreateAttributeAndValueStringsLC(RArray< TPtrC8 > &, HBufC8 *&, HBufC8 *&)

voidCreateAttributeAndValueStringsLC(RArray< TPtrC8 > &aArray,
HBufC8 *&aAttribute,
HBufC8 *&aValue
)[private]

Forms attribute and value strings out of the token array and pushes both (aAttribute & aValue) into cleanup stack

Parameters

RArray< TPtrC8 > & aArrayToken array
HBufC8 *& aAttributeAttribute string (in cleanup stack)
HBufC8 *& aValueValue string (in cleanup stack)

CreateAttributeFieldPtrsL()

voidCreateAttributeFieldPtrsL()[private]

DecodeL(const TDesC8 &)

IMPORT_C CSdpAttributeField *DecodeL(const TDesC8 &aText)[static]

Constructs a new attribute field.

Parameters

const TDesC8 & aTextA string containing a correctly formatted field value terminated by a CRLF.

DecodeLC(const TDesC8 &)

IMPORT_C CSdpAttributeField *DecodeLC(const TDesC8 &aText)[static]

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

Parameters

const TDesC8 & aText

EncodeL(RWriteStream &)

IMPORT_C voidEncodeL(RWriteStream &aStream)const

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

Parameters

RWriteStream & aStreamStream used for output. On return the stream includes correctly formatted attribute field.

ExternalizeL(RWriteStream &)

voidExternalizeL(RWriteStream &aStream)const

Externalizes the object to stream

Parameters

RWriteStream & aStreamStream where the object's state will be stored

FormatProperyAttributeL(const TDesC8 &)

voidFormatProperyAttributeL(const TDesC8 &aAttribute)[private]

Verifies that attribute is valid property attribute and initializes the member variables of class accordingly

Parameters

const TDesC8 & aAttributeAttribute in descriptor

FormatValueAttributeL(const TDesC8 &, const TDesC8 &)

voidFormatValueAttributeL(const TDesC8 &aAttribute,
const TDesC8 &aValue
)[private]

Verifies that attribute is valid value attribute and initializes the member variables of class accordingly

Parameters

const TDesC8 & aAttribute
const TDesC8 & aValue

InternalizeL(RReadStream &)

CSdpAttributeField *InternalizeL(RReadStream &aStream)[static]

Creates object from the stream data

Parameters

RReadStream & aStreamStream where the object's state will be read

IsFmtAttribute()

TBool IsFmtAttribute()

Informs if the attribute belongs to any format level attribute.

NewL(RStringF, const TDesC8 &)

IMPORT_C CSdpAttributeField *NewL(RStringFaAttribute,
const TDesC8 &aValue
)[static]

Constructs a new attribute field.

Parameters

RStringF aAttributeThe attribute name. It can be a pre- defined name in the SDP string pool or defined by the client.
const TDesC8 & aValueA valid attribute value or an empty descriptor to omit the value part.

NewLC(RStringF, const TDesC8 &)

IMPORT_C CSdpAttributeField *NewLC(RStringFaAttribute,
const TDesC8 &aValue
)[static]

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

Parameters

RStringF aAttributeThe attribute name. It can be a pre-defined name in the SDP string pool or defined by the client.
const TDesC8 & aValueA valid attribute value or an empty descriptor to omit the value part.

SetL(RStringF, const TDesC8 &)

IMPORT_C voidSetL(RStringFaAttribute,
const TDesC8 &aValue
)

Sets the attribute and attribute value.

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

Parameters

RStringF aAttributeA valid attribute name. It can be a pre-defined name in the SDP string pool or defined by the client.
const TDesC8 & aValueA valid attribute value or an empty descriptor to omit the value part.

SetNotPredefinedAttributeL(const TDesC8 &, const TDesC8 &)

voidSetNotPredefinedAttributeL(const TDesC8 &aAttribute,
const TDesC8 &aValue
)[private]

Set attribute and values. Attribute is not one of predefined ones.

Parameters

const TDesC8 & aAttributeAttribute string (in cleanup stack)
const TDesC8 & aValueValue string

ValidValueInListL(TInt, const TText8 *const, const TDesC8 &)

voidValidValueInListL(TIntaItemsCount,
const TText8 *const aValuesList,
const TDesC8 &aValue
)[private]

Checks if value is included in the list of predefined values

Parameters

TInt aItemsCountPredefined values count
const TText8 *const aValuesListList of predefined values
const TDesC8 & aValueValue string

Value()

IMPORT_C const TDesC8 &Value()const

Gets the attribute.

VerifyValueAttributeL(SdpCodecStringConstants::TStrings, const TDesC8 &)

voidVerifyValueAttributeL(SdpCodecStringConstants::TStringsaString,
const TDesC8 &aValue
)[private]

Verifies that the value is valid for the attribute

Parameters

SdpCodecStringConstants::TStrings aString
const TDesC8 & aValue

__DbgTestInvariant()

void__DbgTestInvariant()const [private]

operator==(const CSdpAttributeField &)

IMPORT_C TBooloperator==(const CSdpAttributeField &aObj)const

Compares this instance to another for equality.

Parameters

const CSdpAttributeField & aObj

Member Data Documentation

RStringF iAttribute

RStringF iAttribute[private]

RStringPool iPool

RStringPool iPool[private]

TBool iPropertyAttribute

TBool iPropertyAttribute[private]

HBufC8 * iValue

HBufC8 *iValue[private]