CSdpConnectionField Class Reference
class CSdpConnectionField : public CBase |
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.
sdpcodec.lib
Public Member Functions |
---|
| ~CSdpConnectionField() |
IMPORT_C const TDesC8 & | Address() |
IMPORT_C RStringF | AddressType() |
IMPORT_C CSdpConnectionField * | CloneL() |
IMPORT_C CSdpConnectionField * | DecodeL(const TDesC8 &) |
IMPORT_C CSdpConnectionField * | DecodeLC(const TDesC8 &) |
IMPORT_C void | EncodeL(RWriteStream &) |
void | ExternalizeL(RWriteStream &) |
IMPORT_C const TInetAddr * | InetAddress() |
CSdpConnectionField * | InternalizeL(RReadStream &) |
IMPORT_C RStringF | NetType() |
IMPORT_C CSdpConnectionField * | NewL(const TInetAddr &, TInt, TUint) |
IMPORT_C CSdpConnectionField * | NewL(RStringF, RStringF, const TDesC8 &) |
IMPORT_C CSdpConnectionField * | NewLC(const TInetAddr &, TInt, TUint) |
IMPORT_C CSdpConnectionField * | NewLC(RStringF, RStringF, const TDesC8 &) |
IMPORT_C TInt | NumOfAddress() |
IMPORT_C void | SetAddressL(RStringF, RStringF, const TDesC8 &) |
IMPORT_C void | SetInetAddressL(const TInetAddr &, TInt, TUint) |
IMPORT_C void | SetNumOfAddressL(TUint) |
IMPORT_C void | SetTTLL(TInt) |
IMPORT_C TInt | TTLValue() |
IMPORT_C TBool | operator==(const CSdpConnectionField &) |
Private Member Functions |
---|
| CSdpConnectionField() |
void | ConstructL(const TDesC8 &) |
void | ConstructL(const TInetAddr &, TInt, TUint) |
void | ConstructL(RStringF, RStringF, const TDesC8 &) |
void | CopyAddressL(const TDesC8 &, RStringPool) |
void | CopyAddressTypeL(const TDesC8 &) |
void | CopyNetTypeL(const TDesC8 &) |
TInt
| IsValidAddress(TBool, const TDesC8 &) |
TInt
| IsValidAddress(const TInetAddr &, TInt, TUint) |
HBufC8 * | ParseAddressFieldL(TBool, const TDesC8 &, TInt &, TUint &) |
HBufC8 * | ParseIP4AddressL(TInt, TInetAddr &, const TDesC8 &, TInt &, TUint &) |
HBufC8 * | ParseIP6AddressL(TInt, TInetAddr &, const TDesC8 &, TInt &, TUint &) |
void | __DbgTestInvariant() |
Constructor & Destructor Documentation
CSdpConnectionField()
CSdpConnectionField | ( | ) | [private] |
~CSdpConnectionField()
IMPORT_C | ~CSdpConnectionField | ( | ) | |
Deletes the resources held by the instance.
Member Functions Documentation
Address()
IMPORT_C const TDesC8 & | Address | ( | ) | const |
AddressType()
Gets the address type that is from the pre-defined SDP string table or given by the user.
CloneL()
Creates a new instance that is equal to the target.
ConstructL(const TDesC8 &)
void | ConstructL | ( | const TDesC8 & | aText | ) | [private] |
Parameters
const TDesC8 & aText | A string containing a correctly formatted field value terminated by a CRLF. |
ConstructL(const TInetAddr &, TInt, TUint)
Parameters
const TInetAddr & aAddress | IP address from either KAfInet or KAfInet6 family |
TInt aTTL | Time-To-Live for IP4 multicasts |
TUint aNumOfAddress | Nubmer of addresses in multicast |
ConstructL(RStringF, RStringF, const TDesC8 &)
Parameters
RStringF aNetType | A valid network type name from the pre-defined SDP string table or defined by the user |
RStringF aAddressType | 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 |
CopyAddressL(const TDesC8 &, RStringPool)
Copies address to iAddress, and initalizes TTL & number of addresses, leaves on error
Parameters
const TDesC8 & aAddress | Address string, which can also contain TTL and number of addresses attributes |
RStringPool aPool | |
CopyAddressTypeL(const TDesC8 &)
void | CopyAddressTypeL | ( | const TDesC8 & | aAddrType | ) | [private] |
Copies given address type to iAddressType and verifies aAddrType to be valid
Parameters
const TDesC8 & aAddrType | Given address type |
CopyNetTypeL(const TDesC8 &)
void | CopyNetTypeL | ( | const TDesC8 & | aNetType | ) | [private] |
Copies given network type to iNetType and verifies aNetType to be valid
Parameters
const TDesC8 & aNetType | Given network type |
DecodeL(const TDesC8 &)
Constructs a new connection field.
Parameters
const TDesC8 & aText | A string containing a correctly formatted field value terminated by a CRLF. |
DecodeLC(const TDesC8 &)
Constructs a new connection 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. |
EncodeL(RWriteStream &)
Outputs the field formatted according to SDP syntax and including the terminating CRLF.
ExternalizeL(RWriteStream &)
Externalizes the object to stream
Parameters
RWriteStream & aStream | Stream where the object's state will be stored |
InternalizeL(RReadStream &)
Creates object from the stream data
Parameters
RReadStream & aStream | Stream where the object's state will be read |
IsValidAddress(TBool, const TDesC8 &)
TInt
| IsValidAddress | ( | TBool | aAddressTypeIP4, |
| const TDesC8 & | aAddress |
| ) | const [private] |
Checks if the address is valid against given arguments
Parameters
TBool aAddressTypeIP4 | The given type of address (EFalse = IP6) |
const TDesC8 & aAddress | Address with possibly TTL & number of addresses |
IsValidAddress(const TInetAddr &, TInt, TUint)
Checks if the address is valid against given arguments
Parameters
const TInetAddr & aAddress | Address in TInetAddr format |
TInt aTTL | TTL attribute |
TUint aNumOfAddress | Number off addresses |
NetType()
Gets the network type that is from the pre-defined SDP string table or given by the user.
NewL(const TInetAddr &, TInt, TUint)
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
const TInetAddr & aAddress | IP address from either KAfInet or KAfInet6 family |
TInt aTTL =
KErrNotFound
| Time-To-Live for IP4 multicasts, set it as KErrNotFound if IPv6 multicast or IPv4 unicast |
TUint aNumOfAddress =
KDefaultNumOfAddress
| Number of addresses in multicast, if unicast, must be 1 |
NewL(RStringF, RStringF, const TDesC8 &)
Constructs a new connection field.
Parameters
RStringF 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. |
RStringF aAddressType | |
const TDesC8 & aAddress | |
NewLC(const TInetAddr &, TInt, TUint)
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
const TInetAddr & aAddress | IP address from either KAfInet or KAfInet6 family |
TInt aTTL =
KErrNotFound
| Time-To-Live for IP4 multicasts, set it as KErrNotFound if IPv6 multicast or IPv4 unicast |
TUint aNumOfAddress =
KDefaultNumOfAddress
| Number of addresses in multicast, if unicast, must be 1 |
NewLC(RStringF, RStringF, const TDesC8 &)
Construct a new connection field and adds the pointer to the cleanup stack.
Parameters
RStringF 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 |
RStringF aAddressType | |
const TDesC8 & aAddress | |
NumOfAddress()
IMPORT_C TInt | NumOfAddress | ( | ) | const |
Gets the number of addresses (can be more than 1 for multicasts). Multicast addresses are contiguously allocated above the base address.
ParseAddressFieldL(TBool, const TDesC8 &, TInt &, TUint &)
Parameters
TBool aAddressTypeIP4 | The given type of address (EFalse = IP6) |
const TDesC8 & aAddress | Address with possibly TTL & number of addresses |
TInt & aTTL | TTL value is stored here (or KErrNotFound) |
TUint & aNumberOfAddresses | Range of addreses |
ParseIP4AddressL(TInt, TInetAddr &, const TDesC8 &, TInt &, TUint &)
Parameters
TInt aPos | Position of the (first) separation mark |
TInetAddr & aAddr | Addres in TInetAddr format |
const TDesC8 & aAddress | The whole address field |
TInt & aTTL | TTL value is stored here (or KErrNotFound) |
TUint & aNumberOfAddresses | Range of addreses |
ParseIP6AddressL(TInt, TInetAddr &, const TDesC8 &, TInt &, TUint &)
Parameters
TInt aPos | Position of the (first) separation mark |
TInetAddr & aAddr | Addres in TInetAddr format |
const TDesC8 & aAddress | The whole address field |
TInt & aTTL | TTL value is stored here (or KErrNotFound) |
TUint & aNumberOfAddresses | Range of addreses |
SetAddressL(RStringF, RStringF, const TDesC8 &)
Sets the address, network and address type.
Parameters
RStringF aNetType | A valid network type name from the pre- defined SDP string table or defined by the user |
RStringF aAddressType | 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. |
SetInetAddressL(const TInetAddr &, TInt, TUint)
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.
-
leave
- KErrSdpCodecConnectionField ifaddress to be set is wrongly formatted.
Parameters
const TInetAddr & aValue | The new address. |
TInt aTTL =
KErrNotFound
| Time-To-Live for IP4 multicasts, set it as KErrNotFound if IPv6 multicast or IPv4 unicast |
TUint aNumOfAddress =
KDefaultNumOfAddress
| Number of addresses in multicast, if unicast, must be 1. |
SetNumOfAddressL(TUint)
IMPORT_C void | SetNumOfAddressL | ( | TUint | aNumOfAddress | ) | |
Sets the number of addreses allocated for multicast.
-
leave
- KErrSdpCodecConnectionField if the address is unicast.
Parameters
TUint aNumOfAddress | Number of addresses in multicast |
SetTTLL(TInt)
IMPORT_C void | SetTTLL | ( | TInt | aTTL | ) | |
Sets TTL attribute (only valid for IP4 multicasts). Leaves if trying to set TTL to address that doesn't support it.
-
leave
- KErrSdpCodecConnectionField if aTTL is invalid.
Parameters
TInt aTTL | Time-To-Live for IP4 multicasts |
TTLValue()
IMPORT_C TInt | TTLValue | ( | ) | const |
__DbgTestInvariant()
void | __DbgTestInvariant | ( | ) | const [private] |
operator==(const CSdpConnectionField &)
Compares this instance to another for equality.
Member Data Documentation
TUint
iNumOfAddress
TUint
| iNumOfAddress | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.