sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __MMFSTANDARDCUSTOMCOMMANDS_H sl@0: #define __MMFSTANDARDCUSTOMCOMMANDS_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: class CMMFVideoFrameMessage; sl@0: class CFbsBitmap; sl@0: class CDesC8Array; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TInt KPlaybackRateNormal = 1; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Balance value for centre sl@0: */ sl@0: const TInt KMMFBalanceCenter = 0; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Balance value for max left sl@0: */ sl@0: const TInt KMMFBalanceMaxLeft = -100; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Balance value for max right sl@0: */ sl@0: const TInt KMMFBalanceMaxRight = 100; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TInt KMMFVideoCurrentFrame = -1; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: enum TMMFDSAEvent sl@0: { sl@0: EAbortDSA, sl@0: EResumeDSA sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Interface UID and messages for the Audio Resource Notification API. sl@0: */ sl@0: const TUid KMMFEventCategoryAudioResourceAvailable = {0x101FD9F2}; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Interface UID and messages for the Audio Play Device API. sl@0: */ sl@0: const TUid KUidInterfaceMMFAudioPlayDevice = {0x101F76D6}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Interface UID and messages for the Audio Record Device API. sl@0: */ sl@0: const TUid KUidInterfaceMMFAudioRecordDevice = {0x101F76D7}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Interface UID and messages for the Audio Play Controller API. sl@0: */ sl@0: const TUid KUidInterfaceMMFAudioPlayController = {0x101F76D8}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Interface UID and messages for the Audio Record Controller API. sl@0: */ sl@0: const TUid KUidInterfaceMMFAudioRecordController = {0x101F76D9}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Interface UID and messages for the Audio Controller API. sl@0: */ sl@0: const TUid KUidInterfaceMMFAudioController = {0x101F76DA}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoController = {0x101F76DB}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoPlayController = {0x101F7B73}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoRecordController = {0x101F7B74}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoDRMExt = {0x101F7C23}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Interface UID for the custom command that supports setting the initial screen for video on the controller. sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoSetInitScreen = {0x102825F7}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoPixelAspectRatio = {0x102831EF}; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoAudioSamplingRateAndChannelConfig = {0x102831F0}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access Audio Play Device functionality. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: @since 7.0s sl@0: */ sl@0: class RMMFAudioPlayDeviceCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFAudioPlayDeviceCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets the volume of the sound device. sl@0: sl@0: @param aVolume sl@0: The new volume. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetVolume(TInt aVolume) const; sl@0: sl@0: /** sl@0: Gets the maximum volume supported by the sound device. sl@0: sl@0: @param aMaxVolume sl@0: The maximum volume, filled in by the controller. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetMaxVolume(TInt& aMaxVolume) const; sl@0: sl@0: /** sl@0: Gets the current playback volume. sl@0: sl@0: @param aVolume sl@0: On return contains the current playback volume. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetVolume(TInt& aVolume) const; sl@0: sl@0: /** sl@0: Sets a volume ramp. sl@0: sl@0: This will cause the sound device to start playing with zero volume, sl@0: increasing the volume over aRampDuration microseconds. sl@0: sl@0: The volume ramp can be removed by setting the ramp duration to zero. sl@0: sl@0: @param aRampDuration sl@0: The duration over which the volume is to be increased, in microseconds. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) const; sl@0: sl@0: /** sl@0: Sets the balance between the left and right stereo audio channels. sl@0: sl@0: @param aBalance sl@0: Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be sl@0: restored by using KMMFBalanceCenter. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetBalance(TInt aBalance) const; sl@0: sl@0: /** sl@0: Gets the balance between the left and right stereo audio channels. sl@0: sl@0: @param aBalance sl@0: The current balance, filled in by the controller. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetBalance(TInt& aBalance) const; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the audio play device sl@0: custom commands. sl@0: */ sl@0: class MMMFAudioPlayDeviceCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets the volume of the sound device. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aVolume sl@0: The new volume. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapdSetVolumeL(TInt aVolume) = 0; sl@0: sl@0: /** sl@0: Gets the maximum volume supported by the sound device. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aMaxVolume sl@0: The maximum volume, to be filled in by the controller plugin. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapdGetMaxVolumeL(TInt& aMaxVolume) = 0; sl@0: sl@0: /** sl@0: Gets the current playback volume. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aVolume sl@0: The volume, to be filled in by the controller. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapdGetVolumeL(TInt& aVolume) = 0; sl@0: sl@0: /** sl@0: Sets a volume ramp. sl@0: sl@0: This will cause the sound device to start playing with zero volume, sl@0: increasing the volume over aRampDuration microseconds. sl@0: sl@0: The volume ramp can be removed by setting the ramp duration to zero. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aRampDuration sl@0: The duration over which the volume is to be increased, in microseconds. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapdSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0; sl@0: sl@0: /** sl@0: Sets the balance between the left and right stereo audio channels. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aBalance sl@0: Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be sl@0: restored by using KMMFBalanceCenter. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapdSetBalanceL(TInt aBalance) = 0; sl@0: sl@0: /** sl@0: Gets the balance between the left and right stereo audio channels. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aBalance sl@0: The current balance, filled in by the controller. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapdGetBalanceL(TInt& aBalance) = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support sl@0: audio play device commands. sl@0: sl@0: The controller plugin must be derived from MMMFAudioPlayDeviceCustomCommandImplementor sl@0: to use this class. sl@0: sl@0: The controller plugin should create an object of this type and add it to the list of custom sl@0: command parsers in the controller framework. See the following example code for details. sl@0: sl@0: @code sl@0: void CMMFAudioController::ConstructL() sl@0: { sl@0: // Construct custom command parsers sl@0: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audPlayDevParser); sl@0: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audPlayDevParser sl@0: sl@0: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audRecDevParser); sl@0: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audRecDevParser sl@0: sl@0: etc. sl@0: } sl@0: @endcode sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class CMMFAudioPlayDeviceCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling audio play device commands. sl@0: sl@0: This function may leave with one of the system-wide error codes. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFAudioPlayDeviceCustomCommandParser* NewL(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFAudioPlayDeviceCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFAudioPlayDeviceCustomCommandParser(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetVolumeL(TMMFMessage& aMessage); sl@0: TBool DoGetMaxVolumeL(TMMFMessage& aMessage); sl@0: TBool DoGetVolumeL(TMMFMessage& aMessage); sl@0: TBool DoSetVolumeRampL(TMMFMessage& aMessage); sl@0: TBool DoSetBalanceL(TMMFMessage& aMessage); sl@0: TBool DoGetBalanceL(TMMFMessage& aMessage); sl@0: private: sl@0: /** The object that implements the audio play device interface */ sl@0: MMMFAudioPlayDeviceCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access Audio Record Device functionality. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFAudioRecordDeviceCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFAudioRecordDeviceCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets the gain of the sound device. sl@0: sl@0: @param aGain sl@0: The new gain. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetGain(TInt aGain) const; sl@0: sl@0: /** sl@0: Gets the maximum gain supported by the sound device. sl@0: sl@0: @param aMaxGain sl@0: The maximum gain, filled in by the controller. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetMaxGain(TInt& aMaxGain) const; sl@0: sl@0: /** sl@0: Gets the current recording gain. sl@0: sl@0: @param aGain sl@0: The gain, filled in by the controller. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetGain(TInt& aGain) const; sl@0: sl@0: /** sl@0: Sets the balance between the left and right stereo microphone channels. sl@0: sl@0: @param aBalance sl@0: Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be sl@0: restored by using KMMFBalanceCenter. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetBalance(TInt aBalance) const; sl@0: sl@0: /** sl@0: Gets the balance between the left and right stereo microphone channels. sl@0: sl@0: @param aBalance sl@0: The current balance, filled in by the controller. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetBalance(TInt& aBalance) const; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the audio record device sl@0: custom commands. sl@0: */ sl@0: class MMMFAudioRecordDeviceCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets the gain of the sound device. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aGain sl@0: The new gain. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MardSetGainL(TInt aGain) = 0; sl@0: sl@0: /** sl@0: Gets the maximum gain supported by the sound device. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aMaxGain sl@0: The maximum gain, to be filled in by the controller plugin. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MardGetMaxGainL(TInt& aMaxGain) = 0; sl@0: sl@0: /** sl@0: Gets the current recording gain. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aGain sl@0: The gain, to be filled in by the controller. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MardGetGainL(TInt& aGain) = 0; sl@0: sl@0: /** sl@0: Sets the balance between the left and right stereo microphone channels. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aBalance sl@0: Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be sl@0: restored by using KMMFBalanceCenter. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MardSetBalanceL(TInt aBalance) = 0; sl@0: sl@0: /** sl@0: Gets the balance between the left and right stereo microphone channels. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aBalance sl@0: The current balance, filled in by the controller. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MardGetBalanceL(TInt& aBalance) = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support sl@0: audio record device commands. sl@0: sl@0: The controller plugin must be derived from MMMFAudioRecordDeviceCustomCommandImplementor sl@0: to use this class. sl@0: sl@0: The controller plugin should create an object of this type and add it to the list of custom sl@0: command parsers in the controller framework. See the following example code for details. sl@0: sl@0: @code sl@0: void CMMFAudioController::ConstructL() sl@0: { sl@0: // Construct custom command parsers sl@0: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audPlayDevParser); sl@0: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audPlayDevParser sl@0: sl@0: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audRecDevParser); sl@0: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audRecDevParser sl@0: sl@0: etc. sl@0: } sl@0: @endcode sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class CMMFAudioRecordDeviceCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling audio record device commands. sl@0: sl@0: This function may leave with one of the system-wide error codes. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFAudioRecordDeviceCustomCommandParser* NewL(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFAudioRecordDeviceCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFAudioRecordDeviceCustomCommandParser(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetGainL(TMMFMessage& aMessage); sl@0: TBool DoGetMaxGainL(TMMFMessage& aMessage); sl@0: TBool DoGetGainL(TMMFMessage& aMessage); sl@0: TBool DoSetBalanceL(TMMFMessage& aMessage); sl@0: TBool DoGetBalanceL(TMMFMessage& aMessage); sl@0: private: sl@0: /** The object that implements the audio record device interface */ sl@0: MMMFAudioRecordDeviceCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access functionality specific to an audio play controller. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFAudioPlayControllerCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFAudioPlayControllerCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets a playback window. The controller will start playing from the start of the window, sl@0: and finish playing at the end of the window. sl@0: sl@0: @param aStart sl@0: The start of the window, in microseconds. sl@0: @param aEnd sl@0: The end of the window, in microseconds. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetPlaybackWindow(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const; sl@0: sl@0: /** sl@0: Removes a previously defined playback window. sl@0: sl@0: @return One of the system-wide error codes. sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt DeletePlaybackWindow(); sl@0: sl@0: /** sl@0: Gets the audio loading progress as a percentage. sl@0: sl@0: @param aPercentageProgress sl@0: The progress loading the clip, as a percentage. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the audio play controller sl@0: custom commands. sl@0: */ sl@0: class MMMFAudioPlayControllerCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets a playback window. The controller will start playing from the start of the window, sl@0: and finish playing at the end of the window. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aStart sl@0: The start of the window, in microseconds. sl@0: @param aEnd sl@0: The end of the window, in microseconds. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapcSetPlaybackWindowL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0; sl@0: sl@0: /** sl@0: Removes a previously defined playback window. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapcDeletePlaybackWindowL() = 0; sl@0: sl@0: /** sl@0: Gets the completion status of loading/rebuffering the current audio clip. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aPercentageComplete sl@0: The status of loading as a percentage completed. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MapcGetLoadingProgressL(TInt& aPercentageComplete) = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support sl@0: audio play controller commands. sl@0: sl@0: The controller plugin must be derived from MMMFAudioPlayControllerCustomCommandImplementor to use sl@0: this class. sl@0: sl@0: The controller plugin should create an object of this type and add it to the list of custom sl@0: command parsers in the controller framework. See the following example code for details. sl@0: sl@0: @code sl@0: void CMMFAudioController::ConstructL() sl@0: { sl@0: // Construct custom command parsers sl@0: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audPlayDevParser); sl@0: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audPlayDevParser sl@0: sl@0: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audRecDevParser); sl@0: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audRecDevParser sl@0: sl@0: etc. sl@0: } sl@0: @endcode sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class CMMFAudioPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling audio play controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFAudioPlayControllerCustomCommandParser* NewL(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFAudioPlayControllerCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFAudioPlayControllerCustomCommandParser(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetPlaybackWindowL(TMMFMessage& aMessage); sl@0: TBool DoDeletePlaybackWindowL(TMMFMessage& aMessage); sl@0: TBool DoGetLoadingProgressL(TMMFMessage& aMessage); sl@0: private: sl@0: /** sl@0: The object that implements the audio play controller interface sl@0: */ sl@0: MMMFAudioPlayControllerCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access functionality specific to an audio record controller. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFAudioRecordControllerCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFAudioRecordControllerCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Gets the (possibly estimated) record time left in the clip. sl@0: sl@0: @param aTime sl@0: The record time available, in microseconds. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const; sl@0: sl@0: /** sl@0: Sets the maximum duration of the recorded clip, in microseconds. sl@0: sl@0: @param aMaxDuration sl@0: The maximum duration of the recorded clip, in microseconds. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetMaxDuration(const TTimeIntervalMicroSeconds& aMaxDuration) const; sl@0: sl@0: /** sl@0: Sets the maximum size of the recorded clip, in bytes. sl@0: sl@0: @param aMaxSize sl@0: The maximum size of the recorded clip, in bytes. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const; sl@0: sl@0: /** sl@0: Removes a portion from the clip, either from the current position to the beginning or the sl@0: current position to the end. sl@0: sl@0: @param aToEnd sl@0: A boolean indicating whether to crop to the end. Crops to the end if set to ETrue, to sl@0: the beginning set to EFalse. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt Crop(TBool aToEnd); sl@0: sl@0: /** sl@0: Adds meta data to the clip. sl@0: sl@0: @param aNewEntry sl@0: The details of the new entry to be added. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry); sl@0: sl@0: /** sl@0: Removes a meta data entry from the clip. sl@0: sl@0: @param aIndex sl@0: The ID of the meta data entry to delete. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex); sl@0: sl@0: /** sl@0: Replaces a meta data in the clip. sl@0: sl@0: @param aIndex sl@0: The ID of the meta data entry to replace. sl@0: @param aNewEntry sl@0: The details of the new entry to be added. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry); sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the audio record controller sl@0: custom commands. sl@0: */ sl@0: class MMMFAudioRecordControllerCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Gets the (possibly estimated) record time left in the clip. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aTime sl@0: The record time available, in microseconds. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MarcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0; sl@0: sl@0: /** sl@0: Sets the maximum duration of the recorded clip, in microseconds. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aMaxDuration sl@0: The maximum duration of the recorded clip, in microseconds. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MarcSetMaxDurationL(const TTimeIntervalMicroSeconds& aMaxDuration) = 0; sl@0: sl@0: /** sl@0: Sets the maximum size of the recorded clip, in bytes. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aMaxSize sl@0: The maximum size of the recorded clip, in bytes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MarcSetMaxFileSizeL(TInt aMaxSize) = 0; sl@0: sl@0: /** sl@0: Removes a portion from the clip, either from the current position to the beginning sl@0: or the current position to the end. sl@0: sl@0: This function can leave with one of the system-wide error codes. The request will be sl@0: completed with the leave code. sl@0: sl@0: @param aToEnd sl@0: A boolean indicating whether to crop to the end or the beginning. ETrue to crop to the sl@0: end, EFalse to the beginning. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MarcCropL(TBool aToEnd) = 0; sl@0: sl@0: /** sl@0: Adds meta data to the clip. sl@0: sl@0: @param aNewEntry sl@0: The details of the new entry to be added. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MarcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry) = 0; sl@0: sl@0: /** sl@0: Removes a meta data entry from the clip. sl@0: sl@0: @param aIndex sl@0: The ID of the meta data entry to delete. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MarcRemoveMetaDataEntryL(TInt aIndex) = 0; sl@0: sl@0: /** sl@0: Replaces a meta data entry in the clip. sl@0: sl@0: @param aIndex sl@0: The ID of the meta data entry to replace. sl@0: @param aNewEntry sl@0: The details of the new entry to be added. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MarcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry) = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support sl@0: audio record controller commands. sl@0: sl@0: The controller plugin must be derived from MMMFAudioRecordControllerCustomCommandImplementor sl@0: to use this class. sl@0: sl@0: The controller plugin should create an object of this type and add it to the list of custom sl@0: command parsers in the controller framework. See the following example code for details. sl@0: sl@0: @code sl@0: void CMMFAudioController::ConstructL() sl@0: { sl@0: // Construct custom command parsers sl@0: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audPlayDevParser); sl@0: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audPlayDevParser sl@0: sl@0: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audRecDevParser); sl@0: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audRecDevParser sl@0: sl@0: etc. sl@0: } sl@0: @endcode sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class CMMFAudioRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling audio record controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFAudioRecordControllerCustomCommandParser* NewL(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFAudioRecordControllerCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFAudioRecordControllerCustomCommandParser(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage); sl@0: TBool DoSetMaxDurationL(TMMFMessage& aMessage); sl@0: TBool DoSetMaxFileSizeL(TMMFMessage& aMessage); sl@0: TBool DoCropL(TMMFMessage& aMessage); sl@0: TBool DoAddMetaDataEntryL(TMMFMessage& aMessage); sl@0: TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage); sl@0: TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage); sl@0: private: sl@0: /** sl@0: The object that implements the audio record controller interface. sl@0: */ sl@0: MMMFAudioRecordControllerCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS sl@0: #include sl@0: #include sl@0: #endif sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: enum TMMFAudioControllerMessages sl@0: { sl@0: EMMFAudioControllerSetSourceSampleRate, sl@0: EMMFAudioControllerSetSourceNumChannels, sl@0: EMMFAudioControllerSetSourceFormat, sl@0: EMMFAudioControllerSetSourceBitRate, sl@0: EMMFAudioControllerSetSourceDataType, sl@0: EMMFAudioControllerSetSinkSampleRate, sl@0: EMMFAudioControllerSetSinkNumChannels, sl@0: EMMFAudioControllerSetSinkFormat, sl@0: EMMFAudioControllerSetSinkBitRate, sl@0: EMMFAudioControllerSetSinkDataType, sl@0: EMMFAudioControllerGetSourceSampleRate, sl@0: EMMFAudioControllerGetSourceBitRate, sl@0: EMMFAudioControllerGetSourceNumChannels, sl@0: EMMFAudioControllerGetSourceFormat, sl@0: EMMFAudioControllerGetSourceDataType, sl@0: EMMFAudioControllerGetSinkSampleRate, sl@0: EMMFAudioControllerGetSinkBitRate, sl@0: EMMFAudioControllerGetSinkNumChannels, sl@0: EMMFAudioControllerGetSinkFormat, sl@0: EMMFAudioControllerGetSinkDataType, sl@0: EMMFAudioControllerGetSupportedSourceSampleRates, sl@0: EMMFAudioControllerGetSupportedSourceBitRates, sl@0: EMMFAudioControllerGetSupportedSourceNumChannels, sl@0: EMMFAudioControllerGetSupportedSourceDataTypes, sl@0: EMMFAudioControllerGetSupportedSinkSampleRates, sl@0: EMMFAudioControllerGetSupportedSinkBitRates, sl@0: EMMFAudioControllerGetSupportedSinkNumChannels, sl@0: EMMFAudioControllerGetSupportedSinkDataTypes, sl@0: EMMFAudioControllerCopyArrayData, sl@0: EMMFAudioControllerSetCodec sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access functionality specific to an audio controller. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFAudioControllerCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command sl@0: interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFAudioControllerCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets the sample rate of the data source in samples per second. sl@0: sl@0: @param aSampleRate sl@0: The sample rate, in samples per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSourceSampleRate(TUint aSampleRate) const; sl@0: sl@0: /** sl@0: Sets the bit rate of the data source in bits per second. sl@0: sl@0: @param aRate sl@0: The bit rate, in bits per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSourceBitRate(TUint aRate) const; sl@0: sl@0: /** sl@0: Sets the number of channels in the data source. For example, one channel for mono, two channels sl@0: for stereo etc. sl@0: sl@0: @param aNumChannels sl@0: The number of channels. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSourceNumChannels(TUint aNumChannels) const; sl@0: sl@0: /** sl@0: Sets the format of the data source. sl@0: sl@0: The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used. sl@0: sl@0: @param aFormatUid sl@0: The format plugin to be used. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSourceFormat(TUid aFormatUid) const; sl@0: sl@0: /** sl@0: Sets the fourCC code of the source. sl@0: sl@0: @param aDataType sl@0: The fourCC code. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSourceDataType(TFourCC aDataType) const; sl@0: sl@0: /** sl@0: Sets the sample rate of the data sink in samples per second. sl@0: sl@0: @param aSampleRate sl@0: The sample rate, in samples per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSinkSampleRate(TUint aSampleRate) const; sl@0: sl@0: /** sl@0: Set the bit rate of the data sink in bits per second. sl@0: sl@0: @param aRate sl@0: The bit rate, in bits per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSinkBitRate(TUint aRate) const; sl@0: sl@0: /** sl@0: Sets the number of channels in the data sink. For example, one channel for mono, two channels sl@0: for stereo etc. sl@0: sl@0: @param aNumChannels sl@0: The number of channels. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSinkNumChannels(TUint aNumChannels) const; sl@0: sl@0: /** sl@0: Sets the format of the data sink. sl@0: sl@0: The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used. sl@0: sl@0: @param aFormatUid sl@0: The format plugin to be used. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSinkFormat(TUid aFormatUid) const; sl@0: sl@0: /** sl@0: Set the fourCC code of the sink. sl@0: sl@0: @param aDataType sl@0: The fourCC code. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetSinkDataType(TFourCC aDataType) const; sl@0: sl@0: /** sl@0: Sets the codec to be used. Useful when recording data. sl@0: sl@0: @param aSourceDataType sl@0: The data type of the source of the codec. sl@0: @param aSinkDataType sl@0: The data type of the sink of the codec. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetCodec(TFourCC aSourceDataType, TFourCC aSinkDataType) const; sl@0: sl@0: /** sl@0: Gets the sample rate of the data source in samples per second. sl@0: sl@0: @param aRate sl@0: The sample rate, in samples per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSourceSampleRate(TUint& aRate) const; sl@0: sl@0: /** sl@0: Gets the bit rate of the data source in bits per second. sl@0: sl@0: @param aRate sl@0: The bit rate, in bits per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSourceBitRate(TUint& aRate) const; sl@0: sl@0: /** sl@0: Gets the number of channels in the data source. For example, one channel for mono, two channels sl@0: for stereo etc. sl@0: sl@0: @param aNumChannels sl@0: The number of channels. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSourceNumChannels(TUint& aNumChannels) const; sl@0: sl@0: /** sl@0: Gets the format of the data source. sl@0: sl@0: The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used. sl@0: sl@0: @param aFormat sl@0: The format plugin being used. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSourceFormat(TUid& aFormat) const; sl@0: sl@0: /** sl@0: Get the fourCC code of the source. sl@0: sl@0: @param aDataType sl@0: The fourCC code. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSourceDataType(TFourCC& aDataType) const; sl@0: sl@0: /** sl@0: Gets the sample rate of the data sink in samples per second. sl@0: sl@0: @param aRate sl@0: The sample rate, in samples per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSinkSampleRate(TUint& aRate) const; sl@0: sl@0: /** sl@0: Gets the bit rate of the data sink in bits per second. sl@0: sl@0: @param aRate sl@0: The bit rate, in bits per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSinkBitRate(TUint& aRate) const; sl@0: sl@0: /** sl@0: Gets the number of channels in the data sink. For example, one channel for mono, two channels sl@0: for stereo etc. sl@0: sl@0: @param aNumChannels sl@0: The number of channels. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSinkNumChannels(TUint& aNumChannels) const; sl@0: sl@0: /** sl@0: Gets the format of the data sink. sl@0: sl@0: The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used. sl@0: sl@0: @param aFormat sl@0: The format plugin being used. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSinkFormat(TUid& aFormat) const; sl@0: sl@0: /** sl@0: Gets the fourCC code of the sink. sl@0: sl@0: @param aDataType sl@0: The fourCC code. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSinkDataType(TFourCC& aDataType) const; sl@0: sl@0: /** sl@0: Gets the list of sample rates supported by the data source. sl@0: sl@0: Warning: Existing objects in this array will be removed by this function. sl@0: sl@0: @param aSupportedRates sl@0: The supported rates. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetSupportedSourceSampleRatesL(RArray& aSupportedRates) const; sl@0: sl@0: /** sl@0: Gets the list of bit rates supported by the data source. sl@0: sl@0: Warning: Existing objects in this array will be removed by this function. sl@0: sl@0: @param aSupportedRates sl@0: The supported rates. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetSupportedSourceBitRatesL(RArray& aSupportedRates) const; sl@0: sl@0: /** sl@0: Gets the list of channels supported by the data source (ie mono, stereo etc). sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedChannels sl@0: The supported channels. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetSupportedSourceNumChannelsL(RArray& aSupportedChannels) const; sl@0: sl@0: /** sl@0: Gets the list of fourCC codes supported by the data source. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedDataTypes sl@0: The supported data types. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetSupportedSourceDataTypesL(RArray& aSupportedDataTypes) const; sl@0: sl@0: /** sl@0: Gets the list of sample rates supported by the data sink. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedRates sl@0: The supported rates. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetSupportedSinkSampleRatesL(RArray& aSupportedRates) const; sl@0: sl@0: /** sl@0: Gets the list of bit rates supported by the data sink. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedRates sl@0: The supported rates. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetSupportedSinkBitRatesL(RArray& aSupportedRates) const; sl@0: sl@0: /** sl@0: Gets the list of channels supported by the data sink (ie mono, stereo etc). sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedChannels sl@0: The supported channels. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetSupportedSinkNumChannelsL(RArray& aSupportedChannels) const; sl@0: sl@0: /** sl@0: Gets the list of fourCC codes supported by the data sink. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedDataTypes sl@0: The supported data types. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetSupportedSinkDataTypesL(RArray& aSupportedDataTypes) const; sl@0: sl@0: private: sl@0: void DoGetUintArrayL(RArray& aArray, TMMFAudioControllerMessages aIpc) const; sl@0: void DoGetFourCCArrayL(RArray& aArray, TMMFAudioControllerMessages aIpc) const; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the audio record controller sl@0: custom commands. sl@0: */ sl@0: class MMMFAudioControllerCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets the sample rate of the data source in samples per second. sl@0: sl@0: @param aSampleRate sl@0: The sample rate, in samples per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSourceSampleRateL(TUint aSampleRate) = 0; sl@0: sl@0: /** sl@0: Sets the bit rate of the data source in bits per second. sl@0: sl@0: @param aBitRate sl@0: The bit rate, in bits per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSourceBitRateL(TUint aBitRate) = 0; sl@0: sl@0: /** sl@0: Sets the number of channels in the data source. For example, one channel for mono, two channels sl@0: for stereo etc. sl@0: sl@0: @param aNumChannels sl@0: The number of channels. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSourceNumChannelsL(TUint aNumChannels) = 0; sl@0: sl@0: /** sl@0: Sets the format of the data source. The UID corresponds to the UID of the CMMFFormat-derived sl@0: ECOM plugin to be used. sl@0: sl@0: @param aFormatUid sl@0: The format plugin to be used. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSourceFormatL(TUid aFormatUid) = 0; sl@0: sl@0: /** sl@0: Sets the fourCC code of the source. sl@0: sl@0: @param aDataType sl@0: The fourCC code. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSourceDataTypeL(TFourCC aDataType) = 0; sl@0: sl@0: /** sl@0: Sets the sample rate of the data sink in samples per second. sl@0: sl@0: @param aSampleRate sl@0: The sample rate, in samples per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSinkSampleRateL(TUint aSampleRate) = 0; sl@0: sl@0: /** sl@0: Sets the bit rate of the data sink in bits per second. sl@0: sl@0: @param aRate sl@0: The bit rate, in bits per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSinkBitRateL(TUint aRate) = 0; sl@0: sl@0: /** sl@0: Sets the number of channels in the data sink. For example, one channel for mono, two channels sl@0: for stereo etc. sl@0: sl@0: @param aNumChannels sl@0: The number of channels. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSinkNumChannelsL(TUint aNumChannels) = 0; sl@0: sl@0: /** sl@0: Sets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM sl@0: plugin to be used. sl@0: sl@0: @param aFormatUid sl@0: The format plugin to be used. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSinkFormatL(TUid aFormatUid) = 0; sl@0: sl@0: /** sl@0: Sets the fourCC code of the sink. sl@0: sl@0: @param aDataType sl@0: The fourCC code. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetSinkDataTypeL(TFourCC aDataType) = 0; sl@0: sl@0: /** sl@0: Sets the codec to be used. Useful when recording data. sl@0: sl@0: @param aSourceDataType sl@0: The data type of the source of the codec. sl@0: @param aSinkDataType sl@0: The data type of the sink of the codec. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacSetCodecL(TFourCC aSourceDataType, TFourCC aSinkDataType) = 0; sl@0: sl@0: sl@0: /** sl@0: Gets the sample rate of the data source in samples per second. sl@0: sl@0: @param aRate sl@0: The sample rate, in samples per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSourceSampleRateL(TUint& aRate) = 0; sl@0: sl@0: /** sl@0: Gets the bit rate of the data source in bits per second. sl@0: sl@0: @param aRate sl@0: The bit rate, in bits per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSourceBitRateL(TUint& aRate) = 0; sl@0: sl@0: /** sl@0: Gets the number of channels in the data source. For example, one channel for mono, two channels sl@0: for stereo etc. sl@0: sl@0: @param aNumChannels sl@0: The number of channels. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSourceNumChannelsL(TUint& aNumChannels) = 0; sl@0: sl@0: /** sl@0: Gets the format of the data source. The UID corresponds to the uid of the CMMFFormat-derived sl@0: ECOM plugin being used. sl@0: sl@0: @param aFormat sl@0: The format plugin being used. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSourceFormatL(TUid& aFormat) = 0; sl@0: sl@0: /** sl@0: Gets the fourCC code of the source. sl@0: sl@0: @param aDataType sl@0: The fourCC code. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSourceDataTypeL(TFourCC& aDataType) = 0; sl@0: sl@0: /** sl@0: Gets the sample rate of the data sink in samples per second. sl@0: sl@0: @param aRate sl@0: The sample rate, in samples per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSinkSampleRateL(TUint& aRate) = 0; sl@0: sl@0: /** sl@0: Gets the bit rate of the data sink in bits per second. sl@0: sl@0: @param aRate sl@0: The bit rate, in bits per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSinkBitRateL(TUint& aRate) = 0; sl@0: sl@0: /** sl@0: Gets the number of channels in the data sink. For example, one channel for mono, two channels sl@0: for stereo etc. sl@0: sl@0: @param aNumChannels sl@0: The number of channels. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSinkNumChannelsL(TUint& aNumChannels) = 0; sl@0: sl@0: /** sl@0: Gets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM sl@0: plugin being used. sl@0: sl@0: @param aFormat sl@0: The format plugin being used. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSinkFormatL(TUid& aFormat) = 0; sl@0: sl@0: /** sl@0: Gets the fourCC code of the sink. sl@0: sl@0: @param aDataType sl@0: The fourCC code. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSinkDataTypeL(TFourCC& aDataType) = 0; sl@0: sl@0: /** sl@0: Gets the list of sample rates supported by the data source. sl@0: sl@0: @param aSupportedRates sl@0: The supported rates. Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSupportedSourceSampleRatesL(RArray& aSupportedRates) = 0; sl@0: sl@0: /** sl@0: Gets the list of bit rates supported by the data source. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedRates sl@0: The supported rates. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSupportedSourceBitRatesL(RArray& aSupportedRates) = 0; sl@0: sl@0: /** sl@0: Gets the list of channels supported by the data source (ie mono, stereo etc). sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedChannels sl@0: The supported channels. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSupportedSourceNumChannelsL(RArray& aSupportedChannels) = 0; sl@0: sl@0: /** sl@0: Gets the list of fourCC codes supported by the data source. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedDataTypes sl@0: The supported data types. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSupportedSourceDataTypesL(RArray& aSupportedDataTypes) = 0; sl@0: sl@0: /** sl@0: Gets the list of sample rates supported by the data sink. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedRates sl@0: The supported rates. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSupportedSinkSampleRatesL(RArray& aSupportedRates) = 0; sl@0: sl@0: /** sl@0: Gets the list of bit rates supported by the data sink. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedRates sl@0: The supported rates. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSupportedSinkBitRatesL(RArray& aSupportedRates) = 0; sl@0: sl@0: /** sl@0: Gets the list of channels supported by the data sink (ie mono, stereo etc). sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedChannels sl@0: The supported channels. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSupportedSinkNumChannelsL(RArray& aSupportedChannels) = 0; sl@0: sl@0: /** sl@0: Gets the list of fourCC codes supported by the data sink. sl@0: sl@0: Warning: Existing objects in this array will be removed by this method. sl@0: sl@0: @param aSupportedDataTypes sl@0: The supported data types. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MacGetSupportedSinkDataTypesL(RArray& aSupportedDataTypes) = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support sl@0: audio controller commands. sl@0: sl@0: The controller plugin must be derived from MMMFAudioControllerCustomCommandImplementor sl@0: to use this class. sl@0: sl@0: The controller plugin should create an object of this type and add it to the list of custom sl@0: command parsers in the controller framework. See the following example code for details. sl@0: sl@0: @code sl@0: void CMMFAudioController::ConstructL() sl@0: { sl@0: // Construct custom command parsers sl@0: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audPlayDevParser); sl@0: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audPlayDevParser sl@0: sl@0: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audRecDevParser); sl@0: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audRecDevParser sl@0: sl@0: etc. sl@0: } sl@0: @endcode sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class CMMFAudioControllerCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling audio controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFAudioControllerCustomCommandParser* NewL(MMMFAudioControllerCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFAudioControllerCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFAudioControllerCustomCommandParser(MMMFAudioControllerCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: sl@0: TBool DoSetSourceSampleRateL(TMMFMessage& aMessage); sl@0: TBool DoSetSourceNumChannelsL(TMMFMessage& aMessage); sl@0: TBool DoSetSourceFormatL(TMMFMessage& aMessage); sl@0: TBool DoSetSinkSampleRateL(TMMFMessage& aMessage); sl@0: TBool DoSetSinkNumChannelsL(TMMFMessage& aMessage); sl@0: TBool DoSetSinkFormatL(TMMFMessage& aMessage); sl@0: TBool DoSetCodecL(TMMFMessage& aMessage); sl@0: TBool DoSetSourceBitRateL(TMMFMessage& aMessage); sl@0: TBool DoSetSourceDataTypeL(TMMFMessage& aMessage); sl@0: TBool DoSetSinkBitRateL(TMMFMessage& aMessage); sl@0: TBool DoSetSinkDataTypeL(TMMFMessage& aMessage); sl@0: TBool DoGetSourceSampleRateL(TMMFMessage& aMessage); sl@0: TBool DoGetSourceBitRateL(TMMFMessage& aMessage); sl@0: TBool DoGetSourceNumChannelsL(TMMFMessage& aMessage); sl@0: TBool DoGetSourceFormatL(TMMFMessage& aMessage); sl@0: TBool DoGetSourceDataTypeL(TMMFMessage& aMessage); sl@0: TBool DoGetSinkSampleRateL(TMMFMessage& aMessage); sl@0: TBool DoGetSinkBitRateL(TMMFMessage& aMessage); sl@0: TBool DoGetSinkNumChannelsL(TMMFMessage& aMessage); sl@0: TBool DoGetSinkFormatL(TMMFMessage& aMessage); sl@0: TBool DoGetSinkDataTypeL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSourceSampleRatesL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSourceBitRatesL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSourceNumChannelsL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSourceDataTypesL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSinkSampleRatesL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSinkBitRatesL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSinkNumChannelsL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSinkDataTypesL(TMMFMessage& aMessage); sl@0: TBool DoCopyArrayDataL(TMMFMessage& aMessage); sl@0: sl@0: void DoCreateBufFromUintArrayL(RArray& aArray); sl@0: void DoCreateBufFromFourCCArrayL(RArray& aArray); sl@0: private: sl@0: /** sl@0: The object that implements the audio record controller interface sl@0: */ sl@0: MMMFAudioControllerCustomCommandImplementor& iImplementor; sl@0: sl@0: CBufFlat* iDataCopyBuffer; sl@0: }; sl@0: sl@0: sl@0: class RWindow; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access functionality specific to a video controller. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFVideoControllerCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFVideoControllerCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Gets the frame size of the clip. sl@0: sl@0: @param aVideoFrameSize sl@0: The frame size, in pixels. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetVideoFrameSize(TSize& aVideoFrameSize) const; sl@0: sl@0: /** sl@0: Gets the audio type. sl@0: sl@0: @param aCodec sl@0: The FourCC of the audio codec. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetAudioCodec(TFourCC& aCodec) const; sl@0: sl@0: /** sl@0: Gets the video bit rate. sl@0: sl@0: @param aBitRate sl@0: The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies sl@0: a variable bit rate. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetVideoBitRate(TInt& aBitRate) const; sl@0: sl@0: /** sl@0: Gets the audio bit rate. sl@0: sl@0: @param aBitRate sl@0: The bit rate of the audio stream. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetAudioBitRate(TInt& aBitRate) const; sl@0: sl@0: /** sl@0: Sets the frame rate of the clip. sl@0: sl@0: @param aFramesPerSecond sl@0: The number of frames per second. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetFrameRate(TReal32 aFramesPerSecond) const; sl@0: sl@0: /** sl@0: Gets the frame rate of the clip. sl@0: sl@0: @param aFramesPerSecond sl@0: The number of frames per second, filled in by the controller plugin. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetFrameRate(TReal32& aFramesPerSecond) const; sl@0: sl@0: /** sl@0: Gets the video clip MIME type. sl@0: sl@0: @param aMimeType sl@0: The Mime type of the current clip. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetVideoMimeType(TDes8& aMimeType) const; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access functionality specific to a video playback controller. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFVideoPlayControllerCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFVideoPlayControllerCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Prepares the video clip to be accessed. sl@0: sl@0: A call to this function tells the loaded controller plugin to finalise its configuration sl@0: and to prepare to start reading the video clip. It is not possible to play the video clip sl@0: or query any of its properties (e.g. duration, meta data etc.) until the controller plugin sl@0: has signified the completion of this method by generating a KMMFEventCategoryVideoPrepareComplete sl@0: event. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt Prepare(); sl@0: sl@0: /** sl@0: Asks the controller to store the current frame to a bitmap. sl@0: sl@0: The video play controller will send an event to the client on completion of the task. sl@0: sl@0: @param aBitmap sl@0: The handle of the CFbsBitmap object to retrieve the frame to. sl@0: @param aStatus sl@0: The active object to call back on. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void GetFrame(CFbsBitmap& aBitmap, TRequestStatus& aStatus); sl@0: sl@0: /** sl@0: Sets the screen region to be used to display the video. sl@0: sl@0: @param aWindowRect sl@0: The window rectangle. sl@0: @param aClipRect sl@0: The clip rectangle. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetDisplayWindow(const TRect& aWindowRect, const TRect& aClipRect) const; sl@0: sl@0: /** sl@0: Updates the display region. sl@0: sl@0: @param aRegion sl@0: The valid region to display to. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt UpdateDisplayRegion(const TRegion& aRegion) const; sl@0: sl@0: /** sl@0: Queries whether audio is enabled. sl@0: sl@0: @param aEnabled sl@0: A boolean indicating whether audio is enabled. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const; sl@0: sl@0: /** sl@0: Sends a direct screen access event to controller. sl@0: sl@0: @param aDSAEvent sl@0: The direct screen access event. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt DirectScreenAccessEvent(const TMMFDSAEvent aDSAEvent) const; sl@0: sl@0: /** sl@0: Sets a time window for video playback. sl@0: sl@0: @param aStart sl@0: The start time in milliseconds relative to the start of the video clip. sl@0: @param aEnd sl@0: The end time in milliseconds relative to the start of the video clip. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt Play(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const; sl@0: sl@0: /** sl@0: Requests the controller to redraw the current frame. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt RefreshFrame() const; sl@0: sl@0: /** sl@0: Gets the video loading progress as a percentage. sl@0: sl@0: @param aPercentageProgress sl@0: The progress loading the clip, as a percentage. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const; sl@0: sl@0: /** sl@0: Rotates the video image on the screen. sl@0: sl@0: @param aRotation sl@0: The desired rotation to apply. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetRotation(TVideoRotation aRotation) const; sl@0: sl@0: /** sl@0: Queries the rotation that is currently applied to the video image. sl@0: sl@0: @param aRotation sl@0: The applied rotation. sl@0: sl@0: @return One of the system wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetRotation(TVideoRotation& aRotation) const; sl@0: sl@0: /** sl@0: Scales the video image to a specified percentage of its original size. sl@0: sl@0: @param aWidthPercentage sl@0: The percentage (100 = original size) to be used to scale the width of the video image. sl@0: @param aHeightPercentage sl@0: The percentage (100 = original size) to be used to scale the height of the video image. sl@0: If this is not equal to aWidthPercentage then the image may be distorted. sl@0: @param aAntiAliasFiltering sl@0: True if anti-aliasing filtering should be used. If the plugin does not sl@0: support this kind of processing, this value will be ignored. sl@0: sl@0: @return One of the system wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetScaleFactor(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) const; sl@0: sl@0: /** sl@0: Gets the scale factor currently applied to the video image. sl@0: sl@0: @param aWidthPercentage sl@0: On return, will contain the percentage (100 = original size) used to scale the width sl@0: of the video image. sl@0: @param aHeightPercentage sl@0: On return. will contain the percentage (100 = original size) used to scale the height sl@0: of the video image. sl@0: @param aAntiAliasFiltering sl@0: True if anti-aliasing filtering is being used sl@0: sl@0: @return One of the system wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetScaleFactor(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) const; sl@0: sl@0: /** sl@0: Selects a region of the video image to be displayed. sl@0: sl@0: @param aCropRegion sl@0: The dimensions of the crop region, relative to the video image. sl@0: sl@0: @return One of the system wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetCropRegion(const TRect& aCropRegion) const; sl@0: sl@0: /** sl@0: Gets the crop region currently applied to the image. sl@0: sl@0: @param aCropRegion sl@0: The dimensions of the crop region, relative to the video image. If no crop region has sl@0: been applied, the full dimensions of the video image will be returned. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetCropRegion(TRect& aCropRegion) const; sl@0: sl@0: sl@0: private: sl@0: TPckgBuf iConfigPackage; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: enum TMMFVideoRecordControllerMessages sl@0: { sl@0: EMMFVideoRecordControllerSetVideoFormat, sl@0: EMMFVideoRecordControllerSetVideoCodec, sl@0: EMMFVideoRecordControllerSetAudioCodec, sl@0: EMMFVideoRecordControllerSetVideoBitRate, sl@0: EMMFVideoRecordControllerSetAudioBitRate, sl@0: EMMFVideoRecordControllerSetVideoFrameSize, sl@0: EMMFVideoRecordControllerSetMaxFileSize, sl@0: EMMFVideoRecordControllerAddMetaDataEntry, sl@0: EMMFVideoRecordControllerRemoveMetaDataEntry, sl@0: EMMFVideoRecordControllerReplaceMetaDataEntry, sl@0: EMMFVideoRecordControllerSetAudioEnabled, sl@0: EMMFVideoRecordControllerPrepare, sl@0: EMMFVideoRecordControllerSetCameraHandle, sl@0: EMMFVideoRecordControllerGetRecordTimeAvailable, sl@0: EMMFVideoRecordControllerGetSupportedSinkAudioTypes, sl@0: EMMFVideoRecordControllerGetSupportedSinkVideoTypes, sl@0: EMMFVideoRecordControllerCopyDescriptorArrayData, sl@0: EMMFVideoRecordControllerCopyFourCCArrayData, sl@0: EMMFVideoRecordControllerGetAudioEnabled // INC23777 sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access functionality specific to a video recorder controller. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFVideoRecordControllerCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFVideoRecordControllerCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets the format for the video to record. sl@0: sl@0: @param aVideoFormatUid sl@0: The UID of the video format. sl@0: sl@0: @return This method will return with one of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetVideoFormat(TUid aVideoFormatUid) const; sl@0: sl@0: /** sl@0: Sets the video codec for recording. sl@0: sl@0: @param aVideoCodec sl@0: The MIME type of the video codec. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetVideoCodec(const TDesC8& aVideoCodec) const; sl@0: sl@0: /** sl@0: Sets the video bit rate. sl@0: sl@0: @param aBitRate sl@0: The bit rate of the video stream. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetVideoBitRate(TInt aBitRate) const; sl@0: sl@0: /** sl@0: Sets the audio bit rate. sl@0: sl@0: @param aBitRate sl@0: The bit rate of the audio stream. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetAudioBitRate(TInt aBitRate) const; sl@0: sl@0: /** sl@0: Sets the audio codec for recording. sl@0: sl@0: @param aAudioCodec sl@0: The FourCC code of the audio codec. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetAudioCodec(TFourCC aAudioCodec) const; sl@0: sl@0: /** sl@0: Sets the frame size of the clip. sl@0: sl@0: @param aVideoFrameSize sl@0: The frame size, in pixels. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetVideoFrameSize(TSize aVideoFrameSize) const; sl@0: sl@0: /** sl@0: Sets the maximum size of the recorded clip, in bytes. sl@0: sl@0: @param aMaxSize sl@0: The maximum size of the recorded clip, in bytes. This can be called with the parameter sl@0: KMMFNoMaxClipSize which signifies no maximum file size. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const; sl@0: sl@0: /** sl@0: Adds meta data to the clip. sl@0: sl@0: @param aNewEntry sl@0: The details of the new entry to be added. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)const; sl@0: sl@0: /** sl@0: Removes a meta data entry from the clip. sl@0: sl@0: @param aIndex sl@0: The ID of the meta data entry to delete. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex)const; sl@0: sl@0: /** sl@0: Replaces a meta data in the clip. sl@0: sl@0: @param aIndex sl@0: The ID of the meta data entry to replace. sl@0: @param aNewEntry sl@0: The details of the new entry to be added. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)const; sl@0: sl@0: /** sl@0: Sets whether audio is enabled. sl@0: sl@0: @param aEnable sl@0: A boolean indicating if audio should be enabled. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetAudioEnabled(TBool aEnable) const; sl@0: sl@0: /** sl@0: Prepares the controller for recording. This should be called before the first attempt to record sl@0: with the controller. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt Prepare() const; sl@0: sl@0: /** sl@0: Sets the handle of the camera to use. sl@0: sl@0: @param aCameraHandle sl@0: The handle of the camera to use. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt SetCameraHandle(TInt aCameraHandle) const; sl@0: sl@0: /** sl@0: Gets the (possibly estimated) record time left in the clip. sl@0: sl@0: @param aTime sl@0: The record time available, in microseconds. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const; sl@0: sl@0: /** sl@0: Gets the supported sink audio types. sl@0: sl@0: @param aSupportedDataTypes sl@0: The supported data types. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSupportedSinkAudioTypes(RArray& aSupportedDataTypes) const; sl@0: sl@0: /** sl@0: Gets the supported sink video types. sl@0: sl@0: @param aDataTypes sl@0: The supported data types. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetSupportedSinkVideoTypes(CDesC8Array& aDataTypes) const; sl@0: sl@0: // INC23777 sl@0: /** sl@0: Retrieves whether audio is enabled. sl@0: sl@0: @param aEnabled sl@0: A boolean indicating whether audio is enabled. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const; sl@0: sl@0: private: sl@0: void DoGetCDesC8ArrayL(CDesC8Array& aArray, TMMFVideoRecordControllerMessages aIpc) const; sl@0: void DoGetFourCCArrayL(RArray& aArray) const; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the video record controller sl@0: custom commands. sl@0: */ sl@0: class MMMFVideoRecordControllerCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets the format for the video to record. sl@0: sl@0: @param aVideoFormatUid sl@0: The UID of the video format. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetVideoFormatL(TUid aVideoFormatUid)=0; sl@0: sl@0: /** sl@0: Sets the video codec for recording. sl@0: sl@0: @param aVideoCodec sl@0: The MIME type of the video codec. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetVideoCodecL(const TDesC8& aVideoCodec)=0; sl@0: sl@0: /** sl@0: Sets the audio codec for recording. sl@0: sl@0: @param aAudioCodec sl@0: The FourCC code of the audio codec. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetAudioCodecL(TFourCC aAudioCodec)=0; sl@0: sl@0: /** sl@0: Sets the video bit rate. sl@0: sl@0: @param aBitRate sl@0: The bit rate of the video stream. This can be called with the parameter sl@0: KMMFVariableVideoBitRate which specifies a variable bit rate. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetVideoBitRateL(TInt& aBitRate)=0; sl@0: sl@0: /** sl@0: Sets the audio bit rate. sl@0: sl@0: @param aBitRate sl@0: The bit rate of the audio stream. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetAudioBitRateL(TInt& aBitRate)=0; sl@0: sl@0: /** sl@0: Adds meta data to the clip. sl@0: sl@0: @param aNewEntry sl@0: The details of the new entry to be added. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)=0; sl@0: sl@0: /** sl@0: Removes a meta data entry from the clip. sl@0: sl@0: @param aIndex sl@0: The ID of the meta data entry to delete. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcRemoveMetaDataEntryL(TInt aIndex)=0; sl@0: sl@0: /** sl@0: Replaces a meta data in the clip. sl@0: sl@0: @param aIndex sl@0: The ID of the meta data entry to replace. sl@0: @param aNewEntry sl@0: The details of the new entry to be added. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)=0; sl@0: sl@0: /** sl@0: Sets the maximum file size. sl@0: sl@0: @param aMaxFileSize sl@0: The maximum file size allowed for recording. This can be called with the parameter sl@0: KMMFNoMaxClipSize which signifies no maximum file size. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetMaxFileSizeL(TInt aMaxFileSize)=0; sl@0: sl@0: /** sl@0: Sets whether audio is enabled. sl@0: sl@0: @param aEnable sl@0: A boolean indicating if audio is enabled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetAudioEnabledL(TBool aEnable)=0; sl@0: sl@0: /** sl@0: Sets the frame size for the video recording. sl@0: sl@0: @param aFrameSize sl@0: The frame size for recording. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetVideoFrameSizeL(TSize aFrameSize)=0; sl@0: sl@0: /** sl@0: Prepares the controller for recording. This needs to be called before sl@0: the first call to Record(). sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcPrepareL()=0; sl@0: sl@0: /** sl@0: Sets the handle of the camera to use for recording. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcSetCameraHandleL(TInt aCameraHandle)=0; sl@0: sl@0: /** sl@0: Gets the (possibly estimated) record time left in the clip. sl@0: sl@0: @param aTime sl@0: The record time available, in microseconds. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0; sl@0: sl@0: /** sl@0: Gets the supported sink audio types. sl@0: sl@0: @param aDataTypes sl@0: The supported data types. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcGetSupportedSinkAudioTypesL(RArray& aDataTypes)=0; sl@0: sl@0: /** sl@0: Gets the supported sink video types. sl@0: sl@0: @param aDataTypes sl@0: The supported data types. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcGetSupportedSinkVideoTypesL(CDesC8Array& aDataTypes)=0; sl@0: sl@0: //INC23777 sl@0: /** sl@0: Indicates if the audio is enabled. sl@0: sl@0: @param aEnabled sl@0: A boolean indicating if the audio is enabled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvrcGetAudioEnabledL(TBool& aEnabled)=0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to access functionality specific to a video playback controller. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class MMMFVideoPlayControllerCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Prepares the video clip to be accessed. sl@0: sl@0: A call to this method tells the controller plugin to finalise its configuration sl@0: and to prepare to start reading the video clip. It is not possible to play the video clip sl@0: or query any of its properties (e.g. duration, meta data etc.) until the controller plugin sl@0: has signified the completion of this method by generating a sl@0: KMMFEventCategoryVideoPrepareComplete event. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcPrepare()=0; sl@0: sl@0: /** sl@0: Gets a frame previously requested from the controller. sl@0: sl@0: @param aVideoFrame sl@0: The handle of bitmap to retrieve frame to. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcGetFrameL(MMMFVideoFrameMessage& aVideoFrame)=0; sl@0: sl@0: /** sl@0: Indicates whether audio is enabled. sl@0: sl@0: @param aEnabled sl@0: On return, contains a boolean indicating whether audio is enabled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcGetAudioEnabledL(TBool& aEnabled)=0; sl@0: sl@0: /** sl@0: Sets the screen region to be used to display the video. sl@0: sl@0: @param aClipRect sl@0: The clip rect used to display the video. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcSetDisplayWindowL(const TRect& aWindowRect, const TRect& aClipRect) = 0; sl@0: sl@0: /** sl@0: Updates the region to display. sl@0: sl@0: @param aRegion sl@0: A TRegion containing the current display regions, ownership of the TRegion is not sl@0: transferred. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcUpdateDisplayRegionL(const TRegion& aRegion) = 0; sl@0: sl@0: /** sl@0: Pauses/Resumes video playback. This is to be used with direct screen access sl@0: to indicate that the display has changed and should not be written to. This sl@0: does not affect audio playback. sl@0: sl@0: @param aDSAEvent sl@0: Whether the video display should be active. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcDirectScreenAccessEventL(const TMMFDSAEvent aDSAEvent) = 0; sl@0: sl@0: /** sl@0: Sets a time window for video playback. sl@0: sl@0: @param aStart sl@0: Start time in milliseconds relative to the start of the video clip. sl@0: @param aEnd sl@0: End time in milliseconds relative to the start of the video clip. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcPlayL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0; sl@0: sl@0: /** sl@0: Requests the controller to redraw the current frame. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcRefreshFrameL() = 0; sl@0: sl@0: /** sl@0: Gets the progress of loading a video clip. sl@0: sl@0: @param aPercentageComplete sl@0: The progress loading the clip, as a percentage. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcGetLoadingProgressL(TInt& aPercentageComplete) = 0; sl@0: sl@0: /** sl@0: Rotates the video image on the screen. sl@0: sl@0: @param aRotation sl@0: The desired rotation to apply. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcSetRotationL(TVideoRotation aRotation) = 0; sl@0: sl@0: /** sl@0: Queries the rotation that is currently applied to the video image. sl@0: sl@0: @param aRotation sl@0: The applied rotation. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcGetRotationL(TVideoRotation& aRotation) = 0; sl@0: sl@0: /** sl@0: Scales the video image to a specified percentage of its original size. sl@0: sl@0: @param aWidthPercentage sl@0: The percentage (100 = original size) to be used to scale the width of the video image. sl@0: @param aHeightPercentage sl@0: The percentage (100 = original size) to be used to scale the height of the video image. sl@0: If this is not equal to aWidthPercentage then the image may be distorted. sl@0: @param aAntiAliasFiltering sl@0: A boolean indicating if anit-aliasing filtering should be used. ETrue if anti-aliasing sl@0: should be used. If the plugin does not support this kind of processing, this value will sl@0: be ignored. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcSetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) = 0; sl@0: sl@0: /** sl@0: Gets the scale factor currently applied to the video image. sl@0: sl@0: @param aWidthPercentage sl@0: The percentage (100 = original size) used to scale the width of the video image will be sl@0: copied into here. sl@0: @param aHeightPercentage sl@0: The percentage (100 = original size) used to scale the height of the video image will be sl@0: copied into here. sl@0: @param aAntiAliasFiltering sl@0: A boolean indicating if anti-aliasing filtering should be used. ETrue if anti-aliasing sl@0: filtering is being used, EFalse if not. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcGetScaleFactorL(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) = 0; sl@0: sl@0: /** sl@0: Selects a region of the video image to be displayed. sl@0: sl@0: @param aCropRegion sl@0: The dimensions of the crop region, relative to the video image. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcSetCropRegionL(const TRect& aCropRegion) = 0; sl@0: sl@0: /** sl@0: Gets the crop region currently applied to the image sl@0: sl@0: @param aCropRegion sl@0: The dimensions of the crop region, relative to the video image. If no crop region has sl@0: been applied, the full dimensions of the video image will be returned. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvpcGetCropRegionL(TRect& aCropRegion) = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the video record controller sl@0: custom commands. sl@0: */ sl@0: class MMMFVideoControllerCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Gets the frame size of the clip. sl@0: sl@0: @param aVideoFrameSize sl@0: The frame size, in pixels. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvcGetVideoFrameSizeL(TSize& aVideoFrameSize)=0; sl@0: sl@0: /** sl@0: Gets the audio type. sl@0: sl@0: @param aCodec sl@0: The FourCC of the audio codec. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvcGetAudioCodecL(TFourCC& aCodec)=0; sl@0: sl@0: /** sl@0: Gets the video bit rate. sl@0: sl@0: @param aBitRate sl@0: The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies sl@0: a variable bit rate. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvcGetVideoBitRateL(TInt& aBitRate)=0; sl@0: sl@0: /** sl@0: Gets the audio bit rate. sl@0: sl@0: @param aBitRate sl@0: The bit rate of the audio stream. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvcGetAudioBitRateL(TInt& aBitRate)=0; sl@0: sl@0: /** sl@0: Sets the frame rate of the clip. sl@0: sl@0: @param aFramesPerSecond sl@0: The number of frames per second. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvcSetFrameRateL(TReal32 aFramesPerSecond)=0; sl@0: sl@0: /** sl@0: Gets the frame rate of the clip. sl@0: sl@0: @param aFramesPerSecond sl@0: The number of frames per second, filled in by the controller plugin. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvcGetFrameRateL(TReal32& aFramesPerSecond)=0; sl@0: sl@0: /** sl@0: Gets the supported sink video types. sl@0: sl@0: @param aMimeType sl@0: The supported data types. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: virtual void MvcGetVideoMimeTypeL(TDes8& aMimeType)=0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support sl@0: video controller commands. sl@0: sl@0: The controller plugin must be derived from MMMFVideoControllerCustomCommandImplementor sl@0: to use this class. sl@0: sl@0: The controller plugin should create an object of this type and add it to the list of custom sl@0: command parsers in the controller framework. See the following example code for details. sl@0: sl@0: @code sl@0: void CMMFAudioController::ConstructL() sl@0: { sl@0: // Construct custom command parsers sl@0: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audPlayDevParser); sl@0: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audPlayDevParser sl@0: sl@0: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); sl@0: CleanupStack::PushL(audRecDevParser); sl@0: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework sl@0: CleanupStack::Pop();//audRecDevParser sl@0: sl@0: etc. sl@0: } sl@0: @endcode sl@0: sl@0: @since 7.0s sl@0: sl@0: */ sl@0: class CMMFVideoControllerCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling video controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFVideoControllerCustomCommandParser* NewL(MMMFVideoControllerCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFVideoControllerCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFVideoControllerCustomCommandParser(MMMFVideoControllerCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoGetAudioCodecL(TMMFMessage& aMessage); sl@0: sl@0: TBool DoGetAudioBitRateL(TMMFMessage& aMessage); sl@0: TBool DoGetVideoBitRateL(TMMFMessage& aMessage); sl@0: TBool DoGetVideoFrameSizeL(TMMFMessage& aMessage); sl@0: TBool DoSetFrameRateL(TMMFMessage& aMessage); sl@0: TBool DoGetFrameRateL(TMMFMessage& aMessage); sl@0: TBool DoGetVideoMimeTypeL(TMMFMessage& aMessage); sl@0: private: sl@0: /** sl@0: The object that implements the video record controller interface sl@0: */ sl@0: MMMFVideoControllerCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support video play sl@0: controller commands. sl@0: sl@0: The controller plugin must be derived from MMMFVideoPlayControllerCustomCommandImplementor to use sl@0: this class. The controller plugin should create an object of this type and add it to the list of sl@0: custom command parsers in the controller framework. sl@0: */ sl@0: class CMMFVideoPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling video controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFVideoPlayControllerCustomCommandParser* NewL(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFVideoPlayControllerCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFVideoPlayControllerCustomCommandParser(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoRequestFrameL(TMMFMessage& aMessage); sl@0: TBool DoGetFrameL(TMMFMessage& aMessage); sl@0: TBool DoSetDisplayWindowL(TMMFMessage& aMessage); sl@0: TBool DoUpdateDisplayRegionL(TMMFMessage& aMessage); sl@0: TBool DoGetAudioEnabledL(TMMFMessage& aMessage); sl@0: TBool DoDirectScreenAccessEventL(TMMFMessage& aMessage); sl@0: TBool DoPlayL(TMMFMessage& aMessage); sl@0: TBool DoRefreshFrameL(TMMFMessage& aMessage); sl@0: TBool DoGetLoadingProgressL(TMMFMessage& aMessage); sl@0: TBool DoPrepareL(TMMFMessage& aMessage); sl@0: TBool DoSetRotationL(TMMFMessage& aMessage); sl@0: TBool DoGetRotationL(TMMFMessage& aMessage); sl@0: TBool DoSetScaleFactorL(TMMFMessage& aMessage); sl@0: TBool DoGetScaleFactorL(TMMFMessage& aMessage); sl@0: TBool DoSetCropRegionL(TMMFMessage& aMessage); sl@0: TBool DoGetCropRegionL(TMMFMessage& aMessage); sl@0: sl@0: sl@0: private: sl@0: /** sl@0: The object that implements the video record controller interface sl@0: */ sl@0: MMMFVideoPlayControllerCustomCommandImplementor& iImplementor; sl@0: CMMFVideoFrameMessage* iVideoFrameMessage; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support video record sl@0: controller commands. sl@0: sl@0: The controller plugin must be derived from MMMFVideoRecordControllerCustomCommandImplementor to use sl@0: this class. The controller plugin should create an object of this type and add it to the list of sl@0: custom command parsers in the controller framework. sl@0: */ sl@0: class CMMFVideoRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling video controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFVideoRecordControllerCustomCommandParser* NewL(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFVideoRecordControllerCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFVideoRecordControllerCustomCommandParser(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetVideoFormatL(TMMFMessage& aMessage); sl@0: TBool DoSetAudioBitRateL(TMMFMessage& aMessage); sl@0: TBool DoSetVideoBitRateL(TMMFMessage& aMessage); sl@0: TBool DoSetVideoCodecL(TMMFMessage& aMessage); sl@0: TBool DoSetAudioCodecL(TMMFMessage& aMessage); sl@0: TBool DoAddMetaDataEntryL(TMMFMessage& aMessage); sl@0: TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage); sl@0: TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage); sl@0: TBool DoSetMaxFileSizeL(TMMFMessage& aMessage); sl@0: TBool DoSetAudioEnabledL(TMMFMessage& aMessage); sl@0: TBool DoSetVideoFrameSizeL(TMMFMessage& aMessage); sl@0: TBool DoPrepareL(TMMFMessage& aMessage); sl@0: TBool DoSetCameraHandleL(TMMFMessage& aMessage); sl@0: TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage); sl@0: sl@0: TBool DoGetSupportedSinkAudioTypesL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedSinkVideoTypesL(TMMFMessage& aMessage); sl@0: sl@0: TInt32 DoCreateBufFromCDesC8ArrayL(CDesC8Array& aArray); sl@0: TBool DoCopyCDesC8ArrayDataL(TMMFMessage& aMessage); sl@0: sl@0: TBool DoCopyFourCCArrayDataL(TMMFMessage& aMessage); sl@0: void DoCreateBufFromFourCCArrayL(RArray& aArray); sl@0: TBool DoGetAudioEnabledL(TMMFMessage& aMessage); // (INC23777) sl@0: sl@0: private: sl@0: /** sl@0: The object that implements the video record controller interface sl@0: */ sl@0: MMMFVideoRecordControllerCustomCommandImplementor& iImplementor; sl@0: CBufFlat* iDataCopyBuffer; sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to allow the client to specify DRM Intent. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFVideoDRMExtCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFVideoDRMExtCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Gets a frame previously requested from the controller. sl@0: sl@0: @param aBitmap sl@0: The handle of bitmap to retrieve frame to. sl@0: @param aIntent sl@0: The DRM Intent to pass in. sl@0: @param aStatus sl@0: The active object to call back on. sl@0: */ sl@0: IMPORT_C void GetFrame(CFbsBitmap& aBitmap, ContentAccess::TIntent aIntent, TRequestStatus& aStatus); sl@0: sl@0: private: sl@0: TPckgBuf iConfigPackage; sl@0: TPckgBuf iIntentPackage; sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the DRM Intent sl@0: custom commands. sl@0: */ sl@0: class MMMFVideoDRMExtCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Gets a frame previously requested from the controller. sl@0: sl@0: @param aVideoFrame sl@0: The callback interface to allow the caller to retrieve a bitmap. sl@0: @param aIntent sl@0: The DRM Intent to supply. sl@0: */ sl@0: virtual void MvdeGetFrameL(MMMFVideoFrameMessage& aVideoFrame, ContentAccess::TIntent aIntent)=0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to provide DRM extensions to video controllers. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: */ sl@0: class CMMFVideoDRMExtCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of DRM Intent controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFVideoDRMExtCustomCommandParser* NewL(MMMFVideoDRMExtCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFVideoDRMExtCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: @since 7.0s sl@0: */ sl@0: CMMFVideoDRMExtCustomCommandParser(MMMFVideoDRMExtCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: sl@0: void DoGetFrameL(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: MMMFVideoDRMExtCustomCommandImplementor& iImplementor; sl@0: CMMFVideoFrameMessage* iVideoFrameMessage; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to allow the client to register notification . sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class RMMFResourceNotificationCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C RMMFResourceNotificationCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Registers the Event for Notification when resource is avaliable. sl@0: sl@0: @param aEventType sl@0: The Event to notify the client. sl@0: sl@0: @param aNotificationRegistrationData sl@0: Notification registration specific data. sl@0: sl@0: @return An error code indicating if the registration was successful. KErrNone on success, sl@0: otherwise another of the system-wide error codes. sl@0: */ sl@0: IMPORT_C TInt RegisterAsClient(TUid aEventType,const TDesC8& aNotificationRegistrationData); sl@0: sl@0: /** sl@0: Cancels the registered notification event. sl@0: sl@0: @param aEventType sl@0: The Event to notify the client. sl@0: sl@0: @return An error code indicating if the cancel registration was successful. KErrNone on success, sl@0: otherwise another of the system-wide error codes. sl@0: */ sl@0: IMPORT_C TInt CancelRegisterAsClient(TUid aEventType); sl@0: sl@0: /** sl@0: Gets the notification data for the event. sl@0: sl@0: @param aEventType sl@0: The Event to notify the client. sl@0: sl@0: @param aNotificationData sl@0: The Notification data for the client to resume the play. sl@0: sl@0: @return An error code indicating if the get notification data was successful. KErrNone on success, sl@0: otherwise another of the system-wide error codes. sl@0: */ sl@0: IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData); sl@0: sl@0: /** sl@0: Waits for the client to resume the play even after the default timer expires. sl@0: sl@0: @return An error code indicating if the registration was successful. KErrNone on success, sl@0: otherwise any of the system-wide error codes. sl@0: */ sl@0: IMPORT_C TInt WillResumePlay(); sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support the audio resource notification sl@0: custom commands. sl@0: */ sl@0: class MMMFResourceNotificationCustomCommandImplementor sl@0: { sl@0: public: sl@0: /** sl@0: Registers the Event for Notification when resource is available. sl@0: sl@0: @param aEventType sl@0: The event which the client is notified of. sl@0: sl@0: @param aNotificationRegistrationData sl@0: Notification registration specific data, which has been reserved for future use. sl@0: sl@0: @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no sl@0: data sink. sl@0: */ sl@0: virtual void MarnRegisterAsClientL(TUid aEventType,const TDesC8& aNotificationRegistrationData) = 0; sl@0: sl@0: /** sl@0: Cancels the registered notification event. sl@0: sl@0: @param aEventType sl@0: The event to cancel. sl@0: sl@0: @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no sl@0: data sink. sl@0: */ sl@0: virtual void MarnCancelRegisterAsClientL(TUid aEventType) = 0; sl@0: sl@0: /** sl@0: Gets the notification data for the event. sl@0: sl@0: @param aEventType sl@0: The event which the client is notified of. sl@0: sl@0: @param aNotificationData sl@0: The Notification data for the client to resume playing. sl@0: sl@0: @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no sl@0: data sink, KErrArgument if unable to provide the notification data. sl@0: */ sl@0: virtual void MarnGetResourceNotificationDataL(TUid aEventType,TDes8& aNotificationData) = 0; sl@0: sl@0: /** sl@0: Waits for the client to resume the play even after the default timer expires. sl@0: sl@0: @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no sl@0: data sink. sl@0: */ sl@0: virtual void MarnWillResumePlayL() = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Client class to provide Audio resource notification controllers. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: */ sl@0: class CMMFResourceNotificationCustomCommandParser: public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: /** sl@0: Creates a new custom command parser capable of handling resource notification controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFResourceNotificationCustomCommandParser* NewL(MMMFResourceNotificationCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFResourceNotificationCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: CMMFResourceNotificationCustomCommandParser(MMMFResourceNotificationCustomCommandImplementor& aImplementor); sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: // Internal request handling methods. sl@0: TBool DoRegisterAsClientL(TMMFMessage& aMessage); sl@0: TBool DoCancelRegisterAsClientL(TMMFMessage& aMessage); sl@0: TBool DoGetResourceNotificationDataL(TMMFMessage& aMessage); sl@0: TBool DoWillResumePlayL(TMMFMessage& aMessage); sl@0: private: sl@0: MMMFResourceNotificationCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: sl@0: sl@0: #endif