1 /* |
|
2 * Copyright (c) 2002 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 "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: Interface for loading/storing the settings outside Profiles |
|
15 * itself. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MPROFILEEXTERNALSETTINGSHANDLER_H |
|
22 #define MPROFILEEXTERNALSETTINGSHANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CAknSettingItem; |
|
29 class CAknSettingItemArray; |
|
30 class MProfileExternalSettingsObserver; |
|
31 class TCoeHelpContext; |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Interface for loading/storing the settings outside Profiles itself. |
|
36 * |
|
37 * @lib ProfileSettingsView.dll |
|
38 * @since 3.1 |
|
39 */ |
|
40 class MProfileExternalSettingsHandler |
|
41 { |
|
42 |
|
43 public: // New functions |
|
44 |
|
45 /** |
|
46 * Creates a setting item for a listbox for editing a setting. |
|
47 * @param aIdentifier identifies the setting to be edited by the item. |
|
48 * @return a setting item for the given setting, the ownership is |
|
49 * transferred to the caller. |
|
50 * @since 3.1 |
|
51 */ |
|
52 virtual CAknSettingItem* CreateSettingItemL( TInt aIdentifier ) = 0; |
|
53 |
|
54 /** |
|
55 * Sets an observer for the external settings. |
|
56 * @param aObserver the observer to be notified when the settings are |
|
57 * changed. |
|
58 * @since 3.1 |
|
59 */ |
|
60 virtual void SetObserver( |
|
61 MProfileExternalSettingsObserver& aObserver ) = 0; |
|
62 |
|
63 /** |
|
64 * Check if the user should be allowed to change the value of the given |
|
65 * setting item or not. |
|
66 * @param aSettingItemId the ID of the setting item to check for. |
|
67 * @return ETrue if modification is allowed, EFalse otherwise. |
|
68 * @since 3.1 |
|
69 */ |
|
70 virtual TBool AllowedToChange( TInt aSettingItemId ) const = 0; |
|
71 |
|
72 /** |
|
73 * Gets the help context for context sensitive help. |
|
74 * @param aContext the context object in which the help context of the |
|
75 * component must be set in the implementation of this method. |
|
76 * @return ETrue if this method has set the context appropriately, |
|
77 * otherwise the caller should set the context by itself. |
|
78 * @since 3.1 |
|
79 */ |
|
80 virtual TBool GetHelpContext( TCoeHelpContext& /* aContext */ ) const |
|
81 { |
|
82 return EFalse; |
|
83 } |
|
84 |
|
85 /** |
|
86 * Sets hidden items in the setting item array. |
|
87 * @param aSettingItemArray array containing the settings items to set |
|
88 * visible/invisible. |
|
89 * @since 3.1 |
|
90 */ |
|
91 virtual void SetHiddenItems( CAknSettingItemArray& /* aSettingItemArray */ ) |
|
92 const |
|
93 {} |
|
94 |
|
95 /** |
|
96 * Checks if the setting with the given setting ID has been modified by |
|
97 * the user and saves the value in storage if it has been changed. |
|
98 * @param aSettingItemId the setting to be checked. |
|
99 * @since 3.1 |
|
100 */ |
|
101 virtual void StoreIfChangedL( TInt /* aSettingItemId */ ) {} |
|
102 |
|
103 }; |
|
104 |
|
105 #endif // MPROFILEEXTERNALSETTINGSHANDLER_H |
|
106 |
|
107 // End of File |
|
108 |
|