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