williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
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
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description:
|
williamr@2
|
15 |
* Name : SdpRtpmapValue.h
|
williamr@2
|
16 |
* Part of : SDP Codec
|
williamr@2
|
17 |
* Interface : SDK API, SDP Codec API
|
williamr@2
|
18 |
* Version : 1.0
|
williamr@2
|
19 |
*
|
williamr@2
|
20 |
*/
|
williamr@2
|
21 |
|
williamr@2
|
22 |
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#ifndef TSDPRTPMAPVALUE_H
|
williamr@2
|
25 |
#define TSDPRTPMAPVALUE_H
|
williamr@2
|
26 |
|
williamr@2
|
27 |
// INCLUDES
|
williamr@2
|
28 |
#include <e32std.h>
|
williamr@2
|
29 |
#include <stringpool.h>
|
williamr@2
|
30 |
#include "_sdpdefs.h"
|
williamr@2
|
31 |
|
williamr@2
|
32 |
// FORWARD DECLARATIONS
|
williamr@2
|
33 |
class RWriteStream;
|
williamr@2
|
34 |
|
williamr@2
|
35 |
// CLASS DECLARATION
|
williamr@2
|
36 |
/**
|
williamr@2
|
37 |
* @publishedAll
|
williamr@2
|
38 |
* @released
|
williamr@2
|
39 |
*
|
williamr@2
|
40 |
* Utility class for manipulating the value of an rtpmap-attribute.
|
williamr@2
|
41 |
*
|
williamr@2
|
42 |
* The normative reference for correct formatting and values is
|
williamr@2
|
43 |
* draft-ietf-mmusic-sdp-new-14 unless specified otherwise in
|
williamr@2
|
44 |
* member documentation. The implementation supports this normative
|
williamr@2
|
45 |
* reference, but does not enforce it fully.
|
williamr@2
|
46 |
*
|
williamr@2
|
47 |
* @lib sdpcodec.lib
|
williamr@2
|
48 |
*/
|
williamr@2
|
49 |
class TSdpRtpmapValue
|
williamr@2
|
50 |
{
|
williamr@2
|
51 |
public: // Constructors and destructor
|
williamr@2
|
52 |
|
williamr@2
|
53 |
/**
|
williamr@2
|
54 |
* Initializes the instance to refer to the given rtpmap components.
|
williamr@2
|
55 |
* The parameters must stay in scope as long as this instance exists.
|
williamr@2
|
56 |
* Otherwise, the member variables of this class will point to
|
williamr@2
|
57 |
* a released memory.
|
williamr@2
|
58 |
*
|
williamr@2
|
59 |
* @param aEncodingName Valid rtpmap encoding name value.
|
williamr@2
|
60 |
* @param aClockrate Valid rtpmap clockrate value.
|
williamr@2
|
61 |
* @param aEncodingParameters Valid rtpmap encoding
|
williamr@2
|
62 |
* parameter list.
|
williamr@2
|
63 |
*/
|
williamr@2
|
64 |
IMPORT_C TSdpRtpmapValue(
|
williamr@2
|
65 |
const TPtrC8& aEncodingName,
|
williamr@2
|
66 |
const TPtrC8& aClockrate,
|
williamr@2
|
67 |
const TPtrC8& aEncodingParameters );
|
williamr@2
|
68 |
|
williamr@2
|
69 |
public: // New functions
|
williamr@2
|
70 |
|
williamr@2
|
71 |
/**
|
williamr@2
|
72 |
* Tries to parse a string as an rtpmap attribute value up to the end
|
williamr@2
|
73 |
* of the string or CRLF, whichever comes first, and set pointers to
|
williamr@2
|
74 |
* the components found. The parameter must stay in scope as long as
|
williamr@2
|
75 |
* this instance exists. Otherwise, the member variables of this class
|
williamr@2
|
76 |
* will point to a released memory.
|
williamr@2
|
77 |
*
|
williamr@2
|
78 |
* @param aText String containing the value of an rtpmap attribute.
|
williamr@2
|
79 |
* @return a new instance
|
williamr@2
|
80 |
* @leave KErrArgument if parsing fails.
|
williamr@2
|
81 |
*/
|
williamr@2
|
82 |
IMPORT_C static TSdpRtpmapValue DecodeL( const TDesC8& aText );
|
williamr@2
|
83 |
|
williamr@2
|
84 |
/**
|
williamr@2
|
85 |
* Outputs the attribute value formatted according to SDP syntax.
|
williamr@2
|
86 |
* The field terminating CRLF is not included in the output.
|
williamr@2
|
87 |
* When constructing CSdpFmtAttributeField, return value of this
|
williamr@2
|
88 |
* function can be used as aValue in CSdpFmtAttributeField::NewL
|
williamr@2
|
89 |
* (RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue)
|
williamr@2
|
90 |
* function.
|
williamr@2
|
91 |
*
|
williamr@2
|
92 |
* @return Encoded value. Ovnership of buffer is changed to caller.
|
williamr@2
|
93 |
*/
|
williamr@2
|
94 |
IMPORT_C HBufC8* EncodeL() const;
|
williamr@2
|
95 |
|
williamr@2
|
96 |
public: // Data
|
williamr@2
|
97 |
|
williamr@2
|
98 |
/**
|
williamr@2
|
99 |
* Encoding name part of an rtpmap value
|
williamr@2
|
100 |
* @internalComponent
|
williamr@2
|
101 |
*/
|
williamr@2
|
102 |
TPtrC8 iEncName;
|
williamr@2
|
103 |
|
williamr@2
|
104 |
/**
|
williamr@2
|
105 |
* Clockrate part of an rtpmap value.
|
williamr@2
|
106 |
* @internalComponent
|
williamr@2
|
107 |
*/
|
williamr@2
|
108 |
TPtrC8 iClockrate;
|
williamr@2
|
109 |
|
williamr@2
|
110 |
/**
|
williamr@2
|
111 |
* Encoding parameters part of an rtpmap value.
|
williamr@2
|
112 |
* @internalComponent
|
williamr@2
|
113 |
*/
|
williamr@2
|
114 |
TPtrC8 iEncParams;
|
williamr@2
|
115 |
};
|
williamr@2
|
116 |
|
williamr@2
|
117 |
#endif // TSDPRTPMAPVALUE_H
|