S60 3rd Edition API Reference: CSdpConnectionField Class Reference

CSdpConnectionField Class Reference

API published in: S60 2nd Ed

Link against: sdpcodec.lib

Capability Information

Required Capabilities

None

Exceptions


#include <sdpconnectionfield.h>

Detailed Description

PublishedAll
Released
This class encapsulates the connection information 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.


Public Member Functions

IMPORT_C ~CSdpConnectionField ()
 Deletes the resources held by the instance.
IMPORT_C void EncodeL (RWriteStream &aStream) const
 Outputs the field formatted according to SDP syntax and including the terminating CRLF.
IMPORT_C CSdpConnectionFieldCloneL () const
 Creates a new instance that is equal to the target.
IMPORT_C TBool operator== (const CSdpConnectionField &aObj) const
 Compares this instance to another for equality.
IMPORT_C RStringF NetType () const
 Gets the network type that is from the pre-defined SDP string table or given by the user.
IMPORT_C RStringF AddressType () const
 Gets the address type that is from the pre-defined SDP string table or given by the user.
IMPORT_C const TInetAddr * InetAddress () const
 Gets the address.
IMPORT_C const TDesC8 & Address () const
 Gets the address.
IMPORT_C void SetInetAddressL (const TInetAddr &aValue, TInt aTTL=KErrNotFound, TUint aNumOfAddress=KDefaultNumOfAddress)
 Sets the address, network and address type.
IMPORT_C void SetAddressL (RStringF aNetType, RStringF aAddressType, const TDesC8 &aAddress)
 Sets the address, network and address type.
IMPORT_C TInt TTLValue () const
 Gets TTL attribute.
IMPORT_C void SetTTLL (TInt aTTL)
 Sets TTL attribute (only valid for IP4 multicasts).
IMPORT_C TInt NumOfAddress () const
 Gets the number of addresses (can be more than 1 for multicasts).
IMPORT_C void SetNumOfAddressL (TUint aNumOfAddress)
 Sets the number of addreses allocated for multicast.
void ExternalizeL (RWriteStream &aStream) const
 Externalizes the object to stream.

Static Public Member Functions

static IMPORT_C CSdpConnectionFieldDecodeL (const TDesC8 &aText)
 Constructs a new connection field.
static IMPORT_C CSdpConnectionFieldDecodeLC (const TDesC8 &aText)
 Constructs a new connection field and adds the pointer to the cleanup stack.
static IMPORT_C CSdpConnectionFieldNewL (const TInetAddr &aAddress, TInt aTTL=KErrNotFound, TUint aNumOfAddress=KDefaultNumOfAddress)
 Constructs a new connection field.
static IMPORT_C CSdpConnectionFieldNewL (RStringF aNetType, RStringF aAddressType, const TDesC8 &aAddress)
 Constructs a new connection field.
static IMPORT_C CSdpConnectionFieldNewLC (const TInetAddr &aAddress, TInt aTTL=KErrNotFound, TUint aNumOfAddress=KDefaultNumOfAddress)
 Constructs a new connection field and adds the pointer to the cleanup stack.
static IMPORT_C CSdpConnectionFieldNewLC (RStringF aNetType, RStringF aAddressType, const TDesC8 &aAddress)
 Construct a new connection field and adds the pointer to the cleanup stack.
static CSdpConnectionFieldInternalizeL (RReadStream &aStream)
 Creates object from the stream data.

Constructor & Destructor Documentation

IMPORT_C CSdpConnectionField::~CSdpConnectionField  ) 
 

Deletes the resources held by the instance.


Member Function Documentation

IMPORT_C const TDesC8& CSdpConnectionField::Address  )  const
 

Gets the address.

Returns:
Address as a string.
IMPORT_C RStringF CSdpConnectionField::AddressType  )  const
 

Gets the address type that is from the pre-defined SDP string table or given by the user.

Returns:
The address type.
IMPORT_C CSdpConnectionField* CSdpConnectionField::CloneL  )  const
 

Creates a new instance that is equal to the target.

Returns:
a new instance.
static IMPORT_C CSdpConnectionField* CSdpConnectionField::DecodeL const TDesC8 &  aText  )  [static]
 

Constructs a new connection field.

Parameters:
aText A string containing a correctly formatted field value terminated by a CRLF.
Returns:
a new instance.
static IMPORT_C CSdpConnectionField* CSdpConnectionField::DecodeLC const TDesC8 &  aText  )  [static]
 

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

Parameters:
aText A string containing a correctly formatted field value terminated by a CRLF.
Returns:
a new instance.
IMPORT_C void CSdpConnectionField::EncodeL RWriteStream &  aStream  )  const
 

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

Parameters:
aStream,: Stream used for output. On return the stream includes correctly formatted connection field.
void CSdpConnectionField::ExternalizeL RWriteStream &  aStream  )  const
 

Externalizes the object to stream.

Parameters:
aStream Stream where the object's state will be stored
IMPORT_C const TInetAddr* CSdpConnectionField::InetAddress  )  const
 

Gets the address.

Returns:
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.
static CSdpConnectionField* CSdpConnectionField::InternalizeL RReadStream &  aStream  )  [static]
 

Creates object from the stream data.

Parameters:
aStream Stream where the object's state will be read
Returns:
Initialized object
IMPORT_C RStringF CSdpConnectionField::NetType  )  const
 

Gets the network type that is from the pre-defined SDP string table or given by the user.

Returns:
The network type.
static IMPORT_C CSdpConnectionField* CSdpConnectionField::NewL RStringF  aNetType,
RStringF  aAddressType,
const TDesC8 &  aAddress
[static]
 

Constructs a new connection field.

Parameters:
aNetType A valid network type name from the pre- defined SDP string table or defined by the user. A valid address type name from the pre-defined SDP string table or defined by the user.
const TDesC8& aAddress: A valid address of the address type. Can contain TTL & number of addresses parameter as well.
Returns:
a new instance.
static IMPORT_C CSdpConnectionField* CSdpConnectionField::NewL const TInetAddr &  aAddress,
TInt  aTTL = KErrNotFound,
TUint  aNumOfAddress = KDefaultNumOfAddress
[static]
 

Constructs a new connection field.

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

Parameters:
aAddress IP address from either KAfInet or KAfInet6 family
aTTL Time-To-Live for IP4 multicasts, set it as KErrNotFound if IPv6 multicast or IPv4 unicast
aNumOfAddress Number of addresses in multicast, if unicast, must be 1
Returns:
a new instance.
static IMPORT_C CSdpConnectionField* CSdpConnectionField::NewLC RStringF  aNetType,
RStringF  aAddressType,
const TDesC8 &  aAddress
[static]
 

Construct a new connection field and adds the pointer to the cleanup stack.

Parameters:
aNetType A valid network type name from the pre- defined SDP string table or defined by the user A valid address type name from the pre-defined SDP string table or defined by the user
const TDesC8& aAddress: A valid address of the address type. Can contain TTL & number of addresses parameter as well.
Returns:
a new instance.
static IMPORT_C CSdpConnectionField* CSdpConnectionField::NewLC const TInetAddr &  aAddress,
TInt  aTTL = KErrNotFound,
TUint  aNumOfAddress = KDefaultNumOfAddress
[static]
 

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

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

Parameters:
aAddress IP address from either KAfInet or KAfInet6 family
aTTL Time-To-Live for IP4 multicasts, set it as KErrNotFound if IPv6 multicast or IPv4 unicast
aNumOfAddress Number of addresses in multicast, if unicast, must be 1
Returns:
a new instance.
IMPORT_C TInt CSdpConnectionField::NumOfAddress  )  const
 

Gets the number of addresses (can be more than 1 for multicasts).

Multicast addresses are contiguously allocated above the base address.

Returns:
Number of addresses
IMPORT_C TBool CSdpConnectionField::operator== const CSdpConnectionField aObj  )  const
 

Compares this instance to another for equality.

Parameters:
const CSdpConnectionField& aObj: The instance to compare to.
Returns:
ETrue if equal, EFalse if not.
IMPORT_C void CSdpConnectionField::SetAddressL RStringF  aNetType,
RStringF  aAddressType,
const TDesC8 &  aAddress
 

Sets the address, network and address type.

Parameters:
aNetType A valid network type name from the pre- defined SDP string table or defined by the user
aAddressType A valid address type name from the pre-defined SDP string table or defined by the user
aAddress A valid address of the address type.
IMPORT_C void CSdpConnectionField::SetInetAddressL const TInetAddr &  aValue,
TInt  aTTL = KErrNotFound,
TUint  aNumOfAddress = KDefaultNumOfAddress
 

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 aAddress.

Parameters:
aValue The new address.
aTTL Time-To-Live for IP4 multicasts, set it as KErrNotFound if IPv6 multicast or IPv4 unicast
aNumOfAddress Number of addresses in multicast, if unicast, must be 1.
Leave:
KErrSdpCodecConnectionField ifaddress to be set is wrongly formatted.
IMPORT_C void CSdpConnectionField::SetNumOfAddressL TUint  aNumOfAddress  ) 
 

Sets the number of addreses allocated for multicast.

Parameters:
aNumOfAddress Number of addresses in multicast
Leave:
KErrSdpCodecConnectionField if the address is unicast.
IMPORT_C void CSdpConnectionField::SetTTLL TInt  aTTL  ) 
 

Sets TTL attribute (only valid for IP4 multicasts).

Leaves if trying to set TTL to address that doesn't support it.

Parameters:
aTTL Time-To-Live for IP4 multicasts
Leave:
KErrSdpCodecConnectionField if aTTL is invalid.
IMPORT_C TInt CSdpConnectionField::TTLValue  )  const
 

Gets TTL attribute.

Returns:
TTL or KErrNotFound, if one is not available for the address

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top