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 void AssignTo (const CSdpFmtAttributeField &)
IMPORT_C RStringF Attribute ()
IMPORT_C TBool BelongsTo (const CSdpFmtAttributeField &)
IMPORT_C CSdpAttributeField * CloneL ()
IMPORT_C CSdpAttributeField * DecodeL (const TDesC8 &)
IMPORT_C CSdpAttributeField * DecodeLC (const TDesC8 &)
IMPORT_C void EncodeL ( RWriteStream &)
void ExternalizeL ( RWriteStream &)
CSdpAttributeField * InternalizeL ( RReadStream &)
TBool IsFmtAttribute ()
IMPORT_C CSdpAttributeField * NewL ( RStringF , const TDesC8 &)
IMPORT_C CSdpAttributeField * NewLC ( RStringF , const TDesC8 &)
IMPORT_C void SetL ( RStringF , const TDesC8 &)
IMPORT_C const TDesC8 & Value ()
IMPORT_C TBool operator== (const CSdpAttributeField &)
Private Member Functions
CSdpAttributeField ()
CSdpAttributeFieldPtrs & AttributeFieldPtrs ()
const CSdpAttributeFieldPtrs & AttributeFieldPtrs ()
void CheckValidControlL (const TDesC8 &)
void CheckValidCurrAndConfL (const TDesC8 &)
void CheckValidDesL (const TDesC8 &)
void CheckValidFmtpL (const TDesC8 &)
void CheckValidFrameRateL (const TDesC8 &)
void CheckValidGroupL (const TDesC8 &)
void CheckValidLangStrL (const TDesC8 &)
void CheckValidOrientL (const TDesC8 &)
void CheckValidRangeL (const TDesC8 &)
void CheckValidRtpmapL (const TDesC8 &)
void ConstructL (const TDesC8 &)
void ConstructL ( RStringF , const TDesC8 &)
void CreateAttributeAndValueStringsLC ( RArray < TPtrC8 > &, HBufC8 *&, HBufC8 *&)
void CreateAttributeFieldPtrsL ()
void FormatProperyAttributeL (const TDesC8 &)
void FormatValueAttributeL (const TDesC8 &, const TDesC8 &)
void SetNotPredefinedAttributeL (const TDesC8 &, const TDesC8 &)
void ValidValueInListL ( TInt , const TText8 *const , const TDesC8 &)
void VerifyValueAttributeL ( 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 void AssignTo ( 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 & aFmtAttribute A format level attribute this attribute is assigned to.

Attribute()

IMPORT_C RStringF Attribute ( ) const

Gets the attribute name.

AttributeFieldPtrs()

CSdpAttributeFieldPtrs & AttributeFieldPtrs ( ) [private, inline]

AttributeFieldPtrs()

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

BelongsTo(const CSdpFmtAttributeField &)

IMPORT_C TBool BelongsTo ( 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 &)

void CheckValidControlL ( const TDesC8 & aValue ) [private]

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

Parameters

const TDesC8 & aValue Value string

CheckValidCurrAndConfL(const TDesC8 &)

void CheckValidCurrAndConfL ( const TDesC8 & aValue ) [private]

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

Parameters

const TDesC8 & aValue Value string

CheckValidDesL(const TDesC8 &)

void CheckValidDesL ( const TDesC8 & aValue ) [private]

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

Parameters

const TDesC8 & aValue Value string

CheckValidFmtpL(const TDesC8 &)

void CheckValidFmtpL ( const TDesC8 & aValue ) [private]

Checks if the value is valid fmtp string

Parameters

const TDesC8 & aValue Value string

CheckValidFrameRateL(const TDesC8 &)

void CheckValidFrameRateL ( const TDesC8 & aValue ) [private]

Checks if the value is valid framerate attribute

Parameters

const TDesC8 & aValue Value string

CheckValidGroupL(const TDesC8 &)

void CheckValidGroupL ( const TDesC8 & aValue ) [private]

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

Parameters

const TDesC8 & aValue Value string

CheckValidLangStrL(const TDesC8 &)

void CheckValidLangStrL ( const TDesC8 & aValue ) [private]

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

Parameters

const TDesC8 & aValue Value string

CheckValidOrientL(const TDesC8 &)

void CheckValidOrientL ( const TDesC8 & aValue ) [private]

Checks if the value is among the valid orient attributes

Parameters

const TDesC8 & aValue Value string

CheckValidRangeL(const TDesC8 &)

void CheckValidRangeL ( const TDesC8 & aValue ) [private]

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

Parameters

const TDesC8 & aValue Value string

CheckValidRtpmapL(const TDesC8 &)

void CheckValidRtpmapL ( const TDesC8 & aValue ) [private]

Checks if the value is valid rtpmap string

Parameters

const TDesC8 & aValue Value string

CloneL()

IMPORT_C CSdpAttributeField * CloneL ( ) const

Creates a new instance that is equal to the target.

ConstructL(const TDesC8 &)

void ConstructL ( const TDesC8 & aText ) [private]

Second phase constructor

Parameters

const TDesC8 & aText Text string ending to LF character

ConstructL(RStringF, const TDesC8 &)

void ConstructL ( RStringF aAttribute,
const TDesC8 & aValue
) [private]

Second phase constructor

Parameters

RStringF aAttribute Attribute identifier
const TDesC8 & aValue Value of the attribute of KNullDesC8

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

void CreateAttributeAndValueStringsLC ( 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 > & aArray Token array
HBufC8 *& aAttribute Attribute string (in cleanup stack)
HBufC8 *& aValue Value string (in cleanup stack)

CreateAttributeFieldPtrsL()

void CreateAttributeFieldPtrsL ( ) [private]

DecodeL(const TDesC8 &)

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

Constructs a new attribute field.

Parameters

const TDesC8 & aText A 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 void EncodeL ( RWriteStream & aStream ) const

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.

ExternalizeL(RWriteStream &)

void ExternalizeL ( RWriteStream & aStream ) const

Externalizes the object to stream

Parameters

RWriteStream & aStream Stream where the object's state will be stored

FormatProperyAttributeL(const TDesC8 &)

void FormatProperyAttributeL ( const TDesC8 & aAttribute ) [private]

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

Parameters

const TDesC8 & aAttribute Attribute in descriptor

FormatValueAttributeL(const TDesC8 &, const TDesC8 &)

void FormatValueAttributeL ( 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 & aStream Stream 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 ( RStringF aAttribute,
const TDesC8 & aValue
) [static]

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.

NewLC(RStringF, const TDesC8 &)

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

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.

SetL(RStringF, const TDesC8 &)

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

Sets the attribute and attribute value.

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

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.

SetNotPredefinedAttributeL(const TDesC8 &, const TDesC8 &)

void SetNotPredefinedAttributeL ( const TDesC8 & aAttribute,
const TDesC8 & aValue
) [private]

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

Parameters

const TDesC8 & aAttribute Attribute string (in cleanup stack)
const TDesC8 & aValue Value string

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

void ValidValueInListL ( TInt aItemsCount,
const TText8 *const aValuesList,
const TDesC8 & aValue
) [private]

Checks if value is included in the list of predefined values

Parameters

TInt aItemsCount Predefined values count
const TText8 *const aValuesList List of predefined values
const TDesC8 & aValue Value string

Value()

IMPORT_C const TDesC8 & Value ( ) const

Gets the attribute.

VerifyValueAttributeL(SdpCodecStringConstants::TStrings, const TDesC8 &)

void VerifyValueAttributeL ( SdpCodecStringConstants::TStrings aString,
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 TBool operator== ( 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]