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