|
1 /* |
|
2 * Copyright (c) 2007-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: |
|
15 * Name : sipsystemstatemonitor.h |
|
16 * Part of : SIP |
|
17 * Version : SIP/6.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 #ifndef CSIPSYSTEMSTATEMONITOR_H |
|
24 #define CSIPSYSTEMSTATEMONITOR_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 #include <ecom/ecom.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class MSipSystemStateObserver; |
|
32 |
|
33 // CONSTANTS |
|
34 /** Interface UID of this ECOM interface */ |
|
35 const TUid KSipSystemStateMonitorIfUid = { 0x10283310 }; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 /** |
|
39 * @publishedPartner |
|
40 * @released |
|
41 * |
|
42 * Interface for SIP System State Monitor ECOM plug-in(s). |
|
43 */ |
|
44 class CSipSystemStateMonitor : public CBase |
|
45 { |
|
46 public: // Enumerations |
|
47 |
|
48 /** System variables */ |
|
49 enum TSystemVariable |
|
50 { |
|
51 /** System state event */ |
|
52 ESystemState=0, |
|
53 /** SNAP availability event */ |
|
54 ESnapAvailability, |
|
55 /** RFS State */ |
|
56 ERfsState |
|
57 }; |
|
58 |
|
59 /** System states */ |
|
60 enum TSystemState |
|
61 { |
|
62 /** System is starting up */ |
|
63 ESystemNotReady=0, |
|
64 /** System has been started up */ |
|
65 ESystemReady, |
|
66 /** System is shutting down */ |
|
67 ESystemShuttingDown, |
|
68 /** System is in Offline state */ |
|
69 ESystemOffline, |
|
70 /** System is in Online state */ |
|
71 ESystemOnline |
|
72 }; |
|
73 |
|
74 /** Snap availability notifications */ |
|
75 enum TSnapAvailability |
|
76 { |
|
77 /** SNAP not available */ |
|
78 ESnapNotAvailable=0, |
|
79 /** SNAP available */ |
|
80 ESnapAvailable |
|
81 }; |
|
82 |
|
83 /**RFS States */ |
|
84 enum TRfsState |
|
85 { |
|
86 /** Rfs Started */ |
|
87 ERfsStarted=0, |
|
88 /** Rfs Failed */ |
|
89 ERfsFailed, |
|
90 /** Rfs Completed */ |
|
91 ERfsCompleted |
|
92 }; |
|
93 |
|
94 public: // Constructors and destructor |
|
95 |
|
96 /** |
|
97 * Destructor. |
|
98 */ |
|
99 virtual inline ~CSipSystemStateMonitor(); |
|
100 |
|
101 public: // New functions |
|
102 |
|
103 /** |
|
104 * Gets current state of the system |
|
105 * @return current state of the system |
|
106 */ |
|
107 virtual TSystemState State() const = 0; |
|
108 |
|
109 /** |
|
110 * Starts monitoring for a system variable. |
|
111 * @param aVariable system variable to be monitored |
|
112 * @param aObjectId identifies the monitored object, |
|
113 * for ESystemState the value should be zero, |
|
114 * for ESnapAvailability the ID of the SNAP |
|
115 * @param aObserver observer to be informed about the changes |
|
116 * in the values of system variables. |
|
117 * @leave KErrNoMemory if out-of-memory |
|
118 * @leave KErrAlreadyExists if monitoring for the variable |
|
119 * has already been started |
|
120 */ |
|
121 virtual void StartMonitoringL( TSystemVariable aVariable, |
|
122 TInt aObjectId, |
|
123 MSipSystemStateObserver& aObserver ); |
|
124 |
|
125 /** |
|
126 * Stops monitoring for a system variable. |
|
127 * @param aVariable system variable that was monitored |
|
128 * @param aObjectId identifies the monitored object, |
|
129 * for ESystemState value should be zero, |
|
130 * for ESnapAvailability the ID of the SNAP |
|
131 * @param aObserver observer to be informed about the changes |
|
132 * in the values of system variables. |
|
133 */ |
|
134 virtual void StopMonitoring( TSystemVariable aVariable, |
|
135 TInt aObjectId, |
|
136 MSipSystemStateObserver& aObserver ); |
|
137 |
|
138 /** |
|
139 * Gets current value of a particular system variable |
|
140 * @param aVariable system variable that was monitored |
|
141 * @param aObjectId identifies the monitored object, |
|
142 * for ESystemState the value should be zero, |
|
143 * for ESnapAvailability the ID of the SNAP |
|
144 * @return current value of the system variable |
|
145 */ |
|
146 virtual TInt CurrentValue( TSystemVariable aVariable, |
|
147 TInt aObjectId ) const; |
|
148 |
|
149 /** |
|
150 * Gets current value of a particular system variable |
|
151 * @param aVariable system variable that was monitored |
|
152 * @param aObjectId identifies the monitored object, |
|
153 * for ESystemState the value should be zero, |
|
154 * for ESnapAvailability the ID of the SNAP |
|
155 * @return current value of the system variable |
|
156 */ |
|
157 virtual void EventProcessingCompleted( TSystemVariable aVariable, |
|
158 TInt aObjectId, |
|
159 MSipSystemStateObserver& aObserver); |
|
160 |
|
161 public: // Data |
|
162 |
|
163 /// Unique key for implementations of this interface. |
|
164 TUid iInstanceKey; |
|
165 |
|
166 protected: // Constructors: |
|
167 |
|
168 inline CSipSystemStateMonitor(); |
|
169 }; |
|
170 |
|
171 #include "sipsystemstatemonitor.inl" |
|
172 |
|
173 #endif // CSIPSYSTEMSTATEMONITOR_H |