2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : SdpRtpmapValue.h
17 * Interface : SDK API, SDP Codec API
24 #ifndef TSDPRTPMAPVALUE_H
25 #define TSDPRTPMAPVALUE_H
29 #include <stringpool.h>
32 // FORWARD DECLARATIONS
40 * Utility class for manipulating the value of an rtpmap-attribute.
42 * The normative reference for correct formatting and values is
43 * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in
44 * member documentation. The implementation supports this normative
45 * reference, but does not enforce it fully.
51 public: // Constructors and destructor
54 * Initializes the instance to refer to the given rtpmap components.
55 * The parameters must stay in scope as long as this instance exists.
56 * Otherwise, the member variables of this class will point to
59 * @param aEncodingName Valid rtpmap encoding name value.
60 * @param aClockrate Valid rtpmap clockrate value.
61 * @param aEncodingParameters Valid rtpmap encoding
64 IMPORT_C TSdpRtpmapValue(
65 const TPtrC8& aEncodingName,
66 const TPtrC8& aClockrate,
67 const TPtrC8& aEncodingParameters );
69 public: // New functions
72 * Tries to parse a string as an rtpmap attribute value up to the end
73 * of the string or CRLF, whichever comes first, and set pointers to
74 * the components found. The parameter must stay in scope as long as
75 * this instance exists. Otherwise, the member variables of this class
76 * will point to a released memory.
78 * @param aText String containing the value of an rtpmap attribute.
79 * @return a new instance
80 * @leave KErrArgument if parsing fails.
82 IMPORT_C static TSdpRtpmapValue DecodeL( const TDesC8& aText );
85 * Outputs the attribute value formatted according to SDP syntax.
86 * The field terminating CRLF is not included in the output.
87 * When constructing CSdpFmtAttributeField, return value of this
88 * function can be used as aValue in CSdpFmtAttributeField::NewL
89 * (RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue)
92 * @return Encoded value. Ovnership of buffer is changed to caller.
94 IMPORT_C HBufC8* EncodeL() const;
99 * Encoding name part of an rtpmap value
105 * Clockrate part of an rtpmap value.
111 * Encoding parameters part of an rtpmap value.
117 #endif // TSDPRTPMAPVALUE_H