williamr@2: /* williamr@2: * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * This defines an interface used by the F32 Agent to display information on williamr@2: * the screen. The default implementation does nothing. Licensees wishing to allow the F32 williamr@2: * agent to display information on the screen should replace this DLL with williamr@2: * a DLL that does display information on screen. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef __F32AGENTUI_H__ williamr@2: #define __F32AGENTUI_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: class RFile; williamr@2: williamr@2: namespace ContentAccess williamr@2: { williamr@2: /** Interface that must be implemented in order for the F32 agent to display williamr@2: information on the screen williamr@2: */ williamr@2: class CF32AgentUi : public CBase williamr@2: { williamr@2: public: williamr@2: /** The implementation of this API will display a dialog asking the user to confirm deletion williamr@2: of a file. The implementation will display the dialog if the appropriate setting, williamr@2: TAgentProperty::EAgentPropertyAgentUI, has been set using CF32AgentUi::SetProperty, enabling williamr@2: the Agent UI. If the user selects to delete the file ETrue will be returned, EFalse if the williamr@2: file is not to be deleted. If the Agent UI is not enabled a default value of ETrue will be williamr@2: returned. williamr@2: williamr@2: The function should only return once the dialog has completed williamr@2: williamr@2: @param aFileName The name of the file that is about to be deleted williamr@2: @return Whether to delete the file williamr@2: @return ETrue If the file is to be deleted williamr@2: @return EFalse If the file is not to be deleted williamr@2: */ williamr@2: virtual TBool ConfirmDeleteL(const TDesC& aFileName) = 0; williamr@2: williamr@2: williamr@2: /** Display information describing the supplied file williamr@2: williamr@2: The file will already be open before calling this function. williamr@2: The function should only return once the dialog has completed williamr@2: williamr@2: @param aInfo The information to display, from ContentAccess::TDisplayInfo williamr@2: @param aFile The file to display williamr@2: @return KErrNone or one of the system wide error codes williamr@2: */ williamr@2: virtual void DisplayInfoL(TInt aInfo, RFile& aFile) = 0; williamr@2: williamr@2: /** The implementation of this API will action/remember Agent properties applicable to the Agent UI. williamr@2: williamr@2: Currently the F32 Agent only supports one UI property - TAgentProperty::EAgentPropertyAgentUI, williamr@2: enabling or disabling the Agent UI. The implementation of this function should store the property williamr@2: that has been set and subsequent requests to the interface should be dealt with in accordance williamr@2: with these properties. williamr@2: williamr@2: @see CF32AgentUi::ConfirmDeleteL williamr@2: williamr@2: The implementation will return KErrNone if the property has been set correctly or KErrCANotSupported williamr@2: if the property supplied is not supported. williamr@2: williamr@2: @param aProperty The property to set, from ContentAccess::TAgentProperty williamr@2: @param aValue The value of the property williamr@2: @return Whether the property was set williamr@2: @return KErrNone if the property was set correctly williamr@2: @return KErrCANotSupported if the property is not supported williamr@2: */ williamr@2: virtual TInt SetProperty(TInt aProperty, TInt aValue) = 0; williamr@2: }; williamr@2: williamr@2: /** Factory function that creates the F32 Agent UI williamr@2: @return a CF32AgentUi object williamr@2: */ williamr@2: class TF32AgentUiFactory williamr@2: { williamr@2: public: williamr@2: IMPORT_C static CF32AgentUi* CreateF32AgentUiL(); williamr@2: }; williamr@2: } williamr@2: williamr@2: williamr@2: williamr@2: #endif // __F32AGENTUI_H__