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
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 () |
Private Attributes | |
---|---|
HBufC8 * | iAddress |
RStringF | iAddressType |
TInetAddr | iInetAddress |
RStringF | iNetType |
TUint | iNumOfAddress |
RStringPool | iPool |
TInt | iTTL |
IMPORT_C | ~CSdpConnectionField | ( | ) |
Deletes the resources held by the instance.
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 CSdpConnectionField * | CloneL | ( | ) | const |
Creates a new instance that is equal to the target.
void | ConstructL | ( | const TDesC8 & | aText | ) | [private] |
2nd phase constructor
const TDesC8 & aText | A string containing a correctly formatted field value terminated by a CRLF. |
void | ConstructL | ( | const TInetAddr & | aAddress, |
TInt | aTTL, | |||
TUint | aNumOfAddress | |||
) | [private] |
2nd phase constructor
void | ConstructL | ( | RStringF | aNetType, |
RStringF | aAddressType, | |||
const TDesC8 & | aAddress | |||
) | [private] |
2nd phase constructor
void | CopyAddressL | ( | const TDesC8 & | aAddress, |
RStringPool | aPool | |||
) | [private] |
Copies address to iAddress, and initalizes TTL & number of addresses, leaves on error
const TDesC8 & aAddress | Address string, which can also contain TTL and number of addresses attributes |
RStringPool aPool |
void | CopyAddressTypeL | ( | const TDesC8 & | aAddrType | ) | [private] |
Copies given address type to iAddressType and verifies aAddrType to be valid
const TDesC8 & aAddrType | Given address type |
void | CopyNetTypeL | ( | const TDesC8 & | aNetType | ) | [private] |
Copies given network type to iNetType and verifies aNetType to be valid
const TDesC8 & aNetType | Given network type |
IMPORT_C CSdpConnectionField * | DecodeL | ( | const TDesC8 & | aText | ) | [static] |
Constructs a new connection field.
const TDesC8 & aText | A string containing a correctly formatted field value terminated by a CRLF. |
IMPORT_C CSdpConnectionField * | DecodeLC | ( | const TDesC8 & | aText | ) | [static] |
Constructs a new connection field and adds the pointer to the cleanup stack.
const TDesC8 & aText | A string containing a correctly formatted field value terminated by a CRLF. |
IMPORT_C void | EncodeL | ( | RWriteStream & | aStream | ) | const |
Outputs the field formatted according to SDP syntax and including the terminating CRLF.
RWriteStream & aStream |
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalizes the object to stream
RWriteStream & aStream | Stream where the object's state will be stored |
CSdpConnectionField * | InternalizeL | ( | RReadStream & | aStream | ) | [static] |
Creates object from the stream data
RReadStream & aStream | Stream where the object's state will be read |
TInt | IsValidAddress | ( | TBool | aAddressTypeIP4, |
const TDesC8 & | aAddress | |||
) | const [private] |
Checks if the address is valid against given arguments
TInt | IsValidAddress | ( | const TInetAddr & | aAddress, |
TInt | aTTL, | |||
TUint | aNumOfAddress | |||
) | const [private] |
Checks if the address is valid against given arguments
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 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.
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 |
IMPORT_C CSdpConnectionField * | NewL | ( | RStringF | aNetType, |
RStringF | aAddressType, | |||
const TDesC8 & | aAddress | |||
) | [static] |
Constructs a new connection field.
IMPORT_C 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.
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 |
IMPORT_C CSdpConnectionField * | NewLC | ( | RStringF | aNetType, |
RStringF | aAddressType, | |||
const TDesC8 & | aAddress | |||
) | [static] |
Construct a new connection field and adds the pointer to the cleanup stack.
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.
HBufC8 * | ParseAddressFieldL | ( | TBool | aAddressTypeIP4, |
const TDesC8 & | aAddress, | |||
TInt & | aTTL, | |||
TUint & | aNumberOfAddresses | |||
) | const [private] |
Parses address field
HBufC8 * | ParseIP4AddressL | ( | TInt | aPos, |
TInetAddr & | aAddr, | |||
const TDesC8 & | aAddress, | |||
TInt & | aTTL, | |||
TUint & | aNumberOfAddresses | |||
) | const [private] |
Parses IP4 address
HBufC8 * | ParseIP6AddressL | ( | TInt | aPos, |
TInetAddr & | aAddr, | |||
const TDesC8 & | aAddress, | |||
TInt & | aTTL, | |||
TUint & | aNumberOfAddresses | |||
) | const [private] |
Parses IP6 address
IMPORT_C void | SetAddressL | ( | RStringF | aNetType, |
RStringF | aAddressType, | |||
const TDesC8 & | aAddress | |||
) |
Sets the address, network and address type.
IMPORT_C void | 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.
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. |
IMPORT_C void | SetNumOfAddressL | ( | TUint | aNumOfAddress | ) |
Sets the number of addreses allocated for multicast.
TUint aNumOfAddress | Number of addresses in multicast |
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.
TInt aTTL | Time-To-Live for IP4 multicasts |
IMPORT_C TBool | operator== | ( | const CSdpConnectionField & | aObj | ) | const |
Compares this instance to another for equality.
const CSdpConnectionField & aObj |
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.