epoc32/include/caf/f32agentui.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 
    25 /**
    26  @file
    27  @publishedPartner
    28  @released
    29 */
    30 
    31 #ifndef __F32AGENTUI_H__
    32 #define __F32AGENTUI_H__
    33 
    34 #include <e32base.h>
    35 
    36 class RFile;
    37 
    38 namespace ContentAccess
    39 	{
    40 	/** Interface that must be implemented in order for the F32 agent to display
    41 	information on the screen
    42 	*/
    43 	class CF32AgentUi : public CBase
    44 		{
    45 	public:
    46 		/** The implementation of this API will display a dialog asking the user to confirm deletion
    47 		of a file. The implementation will display the dialog if the appropriate setting,
    48 		TAgentProperty::EAgentPropertyAgentUI, has been set using CF32AgentUi::SetProperty, enabling 
    49 		the Agent UI. If the user selects to delete the file ETrue will be returned, EFalse if the 
    50 		file is not to be deleted. If the Agent UI is not enabled a default value of ETrue will be 
    51 		returned.
    52 						
    53 		The function should only return once the dialog has completed
    54 
    55 		@param aFileName The name of the file that is about to be deleted
    56 		@return Whether to delete the file
    57 		@return ETrue If the file is to be deleted 
    58 		@return EFalse If the file is not to be deleted
    59 		*/
    60 		virtual TBool ConfirmDeleteL(const TDesC& aFileName) = 0;	
    61 
    62 	
    63 		/** Display information describing the supplied file
    64 	
    65 		The file will already be open before calling this function.
    66 		The function should only return once the dialog has completed
    67 	
    68 		@param aInfo The information to display, from ContentAccess::TDisplayInfo
    69 		@param aFile The file to display
    70 		@return KErrNone or one of the system wide error codes
    71 		*/
    72 		virtual void DisplayInfoL(TInt aInfo, RFile& aFile) = 0;	
    73 	
    74 		/** The implementation of this API will action/remember Agent properties applicable to the Agent UI.
    75 		
    76 		Currently the F32 Agent only supports one UI property - TAgentProperty::EAgentPropertyAgentUI, 
    77 		enabling or disabling the Agent UI. The implementation of this function should store the property 
    78 		that has been set and subsequent requests to the interface should be dealt with in accordance
    79 		with these properties.
    80 		
    81 		@see CF32AgentUi::ConfirmDeleteL		
    82    	
    83    		The implementation will return KErrNone if the property has been set correctly or KErrCANotSupported 
    84    		if the property supplied is not supported.		
    85 				
    86 		@param aProperty The property to set, from ContentAccess::TAgentProperty
    87 		@param aValue The value of the property
    88 		@return Whether the property was set
    89 		@return KErrNone if the property was set correctly
    90 		@return KErrCANotSupported if the property is not supported
    91 		*/
    92 		virtual TInt SetProperty(TInt aProperty, TInt aValue) = 0;
    93 		};
    94 
    95 	/** Factory function that creates the F32 Agent UI 
    96 	@return a CF32AgentUi object 
    97 	*/
    98 	class TF32AgentUiFactory
    99 		{
   100 	public:
   101 		IMPORT_C static CF32AgentUi* CreateF32AgentUiL();
   102 		};
   103 	}
   104 
   105 
   106 
   107 #endif // __F32AGENTUI_H__