CSdpOriginField Class Reference
class CSdpOriginField : public CBase
|
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
Public Member Functions
|
|
~CSdpOriginField
()
|
IMPORT_C const
TDesC8
&
|
Address
()
|
IMPORT_C
RStringF
|
AddressType
()
|
IMPORT_C
CSdpOriginField
*
|
CloneL
()
|
IMPORT_C
CSdpOriginField
*
|
DecodeL
(const
TDesC8
&)
|
IMPORT_C
CSdpOriginField
*
|
DecodeLC
(const
TDesC8
&)
|
IMPORT_C void
|
EncodeL
(
RWriteStream
&)
|
void
|
ExternalizeL
(
RWriteStream
&)
|
IMPORT_C const
TInetAddr
*
|
InetAddress
()
|
CSdpOriginField
*
|
InternalizeL
(
RReadStream
&)
|
IMPORT_C
RStringF
|
NetType
()
|
IMPORT_C
CSdpOriginField
*
|
NewL
(const
TDesC8
&,
TInt64
,
TInt64
,
TInetAddr
&)
|
IMPORT_C
CSdpOriginField
*
|
NewL
(const
TDesC8
&,
TInt64
,
TInt64
,
RStringF
,
RStringF
, const
TDesC8
&)
|
IMPORT_C
CSdpOriginField
*
|
NewLC
(const
TDesC8
&,
TInt64
,
TInt64
,
TInetAddr
&)
|
IMPORT_C
CSdpOriginField
*
|
NewLC
(const
TDesC8
&,
TInt64
,
TInt64
,
RStringF
,
RStringF
, const
TDesC8
&)
|
IMPORT_C
TInt64
|
SessionId
()
|
IMPORT_C void
|
SetAddressL
(const
TDesC8
&,
RStringF
,
RStringF
)
|
IMPORT_C void
|
SetInetAddress
(const
TInetAddr
&)
|
IMPORT_C void
|
SetSessionId
(
TInt64
)
|
IMPORT_C void
|
SetUserNameL
(const
TDesC8
&)
|
IMPORT_C void
|
SetVersion
(
TInt64
)
|
IMPORT_C const
TDesC8
&
|
UserName
()
|
IMPORT_C
TInt64
|
Version
()
|
IMPORT_C
TBool
|
operator==
(const
CSdpOriginField
&)
|
Private Member Functions
|
|
CSdpOriginField
()
|
|
CSdpOriginField
(const
CSdpOriginField
&)
|
void
|
ConstructL
(const
TDesC8
&)
|
void
|
ConstructL
(const
TDesC8
&,
TInt64
,
TInt64
,
TInetAddr
&)
|
void
|
ConstructL
(const
TDesC8
&,
TInt64
,
TInt64
,
RStringF
,
RStringF
, const
TDesC8
&)
|
TInt64
|
Get63Msbs
(const
TDesC8
&)
|
TBool
|
IsValidAddress
(const
TDesC8
&)
|
TBool
|
IsValidAddress
(const
TInetAddr
&)
|
TBool
|
IsValidUserName
(const
TDesC8
&)
|
CSdpOriginFieldPtrs
&
|
OriginFieldPtrs
()
|
const
CSdpOriginFieldPtrs
&
|
OriginFieldPtrs
()
|
void
|
ParseAddressL
(
RArray
<
TPtrC8
> &)
|
void
|
ParseNetTypeAndAddressTypeL
(
RArray
<
TPtrC8
> &)
|
void
|
ParseSessionIDAndVersionL
(
RArray
<
TPtrC8
> &)
|
void
|
ParseUserNameL
(
RArray
<
TPtrC8
> &)
|
void
|
SetIPAddressType
(const
TInetAddr
&)
|
TBool
|
TypeMatchesWithFormat
(const
TDesC8
&, const
TDesC8
&,
RStringPool
)
|
void
|
__DbgTestInvariant
()
|
CSdpOriginField
&
|
operator=
(const
CSdpOriginField
&)
|
Constructor & Destructor Documentation
CSdpOriginField()
CSdpOriginField
|
(
|
)
|
[private]
|
CSdpOriginField(const CSdpOriginField &)
~CSdpOriginField()
IMPORT_C
|
~CSdpOriginField
|
(
|
)
|
|
Deletes the resources held by the instance.
Member Functions Documentation
Address()
IMPORT_C const
TDesC8
&
|
Address
|
(
|
)
|
const
|
CloneL()
Creates a new instance that is equal to the target.
ConstructL(const TDesC8 &)
void
|
ConstructL
|
(
|
const
TDesC8
&
|
aText
|
)
|
[private]
|
Second phase constructor. Parses the text string and initializes the member variables
Parameters
const
TDesC8
& aText
|
Line of text that will be parsed (ends on the newline)
|
ConstructL(const TDesC8 &, TInt64, TInt64, TInetAddr &)
void
|
ConstructL
|
(
|
const
TDesC8
&
|
aUserName,
|
|
TInt64
|
aSessionId,
|
|
TInt64
|
aSessionVersion,
|
|
TInetAddr
&
|
aUnicastAddress
|
|
)
|
[private]
|
Second phase constructor. Constructs the object.
Parameters
const
TDesC8
& aUserName
|
A valid user name value.
|
TInt64
aSessionId
|
A valid session id value.
|
TInt64
aSessionVersion
|
A valid announcement version value.
|
TInetAddr
& aUnicastAddress
|
|
ConstructL(const TDesC8 &, TInt64, TInt64, RStringF, RStringF, const TDesC8 &)
Second phase constructor. Constructs the object.
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.
|
DecodeL(const TDesC8 &)
Constructs a new origin field.
Parameters
const
TDesC8
& aText
|
A string containing a correctly formatted field value terminated by a CRLF.
|
DecodeLC(const TDesC8 &)
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.
|
EncodeL(RWriteStream &)
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.
|
ExternalizeL(RWriteStream &)
Externalizes the object to stream
Parameters
RWriteStream
& aStream
|
Stream where the object's state will be stored
|
Get63Msbs(const TDesC8 &)
TInt64
|
Get63Msbs
|
(
|
const
TDesC8
&
|
aDecimalValue
|
)
|
const [private]
|
InetAddress()
IMPORT_C const
TInetAddr
*
|
InetAddress
|
(
|
)
|
const
|
InternalizeL(RReadStream &)
Creates object from the stream data
Parameters
RReadStream
& aStream
|
Stream where the object's state will be read
|
IsValidAddress(const TDesC8 &)
TBool
|
IsValidAddress
|
(
|
const
TDesC8
&
|
aAddress
|
)
|
const [private]
|
Checks if the given address is valid
Parameters
const
TDesC8
& aAddress
|
Address to be checked
|
IsValidAddress(const TInetAddr &)
TBool
|
IsValidAddress
|
(
|
const
TInetAddr
&
|
addr
|
)
|
const [private]
|
Checks if the given address is valid
IsValidUserName(const TDesC8 &)
TBool
|
IsValidUserName
|
(
|
const
TDesC8
&
|
aUserName
|
)
|
const [private]
|
Checks if the given username is valid
Parameters
const
TDesC8
& aUserName
|
Username
|
NewL(const TDesC8 &, TInt64, TInt64, TInetAddr &)
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.
|
NewL(const TDesC8 &, TInt64, TInt64, RStringF, RStringF, const TDesC8 &)
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.
|
NewLC(const TDesC8 &, TInt64, TInt64, TInetAddr &)
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.
|
NewLC(const TDesC8 &, TInt64, TInt64, RStringF, RStringF, const TDesC8 &)
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.
|
ParseAddressL(RArray< TPtrC8 > &)
Parses address, checks address against address type, initializes iAddress
Parameters
RArray
<
TPtrC8
> & aArray
|
Array containing all the elements
|
ParseNetTypeAndAddressTypeL(RArray< TPtrC8 > &)
void
|
ParseNetTypeAndAddressTypeL
|
(
|
RArray
<
TPtrC8
> &
|
aArray
|
)
|
[private]
|
Parses network type and address type, initializes iNetType and iAddressType
Parameters
RArray
<
TPtrC8
> & aArray
|
Array containing all the elements
|
ParseSessionIDAndVersionL(RArray< TPtrC8 > &)
void
|
ParseSessionIDAndVersionL
|
(
|
RArray
<
TPtrC8
> &
|
aArray
|
)
|
[private]
|
Parses session ID and version, initializes iSessionId and iSessionVersion
Parameters
RArray
<
TPtrC8
> & aArray
|
Array containing all the elements
|
ParseUserNameL(RArray< TPtrC8 > &)
void
|
ParseUserNameL
|
(
|
RArray
<
TPtrC8
> &
|
aArray
|
)
|
[private]
|
Parses username, initializes iUserName
Parameters
RArray
<
TPtrC8
> & aArray
|
Array containing all the elements
|
SessionId()
IMPORT_C
TInt64
|
SessionId
|
(
|
)
|
const
|
Gets the session id of the origin field.
SetAddressL(const TDesC8 &, RStringF, RStringF)
Sets the address, network and address type.
-
leave
-
KErrSdpCodecOriginField if aNetType or aAddressType are not valid tokens, or aAddress is invalid, or aAddress type is not aligned with the address format
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").
|
SetIPAddressType(const TInetAddr &)
void
|
SetIPAddressType
|
(
|
const
TInetAddr
&
|
aAddr
|
)
|
[private]
|
SetInetAddress(const TInetAddr &)
IMPORT_C void
|
SetInetAddress
|
(
|
const
TInetAddr
&
|
aValue
|
)
|
|
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.
|
SetSessionId(TInt64)
IMPORT_C void
|
SetSessionId
|
(
|
TInt64
|
aValue
|
)
|
|
Parameters
TInt64
aValue
|
A valid session id value.
|
SetUserNameL(const TDesC8 &)
IMPORT_C void
|
SetUserNameL
|
(
|
const
TDesC8
&
|
aValue
|
)
|
|
Sets the user name.
-
leave
-
KErrSdpCodecOriginField if aValue is not a valid user name.
Parameters
const
TDesC8
& aValue
|
A valid user name value.
|
SetVersion(TInt64)
IMPORT_C void
|
SetVersion
|
(
|
TInt64
|
aValue
|
)
|
|
Sets the announcement version..
Parameters
TInt64
aValue
|
A valid version value.
|
TypeMatchesWithFormat(const TDesC8 &, const TDesC8 &, RStringPool)
Checks that address type matches with address format
UserName()
IMPORT_C const
TDesC8
&
|
UserName
|
(
|
)
|
const
|
Version()
IMPORT_C
TInt64
|
Version
|
(
|
)
|
const
|
Gets the announcement version.
__DbgTestInvariant()
void
|
__DbgTestInvariant
|
(
|
)
|
const [private]
|
operator=(const CSdpOriginField &)
operator==(const CSdpOriginField &)
Compares this instance to another for equality.
Member Data Documentation
TBuf8< KMaxAddressLength > iAddress
TBuf< KMaxAddressLength > iAddress16
TInt64
iSessionVersion
TInt64
|
iSessionVersion
|
[private]
|
TInetAddr
iUnicastAddress
TInetAddr
|
iUnicastAddress
|
[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.