sl@0: // Copyright (c) 2004-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 __MMF_DRM_CUSTOM_COMMANDS_H__ sl@0: #define __MMF_DRM_CUSTOM_COMMANDS_H__ sl@0: sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS sl@0: #include sl@0: #endif sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFDRMControl = {0x101F7D8D}; sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Mixin class to be derived from by controller plugins wishing to support the DRM Intent sl@0: custom commands. sl@0: */ sl@0: class MMMFDRMCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Disable the automatic (controller specified) execution of intent sl@0: sl@0: @param aIntent sl@0: The intent to execute sl@0: sl@0: */ sl@0: virtual TInt MdcDisableAutomaticIntent(TBool aDisableAutoIntent)=0; sl@0: sl@0: sl@0: /** sl@0: Executes a particular intent sl@0: sl@0: @param aIntent sl@0: The intent to execute sl@0: sl@0: */ sl@0: virtual TInt MdcExecuteIntent(ContentAccess::TIntent aIntent)=0; sl@0: sl@0: /** sl@0: Evaluate a particular intent sl@0: sl@0: @param aIntent sl@0: The intent to evaluate sl@0: sl@0: */ sl@0: virtual TInt MdcEvaluateIntent(ContentAccess::TIntent aIntent)=0; sl@0: sl@0: /** sl@0: sl@0: sl@0: */ sl@0: virtual TInt MdcSetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)=0; sl@0: }; sl@0: sl@0: class CMMFDRMCustomCommandParser : 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 CMMFDRMCustomCommandParser* NewL(MMMFDRMCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFDRMCustomCommandParser(); 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: CMMFDRMCustomCommandParser(MMMFDRMCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: void DoEvaluateIntentL(TMMFMessage& aMessage); sl@0: void DoExecuteIntentL(TMMFMessage& aMessage); sl@0: void DoDisableAutomaticIntentL(TMMFMessage& aMessage); sl@0: void DoSetAgentPropertyL(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: MMMFDRMCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedAll sl@0: @released sl@0: sl@0: Generic Mixin class to be used by a client utility wishing to pass DRM Intent sl@0: custom commands to a controller plugin. sl@0: */ sl@0: class MMMFDRMCustomCommand sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Disable the automatic (controller specified) execution of intent sl@0: sl@0: @param aIntent sl@0: The intent to execute sl@0: sl@0: */ sl@0: virtual TInt DisableAutomaticIntent(TBool aDisableAutoIntent)=0; sl@0: sl@0: sl@0: /** sl@0: Executes a particular intent sl@0: sl@0: @param aIntent sl@0: The intent to execute sl@0: sl@0: */ sl@0: virtual TInt ExecuteIntent(ContentAccess::TIntent aIntent)=0; sl@0: sl@0: /** sl@0: Evaluate a particular intent sl@0: sl@0: @param aIntent sl@0: The intent to evaluate sl@0: sl@0: */ sl@0: virtual TInt EvaluateIntent(ContentAccess::TIntent aIntent)=0; sl@0: sl@0: /** sl@0: sl@0: sl@0: */ sl@0: virtual TInt SetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)=0; sl@0: }; sl@0: sl@0: class RMMFDRMCustomCommands : public RMMFCustomCommandsBase, sl@0: public MMMFDRMCustomCommand 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: */ sl@0: IMPORT_C RMMFDRMCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: */ sl@0: IMPORT_C TInt DisableAutomaticIntent(TBool aBool); sl@0: sl@0: /** sl@0: */ sl@0: IMPORT_C TInt EvaluateIntent(ContentAccess::TIntent aIntent); sl@0: sl@0: /** sl@0: */ sl@0: IMPORT_C TInt ExecuteIntent(ContentAccess::TIntent aIntent); sl@0: sl@0: /** sl@0: */ sl@0: IMPORT_C TInt SetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue); sl@0: sl@0: /** sl@0: */ sl@0: IMPORT_C TBool IsSupported(); sl@0: sl@0: }; sl@0: sl@0: sl@0: #endif // __MMF_DRM_CUSTOM_COMMANDS_H__