|
1 /* |
|
2 * Copyright (c) 2009 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: Model for Power saving query plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSPOWERSAVINGQUERYPLUGINMODEL_H |
|
20 #define GSPOWERSAVINGQUERYPLUGINMODEL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // MACROS |
|
26 |
|
27 // DATA TYPES |
|
28 |
|
29 // FUNCTION PROTOTYPES |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CRepository; |
|
33 // CLASS DEFINITION |
|
34 /** |
|
35 * CGSPowerSavingQueryPluginModel is the model class of Power saving query plugin. |
|
36 * It provides functions to get and set setting values. |
|
37 * @lib GSPowerSavingQueryPlugin.lib |
|
38 * @since Series 60_5.1 |
|
39 |
|
40 */ |
|
41 |
|
42 class CGSPowerSavingQueryPluginModel : public CBase |
|
43 { |
|
44 public: // Constructor and destructor |
|
45 /** |
|
46 * Two-phased constructor |
|
47 */ |
|
48 static CGSPowerSavingQueryPluginModel* NewL(); |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 */ |
|
53 ~CGSPowerSavingQueryPluginModel(); |
|
54 |
|
55 public: |
|
56 /** |
|
57 * Returns the power saving query value (0 or 1) |
|
58 * |
|
59 * @return TInt |
|
60 */ |
|
61 TInt PowerSavingQueryEnabled(); |
|
62 |
|
63 /** |
|
64 * Sets the the power saving query value. |
|
65 * @param aQuery TInt (0 or 1) |
|
66 * |
|
67 * @return ETrue: no errors |
|
68 * EFalse: an error has occurred |
|
69 */ |
|
70 TBool EnablePowerSavingQuery( TInt aQueryValue ); |
|
71 |
|
72 private: // Private constructors |
|
73 /** |
|
74 * Default C++ contructor |
|
75 */ |
|
76 CGSPowerSavingQueryPluginModel(); |
|
77 |
|
78 /** |
|
79 * Symbian OS default constructor |
|
80 * @return void |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 private: // data |
|
85 CRepository* iDeviceManagementRepository; |
|
86 |
|
87 }; |
|
88 |
|
89 |
|
90 #endif //GSPOWERSAVINGQUERYPLUGINMODEL_H |
|
91 |
|
92 // End of File |