Update contrib.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
28 class CLogGetEventClientOp;
30 class CLogViewSetupClientOp;
31 class CLogMaintainClientOp;
32 class CLogViewObserver;
35 class CLogViewDuplicate;
36 class CLogViewRemoveEventClientOp;
37 class MLogViewChangeObserver;
41 //**********************************
43 //**********************************
45 class CLogView : public CLogActive
47 Navigates a view on the log database.
49 The class provides functions for navigating through a set of events and a
50 function to retrieve the event at the current position within the view.
52 The class cannot be instantiated. Further classes are derived from this class
53 to define and construct views on the log database.
55 The set of events in a view are always ordered so that the first event in
56 a view is the most recent.
65 inline const CLogEvent& Event() const;
67 IMPORT_C TBool FirstL(TRequestStatus& aStatus);
68 IMPORT_C TBool LastL(TRequestStatus& aStatus);
69 IMPORT_C TBool NextL(TRequestStatus& aStatus);
70 IMPORT_C TBool PreviousL(TRequestStatus& aStatus);
72 IMPORT_C TInt CountL();
74 IMPORT_C void SetFlagsL(TLogFlags aFlags);
77 CLogView(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
78 void ConstructL(TInt aType, MLogViewChangeObserver* aObserver = NULL);
80 inline TBool IsValid() const;
82 void ReadEventFromWindowL();
83 void ReawaitForChanges();
84 TInt LogViewRecordCount() const;
87 TBool NavigateL(TInt aPosition, TRequestStatus& aStatus);
89 void PrepareViewChildrenL();
90 void NotifyLogServerTerminatedL();
99 CLogPackage* iPackage;
101 CLogMaintainClientOp* iMaintain;
105 CLogViewWindow* iWindow;
109 MLogViewChangeObserver* iLogViewChangeObserver;
110 CLogViewObserver* iLogViewObserver;
111 friend class CLogViewObserver;
114 //**********************************
116 //**********************************
119 class CLogViewEvent : public CLogView
121 A view on the event log.
123 The events included in the view are defined using a filter that specifies
124 the constraints that all events in the view must satisfy. Filters are specified
125 using one or more CLogFilter objects.
134 IMPORT_C static CLogViewEvent* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
135 IMPORT_C static CLogViewEvent* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
136 IMPORT_C ~CLogViewEvent();
139 IMPORT_C TBool SetFilterL(const CLogFilterList& aFilterList, TRequestStatus& aStatus);
140 IMPORT_C TBool SetFilterL(const CLogFilter& aFilter, TRequestStatus& aStatus);
141 IMPORT_C TBool SetFilterParseFilterByFilterL(const CLogFilterList& aFilterList, TRequestStatus& aStatus);
144 CLogViewEvent(CLogClient& aClient, TInt aPriority);
145 void ConstructL(MLogViewChangeObserver* aObserver = NULL);
148 //**********************************
150 //**********************************
153 class CLogViewRecent : public CLogView
155 A view on a recent event list.
161 IMPORT_C static CLogViewRecent* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
162 IMPORT_C static CLogViewRecent* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
163 IMPORT_C ~CLogViewRecent();
166 IMPORT_C TBool SetRecentListL(TLogRecentList aList, TRequestStatus& aStatus);
167 IMPORT_C TBool SetRecentListL(TLogRecentList aList, const CLogFilter& aFilter, TRequestStatus& aStatus);
168 IMPORT_C TBool SetRecentListL(TLogRecentList aList, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
170 IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, TRequestStatus& aStatus);
171 IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, const CLogFilter& aFilter, TRequestStatus& aStatus);
172 IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
173 IMPORT_C void ClearDuplicatesL();
175 IMPORT_C void RemoveL(TLogId aId);
176 IMPORT_C TBool RemoveL(TRequestStatus& aStatus);
178 inline TLogRecentList RecentList() const;
181 CLogViewRecent(CLogClient& aClient, TInt aPriority);
182 void ConstructL(MLogViewChangeObserver* aObserver = NULL);
185 TBool DoRemoveL(TRequestStatus& aStatus);
188 TLogRecentList iRecentList;
189 TLogRecentList iCurrentList;
190 TPckgBuf<TLogRecentList> iCurrentListBuf;
191 CLogViewRemoveEventClientOp* iRemove;
194 //**********************************
196 //**********************************
198 class CLogViewDuplicate : public CLogView
200 A view of events that are duplicates of an event in a view of recent events.
202 The view is populated through a call to CLogViewRecent::DuplicatesL().
204 @see CLogViewRecent::DuplicatesL()
211 IMPORT_C static CLogViewDuplicate* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
212 IMPORT_C static CLogViewDuplicate* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
213 IMPORT_C ~CLogViewDuplicate();
215 IMPORT_C void RemoveL(TLogId aId);
216 IMPORT_C TBool RemoveL(TRequestStatus& aStatus);
218 inline TLogId Source() const;
221 // The following are not exported, use CLogViewRecent::DuplicatesL to initialise this view
222 TBool SetEventL(TLogId aId, TRequestStatus& aStatus);
223 TBool SetEventL(TLogId aId, const CLogFilter& aFilter, TRequestStatus& aStatus);
224 TBool SetEventL(TLogId aId, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
227 CLogViewDuplicate(CLogClient& aClient, TInt aPriority);
228 void ConstructL(MLogViewChangeObserver* aObserver = NULL);
230 TBool DoRemoveL(TRequestStatus& aStatus);
234 CLogViewRemoveEventClientOp* iRemove;
237 #include <logview.inl>