1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/contentmgmt/contentaccessfwfordrm/inc/f32agentui.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,105 @@
1.4 +/*
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 "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.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 +* This defines an interface used by the F32 Agent to display information on
1.19 +* the screen. The default implementation does nothing. Licensees wishing to allow the F32
1.20 +* agent to display information on the screen should replace this DLL with
1.21 +* a DLL that does display information on screen.
1.22 +*
1.23 +*/
1.24 +
1.25 +
1.26 +/**
1.27 + @file
1.28 + @publishedPartner
1.29 + @released
1.30 +*/
1.31 +
1.32 +#ifndef __F32AGENTUI_H__
1.33 +#define __F32AGENTUI_H__
1.34 +
1.35 +#include <e32base.h>
1.36 +
1.37 +class RFile;
1.38 +
1.39 +namespace ContentAccess
1.40 + {
1.41 + /** Interface that must be implemented in order for the F32 agent to display
1.42 + information on the screen
1.43 + */
1.44 + class CF32AgentUi : public CBase
1.45 + {
1.46 + public:
1.47 + /** The implementation of this API will display a dialog asking the user to confirm deletion
1.48 + of a file. The implementation will display the dialog if the appropriate setting,
1.49 + TAgentProperty::EAgentPropertyAgentUI, has been set using CF32AgentUi::SetProperty, enabling
1.50 + the Agent UI. If the user selects to delete the file ETrue will be returned, EFalse if the
1.51 + file is not to be deleted. If the Agent UI is not enabled a default value of ETrue will be
1.52 + returned.
1.53 +
1.54 + The function should only return once the dialog has completed
1.55 +
1.56 + @param aFileName The name of the file that is about to be deleted
1.57 + @return Whether to delete the file
1.58 + @return ETrue If the file is to be deleted
1.59 + @return EFalse If the file is not to be deleted
1.60 + */
1.61 + virtual TBool ConfirmDeleteL(const TDesC& aFileName) = 0;
1.62 +
1.63 +
1.64 + /** Display information describing the supplied file
1.65 +
1.66 + The file will already be open before calling this function.
1.67 + The function should only return once the dialog has completed
1.68 +
1.69 + @param aInfo The information to display, from ContentAccess::TDisplayInfo
1.70 + @param aFile The file to display
1.71 + @return KErrNone or one of the system wide error codes
1.72 + */
1.73 + virtual void DisplayInfoL(TInt aInfo, RFile& aFile) = 0;
1.74 +
1.75 + /** The implementation of this API will action/remember Agent properties applicable to the Agent UI.
1.76 +
1.77 + Currently the F32 Agent only supports one UI property - TAgentProperty::EAgentPropertyAgentUI,
1.78 + enabling or disabling the Agent UI. The implementation of this function should store the property
1.79 + that has been set and subsequent requests to the interface should be dealt with in accordance
1.80 + with these properties.
1.81 +
1.82 + @see CF32AgentUi::ConfirmDeleteL
1.83 +
1.84 + The implementation will return KErrNone if the property has been set correctly or KErrCANotSupported
1.85 + if the property supplied is not supported.
1.86 +
1.87 + @param aProperty The property to set, from ContentAccess::TAgentProperty
1.88 + @param aValue The value of the property
1.89 + @return Whether the property was set
1.90 + @return KErrNone if the property was set correctly
1.91 + @return KErrCANotSupported if the property is not supported
1.92 + */
1.93 + virtual TInt SetProperty(TInt aProperty, TInt aValue) = 0;
1.94 + };
1.95 +
1.96 + /** Factory function that creates the F32 Agent UI
1.97 + @return a CF32AgentUi object
1.98 + */
1.99 + class TF32AgentUiFactory
1.100 + {
1.101 + public:
1.102 + IMPORT_C static CF32AgentUi* CreateF32AgentUiL();
1.103 + };
1.104 + }
1.105 +
1.106 +
1.107 +
1.108 +#endif // __F32AGENTUI_H__