diff -r fb024d5e35fa -r 64c62431ac08 multimediacommsengine/mmceshared/inc/mcecommsrpcodec.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multimediacommsengine/mmceshared/inc/mcecommsrpcodec.h Mon Sep 06 17:32:13 2010 +0530 @@ -0,0 +1,144 @@ +/* +* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + + +#ifndef CMCECOMMSRPCODEC_H +#define CMCECOMMSRPCODEC_H + +// INCLUDES +#include "mcecommessagecodec.h" +#include "mcedefs.h" + + + +// CLASS DECLARATION +/** +* Container class for the codec information. +* +* @lib +*/ +class CMceComMsrpCodec : public CMceComMessageCodec + { +public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aSdpName sdp name + */ + static CMceComMsrpCodec* NewL( TBuf8 aSdpName ); + + /** + * Two-phased constructor. + * @param aSdpName sdp name + */ + static CMceComMsrpCodec* NewLC( TBuf8 aSdpName ); + + /** + * Destructor. + */ + ~CMceComMsrpCodec(); + +public: // from CMceComCodec + + /** + * Sets bitrate used with codec for encoding. + * @param aBitrate bitrate value for encoding + * @return KErrNotSupported if codec doesn't support bitrate + * value issued + */ + TInt SetBitrate( TUint aBitrate ); + + /** + * Sets bitrates allowed with codec. + * @param aBitrates allowed bitrate values + * @return KErrNotSupported if codec doesn't support bitrate + * values issued + */ + TInt SetAllowedBitrates( TUint aBitrates ); + + /** + * Returns max bit rate + * @return max bit rate + */ + TUint GetMaxBitRate(); + + /** + * Resolve allowed bitrates based on given bitrate value. + * @param aBitrate + * @param aAllowedBitrates, on return contains allowed bitrates + * @return error code + */ + TInt ResolveAllowedBitrates( TUint aBitrate, TUint& aAllowedBitrates ); + +#ifdef MCE_COMMON_SERVER_SIDE + + /** + * Validates codec values based on mcc codec + * @param aMccCodec mcc codec + * @param aStream stream + * @param aRole role + */ + CMceComCodec* DoMccValidateL( CMccCodecInformation& aMccCodec, + CMceSrvStream& aStream, + TMceNegotiationRole aRole ); + +protected: // from CMceComCodec + + /** + * Set default fmtp line + */ + void DoSetDefaultFmtpAttributeL(); + +#endif + +public: // serialization etc + + /** + * Clones + */ + CMceComMessageCodec* CloneL(); + +private: + + /** + * C++ default constructor. + */ + CMceComMsrpCodec(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL( TBuf8 aSdpName); + + /** + * second-phase copy constructor + */ + void ConstructL( CMceComMsrpCodec& aCodec ); + + + #ifdef EUNIT_TEST + friend class UT_CMceComMsrpCodec; + #endif + + }; + + +#endif + +// End of File