First public contribution.
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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MMF_DRM_CUSTOM_COMMANDS_H__
17 #define __MMF_DRM_CUSTOM_COMMANDS_H__
21 #include <mmf/common/mmcaf.h>
22 #include <mmf/common/mmfstandardcustomcommands.h>
24 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
25 #include <mmf/common/mmfdrmcustomcommandsenum.h>
32 const TUid KUidInterfaceMMFDRMControl = {0x101F7D8D};
38 Mixin class to be derived from by controller plugins wishing to support the DRM Intent
41 class MMMFDRMCustomCommandImplementor
46 Disable the automatic (controller specified) execution of intent
52 virtual TInt MdcDisableAutomaticIntent(TBool aDisableAutoIntent)=0;
56 Executes a particular intent
62 virtual TInt MdcExecuteIntent(ContentAccess::TIntent aIntent)=0;
65 Evaluate a particular intent
68 The intent to evaluate
71 virtual TInt MdcEvaluateIntent(ContentAccess::TIntent aIntent)=0;
77 virtual TInt MdcSetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)=0;
80 class CMMFDRMCustomCommandParser : public CMMFCustomCommandParserBase
85 Creates a new custom command parser capable of DRM Intent controller commands.
88 A reference to the controller plugin that owns this new object.
90 @return A pointer to the object created.
94 IMPORT_C static CMMFDRMCustomCommandParser* NewL(MMMFDRMCustomCommandImplementor& aImplementor);
101 IMPORT_C ~CMMFDRMCustomCommandParser();
104 Handles a request from the client. Called by the controller framework.
107 The message to be handled.
111 void HandleRequest(TMMFMessage& aMessage);
118 A reference to the controller plugin that owns this new object.
121 CMMFDRMCustomCommandParser(MMMFDRMCustomCommandImplementor& aImplementor);
122 // Internal request handling methods.
124 void DoHandleRequestL(TMMFMessage& aMessage);
125 void DoEvaluateIntentL(TMMFMessage& aMessage);
126 void DoExecuteIntentL(TMMFMessage& aMessage);
127 void DoDisableAutomaticIntentL(TMMFMessage& aMessage);
128 void DoSetAgentPropertyL(TMMFMessage& aMessage);
131 MMMFDRMCustomCommandImplementor& iImplementor;
139 Generic Mixin class to be used by a client utility wishing to pass DRM Intent
140 custom commands to a controller plugin.
142 class MMMFDRMCustomCommand
147 Disable the automatic (controller specified) execution of intent
150 The intent to execute
153 virtual TInt DisableAutomaticIntent(TBool aDisableAutoIntent)=0;
157 Executes a particular intent
160 The intent to execute
163 virtual TInt ExecuteIntent(ContentAccess::TIntent aIntent)=0;
166 Evaluate a particular intent
169 The intent to evaluate
172 virtual TInt EvaluateIntent(ContentAccess::TIntent aIntent)=0;
178 virtual TInt SetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)=0;
181 class RMMFDRMCustomCommands : public RMMFCustomCommandsBase,
182 public MMMFDRMCustomCommand
190 The client side controller object to be used by this custom command interface.
193 IMPORT_C RMMFDRMCustomCommands(RMMFController& aController);
197 IMPORT_C TInt DisableAutomaticIntent(TBool aBool);
201 IMPORT_C TInt EvaluateIntent(ContentAccess::TIntent aIntent);
205 IMPORT_C TInt ExecuteIntent(ContentAccess::TIntent aIntent);
209 IMPORT_C TInt SetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue);
213 IMPORT_C TBool IsSupported();
218 #endif // __MMF_DRM_CUSTOM_COMMANDS_H__