os/security/contentmgmt/contentaccessfwfordrm/inc/f32agentui.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 * This defines an interface used by the F32 Agent to display information on
    16 * the screen. The default implementation does nothing. Licensees wishing to allow the F32
    17 * agent to display information on the screen should replace this DLL with
    18 * a DLL that does display information on screen.
    19 *
    20 */
    21 
    22 
    23 /**
    24  @file
    25  @publishedPartner
    26  @released
    27 */
    28 
    29 #ifndef __F32AGENTUI_H__
    30 #define __F32AGENTUI_H__
    31 
    32 #include <e32base.h>
    33 
    34 class RFile;
    35 
    36 namespace ContentAccess
    37 	{
    38 	/** Interface that must be implemented in order for the F32 agent to display
    39 	information on the screen
    40 	*/
    41 	class CF32AgentUi : public CBase
    42 		{
    43 	public:
    44 		/** The implementation of this API will display a dialog asking the user to confirm deletion
    45 		of a file. The implementation will display the dialog if the appropriate setting,
    46 		TAgentProperty::EAgentPropertyAgentUI, has been set using CF32AgentUi::SetProperty, enabling 
    47 		the Agent UI. If the user selects to delete the file ETrue will be returned, EFalse if the 
    48 		file is not to be deleted. If the Agent UI is not enabled a default value of ETrue will be 
    49 		returned.
    50 						
    51 		The function should only return once the dialog has completed
    52 
    53 		@param aFileName The name of the file that is about to be deleted
    54 		@return Whether to delete the file
    55 		@return ETrue If the file is to be deleted 
    56 		@return EFalse If the file is not to be deleted
    57 		*/
    58 		virtual TBool ConfirmDeleteL(const TDesC& aFileName) = 0;	
    59 
    60 	
    61 		/** Display information describing the supplied file
    62 	
    63 		The file will already be open before calling this function.
    64 		The function should only return once the dialog has completed
    65 	
    66 		@param aInfo The information to display, from ContentAccess::TDisplayInfo
    67 		@param aFile The file to display
    68 		@return KErrNone or one of the system wide error codes
    69 		*/
    70 		virtual void DisplayInfoL(TInt aInfo, RFile& aFile) = 0;	
    71 	
    72 		/** The implementation of this API will action/remember Agent properties applicable to the Agent UI.
    73 		
    74 		Currently the F32 Agent only supports one UI property - TAgentProperty::EAgentPropertyAgentUI, 
    75 		enabling or disabling the Agent UI. The implementation of this function should store the property 
    76 		that has been set and subsequent requests to the interface should be dealt with in accordance
    77 		with these properties.
    78 		
    79 		@see CF32AgentUi::ConfirmDeleteL		
    80    	
    81    		The implementation will return KErrNone if the property has been set correctly or KErrCANotSupported 
    82    		if the property supplied is not supported.		
    83 				
    84 		@param aProperty The property to set, from ContentAccess::TAgentProperty
    85 		@param aValue The value of the property
    86 		@return Whether the property was set
    87 		@return KErrNone if the property was set correctly
    88 		@return KErrCANotSupported if the property is not supported
    89 		*/
    90 		virtual TInt SetProperty(TInt aProperty, TInt aValue) = 0;
    91 		};
    92 
    93 	/** Factory function that creates the F32 Agent UI 
    94 	@return a CF32AgentUi object 
    95 	*/
    96 	class TF32AgentUiFactory
    97 		{
    98 	public:
    99 		IMPORT_C static CF32AgentUi* CreateF32AgentUiL();
   100 		};
   101 	}
   102 
   103 
   104 
   105 #endif // __F32AGENTUI_H__