|
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: |
|
15 * CMsgLogsObserver declaration file |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MSGLOGSOBSERVER_H |
|
22 #define __MSGLOGSOBSERVER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <logviewchangeobserver.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CMsgErrorWatcher; |
|
30 class CLogClient; |
|
31 class CLogViewEvent; |
|
32 class CLogFilterList; |
|
33 class CLogEventType; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * CMsgLogsObserver |
|
39 * |
|
40 * @lib msgerrorwatcher.dll |
|
41 * @since 3.0 |
|
42 */ |
|
43 class CMsgLogsObserver : public CActive, public MLogViewChangeObserver |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * |
|
50 * @param aWatcher A pointer to CMsgErrorWatcher |
|
51 */ |
|
52 static CMsgLogsObserver* NewL( CMsgErrorWatcher* aWatcher, RFs& aFs ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CMsgLogsObserver(); |
|
58 |
|
59 private: |
|
60 |
|
61 /** |
|
62 * By default Symbian OS constructor is private. |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 /** |
|
67 * Private C++ constructor. |
|
68 * |
|
69 * @param aWatcher A pointer to CMsgErrorWatcher |
|
70 */ |
|
71 CMsgLogsObserver( CMsgErrorWatcher* aWatcher, RFs& aFs ); |
|
72 |
|
73 /** |
|
74 * |
|
75 */ |
|
76 void CreateFiltersL(); |
|
77 |
|
78 /** |
|
79 * |
|
80 */ |
|
81 void AppendFiltersL(); |
|
82 |
|
83 /** |
|
84 * |
|
85 */ |
|
86 void GetLogEventL( TLogId aId ); |
|
87 |
|
88 /** |
|
89 * |
|
90 */ |
|
91 void ShowNoteL(); |
|
92 |
|
93 /** |
|
94 * |
|
95 */ |
|
96 void AddEventTypeL(); |
|
97 |
|
98 /** |
|
99 * |
|
100 */ |
|
101 void AddDummyEvent1L(); |
|
102 |
|
103 /** |
|
104 * |
|
105 */ |
|
106 void AddDummyEvent2L(); |
|
107 |
|
108 /** |
|
109 * |
|
110 */ |
|
111 void DeleteDummyEvent1(); |
|
112 |
|
113 /** |
|
114 * |
|
115 */ |
|
116 void DeleteDummyEvent2(); |
|
117 |
|
118 /** |
|
119 * |
|
120 */ |
|
121 void CompleteSelf(); |
|
122 |
|
123 private: |
|
124 |
|
125 /** |
|
126 * From CActive |
|
127 */ |
|
128 void DoCancel(); |
|
129 |
|
130 /** |
|
131 * From CActive |
|
132 */ |
|
133 void RunL(); |
|
134 |
|
135 private: |
|
136 |
|
137 /** |
|
138 * From MLogViewChangeObserver |
|
139 */ |
|
140 void HandleLogViewChangeEventAddedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount); |
|
141 void HandleLogViewChangeEventChangedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount); |
|
142 void HandleLogViewChangeEventDeletedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount); |
|
143 |
|
144 private: // Data |
|
145 |
|
146 enum TMsgLogsObserverState |
|
147 { |
|
148 EMsgLogsIdle = 0, |
|
149 EMsgLogsAddingEventType, |
|
150 EMsgLogsAddingDummyEvent1, |
|
151 EMsgLogsAddingDummyEvent2, |
|
152 EMsgLogsCreatingFilters, |
|
153 EMsgLogsDeletingDummyEvent1, |
|
154 EMsgLogsDeletingDummyEvent2, |
|
155 EMsgLogsGettingEvent |
|
156 }; |
|
157 |
|
158 CMsgErrorWatcher* iWatcher; |
|
159 RFs& iFs; |
|
160 |
|
161 TMsgLogsObserverState iState; |
|
162 |
|
163 CLogClient* iLogClient; |
|
164 CLogEvent* iLogEvent; |
|
165 CLogEvent* iDummyLogEvent1; |
|
166 CLogEvent* iDummyLogEvent2; |
|
167 CLogViewEvent* iLogViewEvent; |
|
168 CLogFilterList* iFilterList; |
|
169 CLogEventType* iLogEventType; // to add mms event type |
|
170 |
|
171 TLogString iDelivered; |
|
172 TLogId iDummyLogId; |
|
173 }; |
|
174 |
|
175 #endif // __MSGLOGSOBSERVER_H |
|
176 |
|
177 // End of File |