1.1 --- a/epoc32/include/logview.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/logview.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,239 @@
1.4 -logview.h
1.5 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __LOGVIEW_H__
1.21 +#define __LOGVIEW_H__
1.22 +
1.23 +// System includes
1.24 +#include <d32dbms.h>
1.25 +#include <logwrap.h>
1.26 +
1.27 +// User includes
1.28 +#include <logcli.h>
1.29 +
1.30 +// Classes referenced
1.31 +class CLogClient;
1.32 +class CLogGetEventClientOp;
1.33 +class CLogPackage;
1.34 +class CLogViewSetupClientOp;
1.35 +class CLogMaintainClientOp;
1.36 +class CLogViewObserver;
1.37 +class CLogFilterList;
1.38 +class CLogFilter;
1.39 +class CLogViewDuplicate;
1.40 +class CLogViewRemoveEventClientOp;
1.41 +class MLogViewChangeObserver;
1.42 +class CLogViewWindow;
1.43 +
1.44 +
1.45 +//**********************************
1.46 +// CLogView
1.47 +//**********************************
1.48 +
1.49 +class CLogView : public CLogActive
1.50 +/**
1.51 +Navigates a view on the log database.
1.52 +
1.53 +The class provides functions for navigating through a set of events and a
1.54 +function to retrieve the event at the current position within the view.
1.55 +
1.56 +The class cannot be instantiated. Further classes are derived from this class
1.57 +to define and construct views on the log database.
1.58 +
1.59 +The set of events in a view are always ordered so that the first event in
1.60 +a view is the most recent.
1.61 +@publishedAll
1.62 +@released
1.63 +*/
1.64 + {
1.65 +public:
1.66 + IMPORT_C ~CLogView();
1.67 + //
1.68 +public:
1.69 + inline const CLogEvent& Event() const;
1.70 + //
1.71 + IMPORT_C TBool FirstL(TRequestStatus& aStatus);
1.72 + IMPORT_C TBool LastL(TRequestStatus& aStatus);
1.73 + IMPORT_C TBool NextL(TRequestStatus& aStatus);
1.74 + IMPORT_C TBool PreviousL(TRequestStatus& aStatus);
1.75 + //
1.76 + IMPORT_C TInt CountL();
1.77 + //
1.78 + IMPORT_C void SetFlagsL(TLogFlags aFlags);
1.79 + //
1.80 +protected:
1.81 + CLogView(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
1.82 + void ConstructL(TInt aType, MLogViewChangeObserver* aObserver = NULL);
1.83 + //
1.84 + inline TBool IsValid() const;
1.85 + void DoCancel();
1.86 + void ReadEventFromWindowL();
1.87 + void ReawaitForChanges();
1.88 + TInt LogViewRecordCount() const;
1.89 + //
1.90 +private:
1.91 + TBool NavigateL(TInt aPosition, TRequestStatus& aStatus);
1.92 + void DoRunL();
1.93 + void PrepareViewChildrenL();
1.94 + void NotifyLogServerTerminatedL();
1.95 +
1.96 + //
1.97 +private:
1.98 + CLogEvent* iEvent;
1.99 + TAny* iSpare1;
1.100 + //
1.101 +protected:
1.102 + CLogClient& iClient;
1.103 + CLogPackage* iPackage;
1.104 + TAny* iSpare2;
1.105 + CLogMaintainClientOp* iMaintain;
1.106 + TLogViewId iViewId;
1.107 + TDes8* iData;
1.108 + TBool iValid;
1.109 + CLogViewWindow* iWindow;
1.110 + //
1.111 +private:
1.112 + TInt iType;
1.113 + MLogViewChangeObserver* iLogViewChangeObserver;
1.114 + CLogViewObserver* iLogViewObserver;
1.115 + friend class CLogViewObserver;
1.116 + };
1.117 +
1.118 +//**********************************
1.119 +// CLogViewEvent
1.120 +//**********************************
1.121 +
1.122 +
1.123 +class CLogViewEvent : public CLogView
1.124 +/**
1.125 +A view on the event log.
1.126 +
1.127 +The events included in the view are defined using a filter that specifies
1.128 +the constraints that all events in the view must satisfy. Filters are specified
1.129 +using one or more CLogFilter objects.
1.130 +
1.131 +@see CLogFilter
1.132 +@see CLogFilterList
1.133 +@publishedAll
1.134 +@released
1.135 +*/
1.136 + {
1.137 +public:
1.138 + IMPORT_C static CLogViewEvent* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
1.139 + IMPORT_C static CLogViewEvent* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
1.140 + IMPORT_C ~CLogViewEvent();
1.141 + //
1.142 +public:
1.143 + IMPORT_C TBool SetFilterL(const CLogFilterList& aFilterList, TRequestStatus& aStatus);
1.144 + IMPORT_C TBool SetFilterL(const CLogFilter& aFilter, TRequestStatus& aStatus);
1.145 + IMPORT_C TBool SetFilterParseFilterByFilterL(const CLogFilterList& aFilterList, TRequestStatus& aStatus);
1.146 + //
1.147 +private:
1.148 + CLogViewEvent(CLogClient& aClient, TInt aPriority);
1.149 + void ConstructL(MLogViewChangeObserver* aObserver = NULL);
1.150 + };
1.151 +
1.152 +//**********************************
1.153 +// CLogViewRecent
1.154 +//**********************************
1.155 +
1.156 +
1.157 +class CLogViewRecent : public CLogView
1.158 +/**
1.159 +A view on a recent event list.
1.160 +@publishedAll
1.161 +@released
1.162 +*/
1.163 + {
1.164 +public:
1.165 + IMPORT_C static CLogViewRecent* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
1.166 + IMPORT_C static CLogViewRecent* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
1.167 + IMPORT_C ~CLogViewRecent();
1.168 + //
1.169 +public:
1.170 + IMPORT_C TBool SetRecentListL(TLogRecentList aList, TRequestStatus& aStatus);
1.171 + IMPORT_C TBool SetRecentListL(TLogRecentList aList, const CLogFilter& aFilter, TRequestStatus& aStatus);
1.172 + IMPORT_C TBool SetRecentListL(TLogRecentList aList, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
1.173 + //
1.174 + IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, TRequestStatus& aStatus);
1.175 + IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, const CLogFilter& aFilter, TRequestStatus& aStatus);
1.176 + IMPORT_C TBool DuplicatesL(CLogViewDuplicate& aView, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
1.177 + IMPORT_C void ClearDuplicatesL();
1.178 + //
1.179 + IMPORT_C void RemoveL(TLogId aId);
1.180 + IMPORT_C TBool RemoveL(TRequestStatus& aStatus);
1.181 + //
1.182 + inline TLogRecentList RecentList() const;
1.183 + //
1.184 +private:
1.185 + CLogViewRecent(CLogClient& aClient, TInt aPriority);
1.186 + void ConstructL(MLogViewChangeObserver* aObserver = NULL);
1.187 + void DoRunL();
1.188 + //
1.189 + TBool DoRemoveL(TRequestStatus& aStatus);
1.190 + //
1.191 +private:
1.192 + TLogRecentList iRecentList;
1.193 + TLogRecentList iCurrentList;
1.194 + TPckgBuf<TLogRecentList> iCurrentListBuf;
1.195 + CLogViewRemoveEventClientOp* iRemove;
1.196 + };
1.197 +
1.198 +//**********************************
1.199 +// CLogViewDuplicate
1.200 +//**********************************
1.201 +
1.202 +class CLogViewDuplicate : public CLogView
1.203 +/**
1.204 +A view of events that are duplicates of an event in a view of recent events.
1.205 +
1.206 +The view is populated through a call to CLogViewRecent::DuplicatesL().
1.207 +
1.208 +@see CLogViewRecent::DuplicatesL()
1.209 +@see CLogViewRecent
1.210 +@publishedAll
1.211 +@released
1.212 +*/
1.213 + {
1.214 +public:
1.215 + IMPORT_C static CLogViewDuplicate* NewL(CLogClient& aClient, TInt aPriority = CActive::EPriorityStandard);
1.216 + IMPORT_C static CLogViewDuplicate* NewL(CLogClient& aClient, MLogViewChangeObserver& aObserver, TInt aPriority = CActive::EPriorityStandard);
1.217 + IMPORT_C ~CLogViewDuplicate();
1.218 + //
1.219 + IMPORT_C void RemoveL(TLogId aId);
1.220 + IMPORT_C TBool RemoveL(TRequestStatus& aStatus);
1.221 + //
1.222 + inline TLogId Source() const;
1.223 + //
1.224 +public:
1.225 + // The following are not exported, use CLogViewRecent::DuplicatesL to initialise this view
1.226 + TBool SetEventL(TLogId aId, TRequestStatus& aStatus);
1.227 + TBool SetEventL(TLogId aId, const CLogFilter& aFilter, TRequestStatus& aStatus);
1.228 + TBool SetEventL(TLogId aId, const CLogFilterList& aFilterList, TRequestStatus& aStatus);
1.229 + //
1.230 +private:
1.231 + CLogViewDuplicate(CLogClient& aClient, TInt aPriority);
1.232 + void ConstructL(MLogViewChangeObserver* aObserver = NULL);
1.233 + //
1.234 + TBool DoRemoveL(TRequestStatus& aStatus);
1.235 + //
1.236 +private:
1.237 + TLogId iSourceId;
1.238 + CLogViewRemoveEventClientOp* iRemove;
1.239 + };
1.240 +
1.241 +#include <logview.inl>
1.242 +
1.243 +#endif