diff -r f5050f1da672 -r 04becd199f91 javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingshandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingshandler.h Tue Apr 27 16:30:29 2010 +0300 @@ -0,0 +1,184 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Defines class for handling SNAP selection and read/write functions +* +*/ + + +#ifndef APPMNGR2MIDLETSETTINGSHANDLER_H +#define APPMNGR2MIDLETSETTINGSHANDLER_H + +// INCLUDES +#include +#include +#include + +#include "javastorage.h" +#include "javauid.h" // Uid. +#include "appmngr2midletsettingsutil.h" + +// FORWARD DECLARATIONS +// CONSTANTS + +// CLASS DECLARATION +class CAppMngr2MidletResourceHandler; + +/** +* CAppMngr2MidletSettingsHandler +* +* CAppMngr2MidletSettingsHandler is used for getting/setting midlet suite settings +* (access point, on screen keypad and permissions) +* +* @since S60 v9.2 +* +*/ +class CAppMngr2MidletSettingsHandler : public CBase +{ +public: + + /** + * Two-phased constructor. + */ + static CAppMngr2MidletSettingsHandler* NewL(const TDesC& aMidletSuiteName,TUid aMidletSuiteUid, CAppMngr2MidletResourceHandler& aResourceHandler); + + /** + * Destructor. + */ + ~CAppMngr2MidletSettingsHandler(); + +private: + /** + * C++ default constructor. + */ + CAppMngr2MidletSettingsHandler(CAppMngr2MidletResourceHandler& aResourceHandler); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(const TDesC& aMidletSuiteName,TUid aMidletSuiteUid); + +public: + + /** + * Gets destination network info. + * @return Destination network name and id + */ + CAppMngr2SuiteSnapItem* GetSnapL(); + + /** + * Set destination network to store. + * @param aItem Includes destination network name and id + */ + void SetSnapL(const CAppMngr2SuiteSnapItem& aItem); + + /** + * Gets on-screen keyboard custom attribute for the selected MIDlet + * @return Value of the on-screen attribute (ON_SCREEN_KEYPAD_VALUE_NO, + * ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS, or + * ON_SCREEN_KEYPAD_VALUE_NAVIGATION) + * @see appmngr2midletconstants.h + */ + const std::wstring GetOnScreenKeypadValueL(); + + /** + * Sets on-screen keyboard custom attribute for the selected MIDlet + * @param aValue Value of the on-screen attribute (ON_SCREEN_KEYPAD_VALUE_NO, + * ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS, or + * ON_SCREEN_KEYPAD_VALUE_NAVIGATION) + * @return KErrNone or KErrNotFound + * @see appmngr2midletconstants.h + */ + int SetOnScreenKeypadValueL(const std::wstring& aValue); + + /** + * Checks if the on-screen keyboard custom attribute was defined by + * the selected MIDlet JAD + * + * @return true if the MIdlet suite defines the on-screen keyboard + * attribute, false otherwise + */ + bool OnScreenKeypadValuePreDefinedL(); + + /** + * Gets security domain category + * @return One of the values: + * ApplicationInfo::MANUFACTURER_DOMAIN + * ApplicationInfo::IDENTIFIED_THIRD_PARTY_DOMAIN + * ApplicationInfo::OPERATOR_DOMAIN + * ApplicationInfo::UNIDENTIFIED_THIRD_PARTY_DOMAIN + */ + const std::wstring GetSecurityDomainCategory(); + + /** + * Gets security domain name + */ + const std::wstring GetSecurityDomainName(); + + /** + * Gets security warnings mode value + * @return One of the values (defined in securitystoragedatadefs.h): + * SECURITY_WARNINGS_USER_DEFINED_MODE + * SECURITY_WARNINGS_DEFAULT_MODE + */ + const std::wstring GetSecurityWarningsMode(); + + /** + * Sets security warnings mode value + * @param aSecurityWarningsMode One of the values (defined in securitystoragedatadefs.h): + * SECURITY_WARNINGS_USER_DEFINED_MODE + * SECURITY_WARNINGS_DEFAULT_MODE + */ + int SetSecurityWarningsMode(const std::wstring& aSecurityWarningsMode); + + /** + * Retrieves all the security settings (function groups and their settings) + */ + void GetSecuritySettings(std::vector& aMidletSuiteSecuritySettings); + + /** + * Stores the settings for a single function group + * @param aSettingsName Identifier of the function group + * @param aCurrentInteractionMode the settings for the function group + */ + int SetSecuritySettings(const std::wstring& aSettingsName, const std::wstring& aCurrentInteractionMode); + + /** + * Sets the flag which indicates if the security prompt was shown in blanket mode + * (this is related to the definition of blanket, as an interaction mode which guarantes a single prompt) + * @param aSettingsName Identifier of the function group + * @param aPromptFlag the flag which indicates if the + * security prompt was shown in blanket mode + */ + int SetUserSecuritySettingsPromptFlag(const std::wstring& aSettingsName, bool aPromptFlag); + +private: + + void findColumn(const java::storage::JavaStorageApplicationEntry_t& aEntry, const std::wstring& aColName, std::wstring& aColValue); + void findEntry(const java::storage::JavaStorageApplicationList_t&, const std::wstring&, std::wstring& eValue); + +private: + + std::auto_ptr iStorage; + HBufC* iMidletSuiteName; + /** + * MIDlet suite UID + */ + java::util::Uid iMidletSuiteUid; + CAppMngr2MidletResourceHandler& iResourceHandler; +}; + +#endif // APPMNGR2MIDLETSETTINGSHANDLER_H + + +// End of file