os/mm/devsound/devsoundpluginsupport/src/CustomInterfaces/advancedaacencodesettingsci.h
First public contribution.
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 
     2 // All rights reserved.
 
     3 // This component and the accompanying materials are made available
 
     4 // under the terms of "Eclipse Public License v1.0"
 
     5 // which accompanies this distribution, and is available
 
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 
     8 // Initial Contributors:
 
     9 // Nokia Corporation - initial contribution.
 
    16 #ifndef ADVANCEDAACENCODESETTINGSCI_H
 
    17 #define ADVANCEDAACENCODESETTINGSCI_H
 
    20 #include <mmf/common/mmfipc.h>
 
    21 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 
    22 #include <mmf/common/mmfipcserver.h>
 
    24 #include <mmf/server/mmfdevsoundcustominterface.h>
 
    25 #include <mmf/server/mmfdevsoundcustomcommands.h>
 
    26 #include <mmf/server/devsoundstandardcustominterfaces.h>
 
    27 #include <mmf/plugin/mmfdevsoundcustominterface.hrh>
 
    34 enum TMMFDevSoundCIAdvancedAACEncodeSettignsCommands
 
    36 	EMMFDevSoundCIAdvancedAACEncodeSettings = 0,
 
    37 	EMMFDevSoundCIAdvancedAACEncodeGetSettings
 
    48  * CMMFAdvancedAACEncodeSettingsMux
 
    50  * implementation of the Play back status custom interface pair
 
    52 class CMMFAdvancedAACEncodeSettingsMux : public CBase,
 
    53 											public MMMFDevSoundCustomInterfaceMuxPlugin,
 
    54 											public MMMFAdvancedAACEncodeSettings  
 
    58 	// from MMMFDevSoundCustomInterfaceMuxPlugin
 
    60 	Attempt to open the interface.
 
    62 		   The UID of the interface to open.
 
    63 	@return One of the system wide error codes
 
    65 	virtual TInt OpenInterface(TUid aInterfaceId);
 
    68 	Equivalent to destructor.  Called to destroy plugin.
 
    70 	virtual void Release();
 
    73 	Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation()
 
    75 	       The Uid returned by REComSession::CreateImplementationL() or similar
 
    77 	virtual void PassDestructorKey(TUid aDestructorKey);
 
    80 	Complete construction.
 
    81 	Pass additional values from the construction phase, used subsequently by the plugin.
 
    83 	       The custom interface utility used by the plugin to communicate with the remote
 
    84 		   server side DeMux plugin
 
    85 	@leave This method may leave with one of the system-wide error codes.
 
    87 	virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceMuxUtility* aCustomUtility);
 
    90 	Return the custom interface
 
    92 		   The UID of the required custom interface
 
    93 	@return The custom interface supported by this plugin
 
    95 	virtual TAny* CustomInterface(TUid aInterfaceId);
 
    98 	Instantiate a CI Mux class
 
    99 	@leave This method may leave with one of the system-wide error codes.
 
   100 	@return The pointer to the new class, cast to the Mux plugin mixin
 
   102 	static MMMFDevSoundCustomInterfaceMuxPlugin* NewL();
 
   104 	// from MMMFAdvancedAACEncodeSettings
 
   106 	@see MMMFAdvancedAACEncodeSettings
 
   108 	virtual TInt SetAACEncodeBitrateMode(TAACBitrateMode aBitrateMode);
 
   110 	@see MMMFAdvancedAACEncodeSettings
 
   112 	virtual TInt GetAACEncodeBitrateMode(TAACBitrateMode& aBitrateMode);
 
   115 	CMMFAdvancedAACEncodeSettingsMux();
 
   116 	~CMMFAdvancedAACEncodeSettingsMux();
 
   121 	MMMFDevSoundCustomInterfaceMuxUtility* iUtility;
 
   131  * CMMFAdvancedAACEncodeSettingsDeMux DeMux side of pair
 
   134 class CMMFAdvancedAACEncodeSettingsDeMux : public CBase,
 
   135 											public MMMFDevSoundCustomInterfaceDeMuxPlugin
 
   139 	Instantiate a CMMFAdvancedAACEncodeSettingsDeMux class
 
   140 	@leave This method may leave with one of the system-wide error codes.
 
   141 	@return A pointer to the new class cast to the DeMux plugin mixin
 
   143 	static MMMFDevSoundCustomInterfaceDeMuxPlugin* NewL();
 
   146 	Attempt to open the interface.
 
   148 		   The UID of the interface to open.
 
   149 	@return A handle to the remote plugin
 
   151 	virtual TInt OpenInterface(TUid aInterfaceId);
 
   154 	Equivalent to destructor.  Called to destroy plugin.
 
   156 	virtual void Release();
 
   159 	Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation()
 
   160 	@param aDestructorKey
 
   161 	       The Uid returned by REComSession::CreateImplementationL() or similar
 
   163 	virtual void PassDestructorKey(TUid aDestructorKey);
 
   166 	Set the target of the custom interface call
 
   168 	       The DevSound to call the custom interface on.
 
   170 	virtual void SetInterfaceTarget(MMMFDevSoundCustomInterfaceTarget* aTarget);
 
   173 	Complete construction.
 
   175 	       The DeMux utility to use
 
   176 	@leave This method may leave with one of the system-wide error codes.
 
   178 	virtual void CompleteConstructL(MMMFDevSoundCustomInterfaceDeMuxUtility* aUtility);
 
   181 	Refresh the current custom interface connections
 
   182 	@leave This method may leave with one of the system-wide error codes.
 
   184 	virtual void RefreshL();
 
   186 	// from MMMFDevSoundCustomInterfaceDeMuxPlugin
 
   190 		   The UID of the requested interface
 
   192 		   A package of data that can be supplied for initialisation
 
   193 	@leave This method may leave with one of the system-wide error codes.
 
   194 	@return The result of the operation
 
   196 	virtual TInt DoOpenSlaveL(TUid aInterface, const TDesC8& aPackageBuf);
 
   201 		   The handle of the slave plugin
 
   202 	@leave This method may leave with one of the system-wide error codes.
 
   204 	virtual void DoCloseSlaveL(TInt aHandle);
 
   206 	// original RMessage is supplied so that remote demux plugin can extract necessary details
 
   207 	// using DeMux utility
 
   210 	Relay the synchronous custom command onto the slave
 
   212 		   The IPC message to be sent to the slave
 
   213 	@leave This method may leave with one of the system-wide error codes.
 
   214 	@return The result of the operation
 
   216 	virtual TInt DoSendSlaveSyncCommandL(const RMmfIpcMessage& aMessage);
 
   219 	Relay the synchronous custom command onto the slave and obtain a result
 
   221 		   The IPC message to be sent to the slave
 
   222 	@leave This method may leave with one of the system-wide error codes.
 
   223 	@return The result of the operation
 
   225 	virtual TInt DoSendSlaveSyncCommandResultL(const RMmfIpcMessage& aMessage);
 
   228 	Relay an asynchronous command onto the slave
 
   230 		   The IPC message to be sent to the slave
 
   231 	@leave This method may leave with one of the system-wide error codes.
 
   233 	virtual void DoSendSlaveAsyncCommandL(const RMmfIpcMessage& aMessage);
 
   236 	Relay an asynchronous command onto the slave and obtain a result
 
   238 		   The IPC message to be sent to the slave@param aMessage
 
   239 	@leave This method may leave with one of the system-wide error codes.
 
   241 	virtual void DoSendSlaveAsyncCommandResultL(const RMmfIpcMessage& aMessage);
 
   244 	~CMMFAdvancedAACEncodeSettingsDeMux();
 
   245 	CMMFAdvancedAACEncodeSettingsDeMux();
 
   247 	// mirrors MMMFAdvancedAACEncodeSettings method.
 
   248 	TInt DoSetAACEncodeBitrateMode(MMMFAdvancedAACEncodeSettings::TAACBitrateMode aBitrateMode);
 
   249 	TInt DoGetAACEncodeBitrateMode(MMMFAdvancedAACEncodeSettings::TAACBitrateMode& aBitrateMode);
 
   252 	MMMFDevSoundCustomInterfaceDeMuxUtility* iUtility;
 
   253 	MMMFDevSoundCustomInterfaceTarget* iTarget;
 
   255 	MMMFAdvancedAACEncodeSettings* iInterfaceAdvAACEncodeSettings;