Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: SdpOriginField.h
Link against: sdpcodec.lib

Class CSdpOriginField

class CSdpOriginField : public CBase;

Description

This class encapsulates the origin field of the Session Description Protocol.

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 CSdpOriginField:
Address(), AddressType(), CloneL(), DecodeL(), DecodeLC(), EncodeL(), InetAddress(), NetType(), NewL(), NewL(), NewLC(), NewLC(), SessionId(), SetAddressL(), SetInetAddress(), SetSessionId(), SetUserNameL(), SetVersion(), UserName(), Version(), operator==(), ~CSdpOriginField()

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


Construction and destruction


NewL()

static IMPORT_C CSdpOriginField *NewL(const TDesC8 &aUserName, TInt64 aSessionId, TInt64 aSessionVersion, TInetAddr &aAddress);

Description

Constructs a new origin field.

Parameters

const TDesC8 &aUserName

A valid user name value.

TInt64 aSessionId

A valid session id value.

TInt64 aSessionVersion

A valid announcement version value.

TInetAddr &aAddress

A unicast IP address from either KAfInet or KAfInet6 family.

Return value

CSdpOriginField *

a new instance.


NewLC()

static IMPORT_C CSdpOriginField *NewLC(const TDesC8 &aUserName, TInt64 aSessionId, TInt64 aSessionVersion, TInetAddr &aAddress);

Description

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

Parameters

const TDesC8 &aUserName

A valid user name value.

TInt64 aSessionId

A valid session id value.

TInt64 aSessionVersion

A valid announcement version value.

TInetAddr &aAddress

A unicast IP address from either KAfInet or KAfInet6 family.

Return value

CSdpOriginField *

a new instance.


NewL()

static IMPORT_C CSdpOriginField *NewL(const TDesC8 &aUserName, TInt64 aSessionId, TInt64 aSessionVersion, RStringF aNetType, RStringF aAddressType, const TDesC8 &aAddress);

Description

Constructs a new origin field.

Parameters

const TDesC8 &aUserName

A valid user name value.

TInt64 aSessionId

A valid session id value.

TInt64 aSessionVersion

A valid announcement version value.

RStringF aNetType

A valid network type value (typically "IN").

RStringF aAddressType

A valid address type value (typically "IP4" or "IP6").

const TDesC8 &aAddress

A unicast IP Address, Fully Qualified Domain Name (FQDN), or an other type of address allowed for the address type.

Return value

CSdpOriginField *

a new instance.


NewLC()

static IMPORT_C CSdpOriginField *NewLC(const TDesC8 &aUserName, TInt64 aSessionId, TInt64 aSessionVersion, RStringF aNetType, RStringF aAddressType, const TDesC8 &aAddress);

Description

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

Parameters

const TDesC8 &aUserName

A valid user name value.

TInt64 aSessionId

A valid session id value.

TInt64 aSessionVersion

A valid announcement version value.

RStringF aNetType

A valid network type value (typically "IN").

RStringF aAddressType

A valid address type value (typically "IP4" or "IP6").

const TDesC8 &aAddress

A unicast IP Address, Fully Qualified Domain Name (FQDN), or an other type of address allowed for the address type.

Return value

CSdpOriginField *

a new instance.


~CSdpOriginField()

IMPORT_C ~CSdpOriginField();

Description

Deletes the resources held by the instance.

[Top]


Member functions


DecodeL()

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

Description

Constructs a new origin field.

Parameters

const TDesC8 &aText

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

Return value

CSdpOriginField *

a new instance.


DecodeLC()

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

Description

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

Parameters

const TDesC8 &aText

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

Return value

CSdpOriginField *

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 origin field.


CloneL()

IMPORT_C CSdpOriginField *CloneL() const;

Description

Creates a new instance that is equal to the target.

Return value

CSdpOriginField *

a new instance.


operator==()

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

Description

Compares this instance to another for equality.

Parameters

const CSdpOriginField &aObj

The instance to compare to.

Return value

TBool

ETrue if equal, EFalse if not.


UserName()

IMPORT_C const TDesC8 &UserName() const;

Description

Gets the user name.

Return value

const TDesC8 &

User name.


SetUserNameL()

IMPORT_C void SetUserNameL(const TDesC8 &aValue);

Description

Sets the user name.

Parameters

const TDesC8 &aValue

A valid user name value.

Leave codes

KErrSdpCodecOriginField

if aValue is not a valid user name.


SessionId()

IMPORT_C TInt64 SessionId() const;

Description

Gets the session id of the origin field.

Return value

TInt64

Session id.


SetSessionId()

IMPORT_C void SetSessionId(TInt64 aValue);

Description

Sets the session id.

Parameters

TInt64 aValue

A valid session id value.


Version()

IMPORT_C TInt64 Version() const;

Description

Gets the announcement version.

Return value

TInt64

Version.


SetVersion()

IMPORT_C void SetVersion(TInt64 aValue);

Description

Sets the announcement version..

Parameters

TInt64 aValue

A valid version value.


NetType()

IMPORT_C RStringF NetType() const;

Description

Gets the network type.

Return value

RStringF

The network type from pre-defined SDP string table or given by the user.


AddressType()

IMPORT_C RStringF AddressType() const;

Description

Gets the address type.

Return value

RStringF

The address type from pre-defined SDP string table or given by the user.


InetAddress()

IMPORT_C const TInetAddr *InetAddress() const;

Description

Gets the address.

Return value

const TInetAddr *

Address as an IP address or null if it is not an IP address. This may be e.g. when the address has been specified as a FQDN. In this case, the address can be accessed using the other getters.


Address()

IMPORT_C const TDesC8 &Address() const;

Description

Gets the address.

Return value

const TDesC8 &

Address as a string.


SetInetAddress()

IMPORT_C void SetInetAddress(const TInetAddr &aValue);

Description

Sets the address, network and address type. Also sets the network type to "IN" and address type to "IP4" or "IP6" depending on the address family of aValue.

Parameters

const TInetAddr &aValue

A unicast IP address from either KAfInet or KAfInet6 family.


SetAddressL()

IMPORT_C void SetAddressL(const TDesC8 &aAddress, RStringF aNetType, RStringF aAddressType);

Description

Sets the address, network and address type.

Parameters

const TDesC8 &aAddress

A unicast IP Address, Fully Qualified Domain Name (FQDN), or an other type of address allowed for the address type.

RStringF aNetType

A valid network type value (typically "IN").

RStringF aAddressType

A valid address type value (typically "IP4" or "IP6").

Leave codes

KErrSdpCodecOriginField

if aNetType or aAddressType are not valid tokens, or aAddress is invalid, or aAddress type is not aligned with the address format