sl@0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef __LOGVIEW_H__
|
sl@0
|
17 |
#define __LOGVIEW_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
// System includes
|
sl@0
|
20 |
#include <d32dbms.h>
|
sl@0
|
21 |
#include <logwrap.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
// User includes
|
sl@0
|
24 |
#include <logcli.h>
|
sl@0
|
25 |
|
sl@0
|
26 |
// Classes referenced
|
sl@0
|
27 |
class CLogClient;
|
sl@0
|
28 |
class CLogGetEventClientOp;
|
sl@0
|
29 |
class CLogPackage;
|
sl@0
|
30 |
class CLogViewSetupClientOp;
|
sl@0
|
31 |
class CLogMaintainClientOp;
|
sl@0
|
32 |
class CLogViewObserver;
|
sl@0
|
33 |
class CLogFilterList;
|
sl@0
|
34 |
class CLogFilter;
|
sl@0
|
35 |
class CLogViewDuplicate;
|
sl@0
|
36 |
class CLogViewRemoveEventClientOp;
|
sl@0
|
37 |
class MLogViewChangeObserver;
|
sl@0
|
38 |
class CLogViewWindow;
|
sl@0
|
39 |
|
sl@0
|
40 |
|
sl@0
|
41 |
//**********************************
|
sl@0
|
42 |
// CLogView
|
sl@0
|
43 |
//**********************************
|
sl@0
|
44 |
|
sl@0
|
45 |
class CLogView : public CLogActive
|
sl@0
|
46 |
/**
|
sl@0
|
47 |
Navigates a view on the log database.
|
sl@0
|
48 |
|
sl@0
|
49 |
The class provides functions for navigating through a set of events and a
|
sl@0
|
50 |
function to retrieve the event at the current position within the view.
|
sl@0
|
51 |
|
sl@0
|
52 |
The class cannot be instantiated. Further classes are derived from this class
|
sl@0
|
53 |
to define and construct views on the log database.
|
sl@0
|
54 |
|
sl@0
|
55 |
The set of events in a view are always ordered so that the first event in
|
sl@0
|
56 |
a view is the most recent.
|
sl@0
|
57 |
@publishedAll
|
sl@0
|
58 |
@released
|
sl@0
|
59 |
*/
|
sl@0
|
60 |
{
|
sl@0
|
61 |
public:
|
sl@0
|
62 |
IMPORT_C ~CLogView();
|
sl@0
|
63 |
//
|
sl@0
|
64 |
public:
|
sl@0
|
65 |
inline const CLogEvent& Event() const;
|
sl@0
|
66 |
//
|
sl@0
|
67 |
IMPORT_C TBool FirstL(TRequestStatus& aStatus);
|
sl@0
|
68 |
IMPORT_C TBool LastL(TRequestStatus& aStatus);
|
sl@0
|
69 |
IMPORT_C TBool NextL(TRequestStatus& aStatus);
|
sl@0
|
70 |
IMPORT_C TBool PreviousL(TRequestStatus& aStatus);
|
sl@0
|
71 |
//
|
sl@0
|
72 |
IMPORT_C TInt CountL();
|
sl@0
|
73 |
//
|
sl@0
|
74 |
IMPORT_C void SetFlagsL(TLogFlags aFlags);
|
sl@0
|
75 |
//
|
sl@0
|
76 |
protected:
|
sl@0
|
77 |
CLogView(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
|
sl@0
|
78 |
void ConstructL(TInt aType, MLogViewChangeObserver* aObserver = NULL);
|
sl@0
|
79 |
//
|
sl@0
|
80 |
inline TBool IsValid() const;
|
sl@0
|
81 |
void DoCancel();
|
sl@0
|
82 |
void ReadEventFromWindowL();
|
sl@0
|
83 |
void ReawaitForChanges();
|
sl@0
|
84 |
TInt LogViewRecordCount() const;
|
sl@0
|
85 |
//
|
sl@0
|
86 |
private:
|
sl@0
|
87 |
TBool NavigateL(TInt aPosition, TRequestStatus& aStatus);
|
sl@0
|
88 |
void DoRunL();
|
sl@0
|
89 |
void PrepareViewChildrenL();
|
sl@0
|
90 |
void NotifyLogServerTerminatedL();
|
sl@0
|
91 |
|
sl@0
|
92 |
//
|
sl@0
|
93 |
private:
|
sl@0
|
94 |
CLogEvent* iEvent;
|
sl@0
|
95 |
TAny* iSpare1;
|
sl@0
|
96 |
//
|
sl@0
|
97 |
protected:
|
sl@0
|
98 |
CLogClient& iClient;
|
sl@0
|
99 |
CLogPackage* iPackage;
|
sl@0
|
100 |
TAny* iSpare2;
|
sl@0
|
101 |
CLogMaintainClientOp* iMaintain;
|
sl@0
|
102 |
TLogViewId iViewId;
|
sl@0
|
103 |
TDes8* iData;
|
sl@0
|
104 |
TBool iValid;
|
sl@0
|
105 |
CLogViewWindow* iWindow;
|
sl@0
|
106 |
//
|
sl@0
|
107 |
private:
|
sl@0
|
108 |
TInt iType;
|
sl@0
|
109 |
MLogViewChangeObserver* iLogViewChangeObserver;
|
sl@0
|
110 |
CLogViewObserver* iLogViewObserver;
|
sl@0
|
111 |
friend class CLogViewObserver;
|
sl@0
|
112 |
};
|
sl@0
|
113 |
|
sl@0
|
114 |
//**********************************
|
sl@0
|
115 |
// CLogViewEvent
|
sl@0
|
116 |
//**********************************
|
sl@0
|
117 |
|
sl@0
|
118 |
|
sl@0
|
119 |
class CLogViewEvent : public CLogView
|
sl@0
|
120 |
/**
|
sl@0
|
121 |
A view on the event log.
|
sl@0
|
122 |
|
sl@0
|
123 |
The events included in the view are defined using a filter that specifies
|
sl@0
|
124 |
the constraints that all events in the view must satisfy. Filters are specified
|
sl@0
|
125 |
using one or more CLogFilter objects.
|
sl@0
|
126 |
|
sl@0
|
127 |
@see CLogFilter
|
sl@0
|
128 |
@see CLogFilterList
|
sl@0
|
129 |
@publishedAll
|
sl@0
|
130 |
@released
|
sl@0
|
131 |
*/
|
sl@0
|
132 |
{
|
sl@0
|
133 |
public:
|
sl@0
|
134 |
IMPORT_C static CLogViewEvent* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
|
sl@0
|
135 |
IMPORT_C static CLogViewEvent* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
|
sl@0
|
136 |
IMPORT_C ~CLogViewEvent();
|
sl@0
|
137 |
//
|
sl@0
|
138 |
public:
|
sl@0
|
139 |
IMPORT_C TBool SetFilterL(const CLogFilterList& aFilterList, TRequestStatus& aStatus);
|
sl@0
|
140 |
IMPORT_C TBool SetFilterL(const CLogFilter& aFilter, TRequestStatus& aStatus);
|
sl@0
|
141 |
IMPORT_C TBool SetFilterParseFilterByFilterL(const CLogFilterList& aFilterList, TRequestStatus& aStatus);
|
sl@0
|
142 |
//
|
sl@0
|
143 |
private:
|
sl@0
|
144 |
CLogViewEvent(CLogClient& aClient, TInt aPriority);
|
sl@0
|
145 |
void ConstructL(MLogViewChangeObserver* aObserver = NULL);
|
sl@0
|
146 |
};
|
sl@0
|
147 |
|
sl@0
|
148 |
//**********************************
|
sl@0
|
149 |
// CLogViewRecent
|
sl@0
|
150 |
//**********************************
|
sl@0
|
151 |
|
sl@0
|
152 |
|
sl@0
|
153 |
class CLogViewRecent : public CLogView
|
sl@0
|
154 |
/**
|
sl@0
|
155 |
A view on a recent event list.
|
sl@0
|
156 |
@publishedAll
|
sl@0
|
157 |
@released
|
sl@0
|
158 |
*/
|
sl@0
|
159 |
{
|
sl@0
|
160 |
public:
|
sl@0
|
161 |
IMPORT_C static CLogViewRecent* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
|
sl@0
|
162 |
IMPORT_C static CLogViewRecent* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
|
sl@0
|
163 |
IMPORT_C ~CLogViewRecent();
|
sl@0
|
164 |
//
|
sl@0
|
165 |
public:
|
sl@0
|
166 |
IMPORT_C TBool SetRecentListL(TLogRecentList aList, TRequestStatus& aStatus);
|
sl@0
|
167 |
IMPORT_C TBool SetRecentListL(TLogRecentList aList, const CLogFilter& aFilter, TRequestStatus& aStatus);
|
sl@0
|
168 |
IMPORT_C TBool SetRecentListL(TLogRecentList aList, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
|
sl@0
|
169 |
//
|
sl@0
|
170 |
IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, TRequestStatus& aStatus);
|
sl@0
|
171 |
IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, const CLogFilter& aFilter, TRequestStatus& aStatus);
|
sl@0
|
172 |
IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
|
sl@0
|
173 |
IMPORT_C void ClearDuplicatesL();
|
sl@0
|
174 |
//
|
sl@0
|
175 |
IMPORT_C void RemoveL(TLogId aId);
|
sl@0
|
176 |
IMPORT_C TBool RemoveL(TRequestStatus& aStatus);
|
sl@0
|
177 |
//
|
sl@0
|
178 |
inline TLogRecentList RecentList() const;
|
sl@0
|
179 |
//
|
sl@0
|
180 |
private:
|
sl@0
|
181 |
CLogViewRecent(CLogClient& aClient, TInt aPriority);
|
sl@0
|
182 |
void ConstructL(MLogViewChangeObserver* aObserver = NULL);
|
sl@0
|
183 |
void DoRunL();
|
sl@0
|
184 |
//
|
sl@0
|
185 |
TBool DoRemoveL(TRequestStatus& aStatus);
|
sl@0
|
186 |
//
|
sl@0
|
187 |
private:
|
sl@0
|
188 |
TLogRecentList iRecentList;
|
sl@0
|
189 |
TLogRecentList iCurrentList;
|
sl@0
|
190 |
TPckgBuf<TLogRecentList> iCurrentListBuf;
|
sl@0
|
191 |
CLogViewRemoveEventClientOp* iRemove;
|
sl@0
|
192 |
};
|
sl@0
|
193 |
|
sl@0
|
194 |
//**********************************
|
sl@0
|
195 |
// CLogViewDuplicate
|
sl@0
|
196 |
//**********************************
|
sl@0
|
197 |
|
sl@0
|
198 |
class CLogViewDuplicate : public CLogView
|
sl@0
|
199 |
/**
|
sl@0
|
200 |
A view of events that are duplicates of an event in a view of recent events.
|
sl@0
|
201 |
|
sl@0
|
202 |
The view is populated through a call to CLogViewRecent::DuplicatesL().
|
sl@0
|
203 |
|
sl@0
|
204 |
@see CLogViewRecent::DuplicatesL()
|
sl@0
|
205 |
@see CLogViewRecent
|
sl@0
|
206 |
@publishedAll
|
sl@0
|
207 |
@released
|
sl@0
|
208 |
*/
|
sl@0
|
209 |
{
|
sl@0
|
210 |
public:
|
sl@0
|
211 |
IMPORT_C static CLogViewDuplicate* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
|
sl@0
|
212 |
IMPORT_C static CLogViewDuplicate* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
|
sl@0
|
213 |
IMPORT_C ~CLogViewDuplicate();
|
sl@0
|
214 |
//
|
sl@0
|
215 |
IMPORT_C void RemoveL(TLogId aId);
|
sl@0
|
216 |
IMPORT_C TBool RemoveL(TRequestStatus& aStatus);
|
sl@0
|
217 |
//
|
sl@0
|
218 |
inline TLogId Source() const;
|
sl@0
|
219 |
//
|
sl@0
|
220 |
public:
|
sl@0
|
221 |
// The following are not exported, use CLogViewRecent::DuplicatesL to initialise this view
|
sl@0
|
222 |
TBool SetEventL(TLogId aId, TRequestStatus& aStatus);
|
sl@0
|
223 |
TBool SetEventL(TLogId aId, const CLogFilter& aFilter, TRequestStatus& aStatus);
|
sl@0
|
224 |
TBool SetEventL(TLogId aId, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
|
sl@0
|
225 |
//
|
sl@0
|
226 |
private:
|
sl@0
|
227 |
CLogViewDuplicate(CLogClient& aClient, TInt aPriority);
|
sl@0
|
228 |
void ConstructL(MLogViewChangeObserver* aObserver = NULL);
|
sl@0
|
229 |
//
|
sl@0
|
230 |
TBool DoRemoveL(TRequestStatus& aStatus);
|
sl@0
|
231 |
//
|
sl@0
|
232 |
private:
|
sl@0
|
233 |
TLogId iSourceId;
|
sl@0
|
234 |
CLogViewRemoveEventClientOp* iRemove;
|
sl@0
|
235 |
};
|
sl@0
|
236 |
|
sl@0
|
237 |
#include <logview.inl>
|
sl@0
|
238 |
|
sl@0
|
239 |
#endif
|