1.1 --- a/epoc32/include/mmf/common/mmfdrmcustomcommands.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,228 +0,0 @@
1.4 -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// 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
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -#ifndef __MMF_DRM_CUSTOM_COMMANDS_H__
1.20 -#define __MMF_DRM_CUSTOM_COMMANDS_H__
1.21 -
1.22 -
1.23 -#include <e32base.h>
1.24 -#include <mmf/common/mmcaf.h>
1.25 -#include <mmf/common/mmfstandardcustomcommands.h>
1.26 -
1.27 -
1.28 -/**
1.29 -@publishedAll
1.30 -@released
1.31 -*/
1.32 -const TUid KUidInterfaceMMFDRMControl = {0x101F7D8D};
1.33 -
1.34 -/**
1.35 -@internalComponent
1.36 -*/
1.37 -enum TMMFDRMControlMessages
1.38 - {
1.39 - EMMFDRMControlEvaluateIntent,
1.40 - EMMFDRMControlExecuteIntent,
1.41 - EMMFDRMControlDisableAutomaticIntent,
1.42 - EMMFDRMControlSetAgentProperty,
1.43 - EMMFDRMControlIsSupported
1.44 - };
1.45 -
1.46 -
1.47 -/**
1.48 -@publishedAll
1.49 -@released
1.50 -
1.51 -Mixin class to be derived from by controller plugins wishing to support the DRM Intent
1.52 -custom commands.
1.53 -*/
1.54 -class MMMFDRMCustomCommandImplementor
1.55 - {
1.56 -public:
1.57 -
1.58 - /**
1.59 - Disable the automatic (controller specified) execution of intent
1.60 -
1.61 - @param aIntent
1.62 - The intent to execute
1.63 -
1.64 - */
1.65 - virtual TInt MdcDisableAutomaticIntent(TBool aDisableAutoIntent)=0;
1.66 -
1.67 -
1.68 - /**
1.69 - Executes a particular intent
1.70 -
1.71 - @param aIntent
1.72 - The intent to execute
1.73 -
1.74 - */
1.75 - virtual TInt MdcExecuteIntent(ContentAccess::TIntent aIntent)=0;
1.76 -
1.77 - /**
1.78 - Evaluate a particular intent
1.79 -
1.80 - @param aIntent
1.81 - The intent to evaluate
1.82 -
1.83 - */
1.84 - virtual TInt MdcEvaluateIntent(ContentAccess::TIntent aIntent)=0;
1.85 -
1.86 - /**
1.87 -
1.88 -
1.89 - */
1.90 - virtual TInt MdcSetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)=0;
1.91 - };
1.92 -
1.93 -class CMMFDRMCustomCommandParser : public CMMFCustomCommandParserBase
1.94 - {
1.95 -public:
1.96 -
1.97 - /**
1.98 - Creates a new custom command parser capable of DRM Intent controller commands.
1.99 -
1.100 - @param aImplementor
1.101 - A reference to the controller plugin that owns this new object.
1.102 -
1.103 - @return A pointer to the object created.
1.104 -
1.105 - @since 7.0s
1.106 - */
1.107 - IMPORT_C static CMMFDRMCustomCommandParser* NewL(MMMFDRMCustomCommandImplementor& aImplementor);
1.108 -
1.109 - /**
1.110 - Destructor.
1.111 -
1.112 - @since 7.0s
1.113 - */
1.114 - IMPORT_C ~CMMFDRMCustomCommandParser();
1.115 -
1.116 - /**
1.117 - Handles a request from the client. Called by the controller framework.
1.118 -
1.119 - @param aMessage
1.120 - The message to be handled.
1.121 -
1.122 - @since 7.0s
1.123 - */
1.124 - void HandleRequest(TMMFMessage& aMessage);
1.125 -
1.126 -private:
1.127 - /**
1.128 - Constructor.
1.129 -
1.130 - @param aImplementor
1.131 - A reference to the controller plugin that owns this new object.
1.132 - @since 7.0s
1.133 - */
1.134 - CMMFDRMCustomCommandParser(MMMFDRMCustomCommandImplementor& aImplementor);
1.135 - // Internal request handling methods.
1.136 -
1.137 - void DoHandleRequestL(TMMFMessage& aMessage);
1.138 - void DoEvaluateIntentL(TMMFMessage& aMessage);
1.139 - void DoExecuteIntentL(TMMFMessage& aMessage);
1.140 - void DoDisableAutomaticIntentL(TMMFMessage& aMessage);
1.141 - void DoSetAgentPropertyL(TMMFMessage& aMessage);
1.142 -
1.143 -private:
1.144 - MMMFDRMCustomCommandImplementor& iImplementor;
1.145 - };
1.146 -
1.147 -
1.148 -/**
1.149 -@publishedAll
1.150 -@released
1.151 -
1.152 -Generic Mixin class to be used by a client utility wishing to pass DRM Intent
1.153 -custom commands to a controller plugin.
1.154 -*/
1.155 -class MMMFDRMCustomCommand
1.156 - {
1.157 -public:
1.158 -
1.159 - /**
1.160 - Disable the automatic (controller specified) execution of intent
1.161 -
1.162 - @param aIntent
1.163 - The intent to execute
1.164 -
1.165 - */
1.166 - virtual TInt DisableAutomaticIntent(TBool aDisableAutoIntent)=0;
1.167 -
1.168 -
1.169 - /**
1.170 - Executes a particular intent
1.171 -
1.172 - @param aIntent
1.173 - The intent to execute
1.174 -
1.175 - */
1.176 - virtual TInt ExecuteIntent(ContentAccess::TIntent aIntent)=0;
1.177 -
1.178 - /**
1.179 - Evaluate a particular intent
1.180 -
1.181 - @param aIntent
1.182 - The intent to evaluate
1.183 -
1.184 - */
1.185 - virtual TInt EvaluateIntent(ContentAccess::TIntent aIntent)=0;
1.186 -
1.187 - /**
1.188 -
1.189 -
1.190 - */
1.191 - virtual TInt SetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)=0;
1.192 - };
1.193 -
1.194 -class RMMFDRMCustomCommands : public RMMFCustomCommandsBase,
1.195 - public MMMFDRMCustomCommand
1.196 - {
1.197 -public:
1.198 -
1.199 - /**
1.200 - Constructor.
1.201 -
1.202 - @param aController
1.203 - The client side controller object to be used by this custom command interface.
1.204 -
1.205 - */
1.206 - IMPORT_C RMMFDRMCustomCommands(RMMFController& aController);
1.207 -
1.208 - /**
1.209 - */
1.210 - IMPORT_C TInt DisableAutomaticIntent(TBool aBool);
1.211 -
1.212 - /**
1.213 - */
1.214 - IMPORT_C TInt EvaluateIntent(ContentAccess::TIntent aIntent);
1.215 -
1.216 - /**
1.217 - */
1.218 - IMPORT_C TInt ExecuteIntent(ContentAccess::TIntent aIntent);
1.219 -
1.220 - /**
1.221 - */
1.222 - IMPORT_C TInt SetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue);
1.223 -
1.224 - /**
1.225 - */
1.226 - IMPORT_C TBool IsSupported();
1.227 -
1.228 - };
1.229 -
1.230 -
1.231 -#endif // __MMF_DRM_CUSTOM_COMMANDS_H__