1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MMF_DRM_CUSTOM_COMMANDS_H__
17 #define __MMF_DRM_CUSTOM_COMMANDS_H__
21 #include <mmf/common/mmcaf.h>
22 #include <mmf/common/mmfstandardcustomcommands.h>
29 const TUid KUidInterfaceMMFDRMControl = {0x101F7D8D};
34 enum TMMFDRMControlMessages
36 EMMFDRMControlEvaluateIntent,
37 EMMFDRMControlExecuteIntent,
38 EMMFDRMControlDisableAutomaticIntent,
39 EMMFDRMControlSetAgentProperty,
40 EMMFDRMControlIsSupported
48 Mixin class to be derived from by controller plugins wishing to support the DRM Intent
51 class MMMFDRMCustomCommandImplementor
56 Disable the automatic (controller specified) execution of intent
62 virtual TInt MdcDisableAutomaticIntent(TBool aDisableAutoIntent)=0;
66 Executes a particular intent
72 virtual TInt MdcExecuteIntent(ContentAccess::TIntent aIntent)=0;
75 Evaluate a particular intent
78 The intent to evaluate
81 virtual TInt MdcEvaluateIntent(ContentAccess::TIntent aIntent)=0;
87 virtual TInt MdcSetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)=0;
90 class CMMFDRMCustomCommandParser : public CMMFCustomCommandParserBase
95 Creates a new custom command parser capable of DRM Intent controller commands.
98 A reference to the controller plugin that owns this new object.
100 @return A pointer to the object created.
104 IMPORT_C static CMMFDRMCustomCommandParser* NewL(MMMFDRMCustomCommandImplementor& aImplementor);
111 IMPORT_C ~CMMFDRMCustomCommandParser();
114 Handles a request from the client. Called by the controller framework.
117 The message to be handled.
121 void HandleRequest(TMMFMessage& aMessage);
128 A reference to the controller plugin that owns this new object.
131 CMMFDRMCustomCommandParser(MMMFDRMCustomCommandImplementor& aImplementor);
132 // Internal request handling methods.
134 void DoHandleRequestL(TMMFMessage& aMessage);
135 void DoEvaluateIntentL(TMMFMessage& aMessage);
136 void DoExecuteIntentL(TMMFMessage& aMessage);
137 void DoDisableAutomaticIntentL(TMMFMessage& aMessage);
138 void DoSetAgentPropertyL(TMMFMessage& aMessage);
141 MMMFDRMCustomCommandImplementor& iImplementor;
149 Generic Mixin class to be used by a client utility wishing to pass DRM Intent
150 custom commands to a controller plugin.
152 class MMMFDRMCustomCommand
157 Disable the automatic (controller specified) execution of intent
160 The intent to execute
163 virtual TInt DisableAutomaticIntent(TBool aDisableAutoIntent)=0;
167 Executes a particular intent
170 The intent to execute
173 virtual TInt ExecuteIntent(ContentAccess::TIntent aIntent)=0;
176 Evaluate a particular intent
179 The intent to evaluate
182 virtual TInt EvaluateIntent(ContentAccess::TIntent aIntent)=0;
188 virtual TInt SetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)=0;
191 class RMMFDRMCustomCommands : public RMMFCustomCommandsBase,
192 public MMMFDRMCustomCommand
200 The client side controller object to be used by this custom command interface.
203 IMPORT_C RMMFDRMCustomCommands(RMMFController& aController);
207 IMPORT_C TInt DisableAutomaticIntent(TBool aBool);
211 IMPORT_C TInt EvaluateIntent(ContentAccess::TIntent aIntent);
215 IMPORT_C TInt ExecuteIntent(ContentAccess::TIntent aIntent);
219 IMPORT_C TInt SetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue);
223 IMPORT_C TBool IsSupported();
228 #endif // __MMF_DRM_CUSTOM_COMMANDS_H__