1 /* |
|
2 * Copyright (c) 2005 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: This file contains the header of the phone engine base |
|
15 * central repository monitor classes |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPECENREPMONITOR_H |
|
21 #define CPECENREPMONITOR_H |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include <e32base.h> |
|
25 |
|
26 // Forward declarations |
|
27 class CRepository; |
|
28 |
|
29 // BASE CLASS |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * CPECenRepMonitor |
|
35 * Active object base class for central repository monitor code - not instantiable |
|
36 * Exported methods are used by variant phone engine or other PE components |
|
37 * This class should not be used by components external to the TelephonyEngine |
|
38 * |
|
39 * @lib PhoneEngineBase.lib |
|
40 * @since Series60_4.0 |
|
41 */ |
|
42 NONSHARABLE_CLASS( CPECenRepMonitor ) |
|
43 : public CActive |
|
44 { |
|
45 protected: |
|
46 |
|
47 ~CPECenRepMonitor(); |
|
48 CPECenRepMonitor( TUint32 aMonitorSetting ); |
|
49 |
|
50 /** |
|
51 * Creates a new repository object and submits a notification request |
|
52 */ |
|
53 void BaseConstructL( TUid aRepositoryUid ); |
|
54 |
|
55 protected: |
|
56 |
|
57 /** |
|
58 * Submits a notification request |
|
59 */ |
|
60 void SubmitNotifyRequestL(); |
|
61 |
|
62 /** |
|
63 * Defines the actions that take place when a change indication |
|
64 * is received. Each deriving monitor has to define the implementation for |
|
65 * this method. Most common approach would be to save the data to internal |
|
66 * data store and send a message via phone model if neccessary. |
|
67 */ |
|
68 virtual void UpdateL() = 0; |
|
69 |
|
70 public: |
|
71 |
|
72 /** |
|
73 * Gets the current value of the monitored setting |
|
74 * @param aValue the current value of the monitored setting |
|
75 * @return TInt Symbian OS error code from central repository |
|
76 */ |
|
77 virtual TInt Get( TInt& aValue ); |
|
78 |
|
79 protected: // From CActive |
|
80 |
|
81 virtual void DoCancel(); |
|
82 virtual TInt RunError( TInt aError ); |
|
83 virtual void RunL(); |
|
84 |
|
85 protected: // Owned by this object |
|
86 |
|
87 // Handle to repository object |
|
88 CRepository* iRepository; |
|
89 // Repository key, i.e. the identification number of the monitored setting |
|
90 TUint32 iMonitorSetting; |
|
91 }; |
|
92 |
|
93 #endif // CPECENREPMONITOR_H |
|