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 "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.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>
31 // FORWARD DECLARATIONS
39 * Utility class for manipulating the value of an rtpmap-attribute.
41 * The normative reference for correct formatting and values is
42 * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in
43 * member documentation. The implementation supports this normative
44 * reference, but does not enforce it fully.
50 public: // Constructors and destructor
53 * Initializes the instance to refer to the given rtpmap components.
54 * The parameters must stay in scope as long as this instance exists.
55 * Otherwise, the member variables of this class will point to
58 * @param aEncodingName Valid rtpmap encoding name value.
59 * @param aClockrate Valid rtpmap clockrate value.
60 * @param aEncodingParameters Valid rtpmap encoding
63 IMPORT_C TSdpRtpmapValue(
64 const TPtrC8& aEncodingName,
65 const TPtrC8& aClockrate,
66 const TPtrC8& aEncodingParameters );
68 public: // New functions
71 * Tries to parse a string as an rtpmap attribute value up to the end
72 * of the string or CRLF, whichever comes first, and set pointers to
73 * the components found. The parameter must stay in scope as long as
74 * this instance exists. Otherwise, the member variables of this class
75 * will point to a released memory.
77 * @param aText String containing the value of an rtpmap attribute.
78 * @return a new instance
79 * @leave KErrArgument if parsing fails.
81 IMPORT_C static TSdpRtpmapValue DecodeL( const TDesC8& aText );
84 * Outputs the attribute value formatted according to SDP syntax.
85 * The field terminating CRLF is not included in the output.
86 * When constructing CSdpFmtAttributeField, return value of this
87 * function can be used as aValue in CSdpFmtAttributeField::NewL
88 * (RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue)
91 * @return Encoded value. Ovnership of buffer is changed to caller.
93 IMPORT_C HBufC8* EncodeL() const;
98 * Encoding name part of an rtpmap value
104 * Clockrate part of an rtpmap value.
110 * Encoding parameters part of an rtpmap value.
116 #endif // TSDPRTPMAPVALUE_H