|
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: |
|
15 * Reqisters Mce to LogEng to get notification about log DB changes. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __Mce_Engine_CMceLogNotify_H__ |
|
22 #define __Mce_Engine_CMceLogNotify_H__ |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <f32file.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class CLogClient; |
|
32 class CMceLogEngine; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Observer for the log database. Issues request to the underlying |
|
38 * asyncronous service provider, which tells if changes in the DB |
|
39 * had happened. |
|
40 */ |
|
41 class CMceLogNotify : public CActive |
|
42 |
|
43 { |
|
44 public: // Constructors. |
|
45 /** |
|
46 * Standard creation function. Creates and returns a new object of this |
|
47 * class. |
|
48 * |
|
49 * @param aObserver pointer to observer. |
|
50 * @param aDelay notification delay in microseconds. |
|
51 * @return pointer to CMceLogNotify instance. |
|
52 */ |
|
53 static CMceLogNotify* NewL( CMceLogEngine* aObserver, |
|
54 TTimeIntervalMicroSeconds32 aDelay ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CMceLogNotify(); |
|
60 |
|
61 |
|
62 /** |
|
63 * Issues request to asyncronous service provider |
|
64 */ |
|
65 void IssueNotifyRequest(); |
|
66 |
|
67 |
|
68 private: // Constructions. |
|
69 /** |
|
70 * Constructor, second phase. |
|
71 */ |
|
72 void ConstructL(); |
|
73 |
|
74 /** |
|
75 * Default Constructor |
|
76 */ |
|
77 CMceLogNotify(); |
|
78 |
|
79 /** |
|
80 * Constructor |
|
81 * |
|
82 * @param aObserver pointer to observer. |
|
83 * @param aDelay notification delay in microseconds. |
|
84 */ |
|
85 CMceLogNotify( CMceLogEngine* aObserver, |
|
86 TTimeIntervalMicroSeconds32 aDelay); |
|
87 |
|
88 private: // Operations from CActive |
|
89 /** |
|
90 * This is called when a request to a log engine is completed. |
|
91 */ |
|
92 void RunL(); |
|
93 |
|
94 /** |
|
95 * Cancels active request. |
|
96 */ |
|
97 void DoCancel(); |
|
98 |
|
99 private: // data |
|
100 /// Ref: Messaging Centre log engine. |
|
101 CMceLogEngine* iObserver; |
|
102 /// Own: File System session |
|
103 RFs iFsSession; |
|
104 /// Own: Pointer to the log client. |
|
105 CLogClient* iLogClient; |
|
106 /// Own: Notification delay in microseconds. |
|
107 TTimeIntervalMicroSeconds32 iDelay; |
|
108 |
|
109 }; |
|
110 |
|
111 #endif // __Mce_Engine_CMceLogNotify_H__ |
|
112 |
|
113 // End of file |