epoc32/include/sdprtpmapvalue.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/sdprtpmapvalue.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/sdprtpmapvalue.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,117 @@
     1.4 -sdprtpmapvalue.h
     1.5 +/*
     1.6 +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:
    1.19 +* Name          : SdpRtpmapValue.h
    1.20 +* Part of       : SDP Codec
    1.21 +* Interface     : SDK API, SDP Codec API
    1.22 +* Version       : 1.0
    1.23 +*
    1.24 +*/
    1.25 +
    1.26 +
    1.27 +
    1.28 +#ifndef TSDPRTPMAPVALUE_H
    1.29 +#define TSDPRTPMAPVALUE_H
    1.30 +
    1.31 +// INCLUDES
    1.32 +#include <e32std.h>
    1.33 +#include <stringpool.h>
    1.34 +#include "_sdpdefs.h"
    1.35 +
    1.36 +// FORWARD DECLARATIONS
    1.37 +class RWriteStream;
    1.38 +
    1.39 +// CLASS DECLARATION
    1.40 +/**
    1.41 + *  @publishedAll
    1.42 + *  @released
    1.43 + *
    1.44 + *	Utility class for manipulating the value of an rtpmap-attribute.
    1.45 + *
    1.46 + *	The normative reference for correct formatting and values is
    1.47 + *	draft-ietf-mmusic-sdp-new-14 unless specified otherwise in
    1.48 + *  member documentation. The implementation supports this normative
    1.49 + *  reference, but does not enforce it fully. 
    1.50 + *
    1.51 + *  @lib sdpcodec.lib
    1.52 + */
    1.53 +class TSdpRtpmapValue
    1.54 +	{
    1.55 +    public: // Constructors and destructor
    1.56 +
    1.57 +		/**
    1.58 +		 *	Initializes the instance to refer to the given rtpmap components.
    1.59 +		 *	The parameters must stay in scope as long as this instance exists.
    1.60 +		 *	Otherwise, the member variables of this class will point to
    1.61 +		 *	a released memory.
    1.62 +		 *  
    1.63 +		 *	@param aEncodingName Valid rtpmap encoding name value.	
    1.64 +		 *	@param aClockrate Valid rtpmap clockrate value.	
    1.65 +		 *	@param aEncodingParameters Valid rtpmap encoding 
    1.66 +         *         parameter list.	
    1.67 +		 */
    1.68 +		IMPORT_C TSdpRtpmapValue( 
    1.69 +						const TPtrC8& aEncodingName,
    1.70 +						const TPtrC8& aClockrate,
    1.71 +						const TPtrC8& aEncodingParameters );
    1.72 +
    1.73 +    public: // New functions
    1.74 +
    1.75 +		/**
    1.76 +		 *	Tries to parse a string as an rtpmap attribute value up to the end 
    1.77 +		 *	of the string or CRLF, whichever comes first, and set pointers to 
    1.78 +		 *	the components found. The parameter must stay in scope as long as 
    1.79 +         *  this instance exists. Otherwise, the member variables of this class 
    1.80 +         *  will point to a released memory.
    1.81 +		 *         
    1.82 +		 *	@param aText String containing the value of an rtpmap attribute.
    1.83 +         *  @return a new instance 
    1.84 +		 *	@leave  KErrArgument if parsing fails.
    1.85 +		 */
    1.86 +		IMPORT_C static TSdpRtpmapValue DecodeL( const TDesC8& aText );
    1.87 +
    1.88 +		/**
    1.89 +		 *	Outputs the attribute value formatted according to SDP syntax.
    1.90 +		 *  The field terminating CRLF is not included in the output.
    1.91 +         *  When constructing CSdpFmtAttributeField, return value of this 
    1.92 +         *  function can be used as aValue in CSdpFmtAttributeField::NewL
    1.93 +         *  (RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue)
    1.94 +         *  function.
    1.95 +		 * 
    1.96 +         *  @return Encoded value. Ovnership of buffer is changed to caller.
    1.97 +		 */
    1.98 +		IMPORT_C HBufC8* EncodeL() const;        
    1.99 +
   1.100 +    public: // Data
   1.101 +
   1.102 +		/** 
   1.103 +		* Encoding name part of an rtpmap value 
   1.104 +		* @internalComponent
   1.105 +		*/
   1.106 +		TPtrC8 iEncName;
   1.107 +
   1.108 +		/** 
   1.109 +		* Clockrate part of an rtpmap value. 
   1.110 +		* @internalComponent
   1.111 +		*/
   1.112 +		TPtrC8 iClockrate;
   1.113 +
   1.114 +		/** 
   1.115 +		* Encoding parameters part of an rtpmap value. 
   1.116 +		* @internalComponent
   1.117 +		*/
   1.118 +		TPtrC8 iEncParams;
   1.119 +	};
   1.120 +
   1.121 +#endif // TSDPRTPMAPVALUE_H