5
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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 the License "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 |
* %created_by: shreedha %
|
|
16 |
* %date_created: Tue Feb 10 11:34:01 2009 %
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
/**********************************************************************
|
|
20 |
*
|
|
21 |
* Header %name: loggingsyncservice.h %
|
|
22 |
* Instance: bh1sapi_1
|
|
23 |
* Description:
|
|
24 |
* %created_by: shreedha %
|
|
25 |
* %date_created: Tue Feb 10 11:34:01 2009 %
|
|
26 |
*
|
|
27 |
**********************************************************************/
|
|
28 |
#ifndef LOGGINGSERVICE_H
|
|
29 |
#define LOGGINGSERVICE_H
|
|
30 |
|
|
31 |
#include <logwrap.h>
|
|
32 |
#include <logcli.h>
|
|
33 |
|
|
34 |
|
|
35 |
/**
|
|
36 |
* Forward declaration
|
|
37 |
*/
|
|
38 |
class CLogViewEvent ;
|
|
39 |
class CLogIter ;
|
|
40 |
|
|
41 |
/**
|
|
42 |
* CLogSyncService: Deligator class declariation, this is a wrapper class
|
|
43 |
* for all the functionalities offers by symbian logging service.
|
|
44 |
*
|
|
45 |
* This Class deligates the responsibilities to coreimp class for async
|
|
46 |
* service
|
|
47 |
*/
|
|
48 |
|
|
49 |
class CLogSyncService: public CActive
|
|
50 |
{
|
|
51 |
|
|
52 |
public :
|
|
53 |
|
|
54 |
/**
|
|
55 |
* NewL: Two phased construction
|
|
56 |
*/
|
|
57 |
|
|
58 |
IMPORT_C static CLogSyncService *NewL() ;
|
|
59 |
|
|
60 |
/**
|
|
61 |
* NewLC: Creates an instance of CLogSyncServiceClass
|
|
62 |
* Two Phased constructor
|
|
63 |
* returns newly allocated object.
|
|
64 |
*/
|
|
65 |
|
|
66 |
static CLogSyncService* NewLC() ;
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Add(): Adds a new event to event database.Synchronous
|
|
70 |
* returns unique id of the event added in event database.
|
|
71 |
*/
|
|
72 |
|
|
73 |
IMPORT_C TLogId AddL( CLogEvent *aEvent );
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Deletes a event from the event database
|
|
77 |
* @param aLogId Event id of the event in the database
|
|
78 |
*/
|
|
79 |
|
|
80 |
IMPORT_C TInt Delete( TLogId aId ) ;
|
|
81 |
|
|
82 |
/**
|
|
83 |
* GetList(): Gets the events as specified by filter
|
|
84 |
*
|
|
85 |
* @param aFilter, view filter
|
|
86 |
*/
|
|
87 |
|
|
88 |
IMPORT_C CLogIter* GetListL( CLogFilter *aFilter ) ;
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Returns the current event in the view
|
|
92 |
*/
|
|
93 |
|
|
94 |
inline const CLogEvent& Event()
|
|
95 |
{
|
|
96 |
return iLogViewEvents->Event() ;
|
|
97 |
}
|
|
98 |
|
|
99 |
/**
|
|
100 |
* ReadRecentEvents, reads recentEvents from the list
|
|
101 |
*
|
|
102 |
* @param aRecentList, recentlist to be viewed
|
|
103 |
* @param aFilter, filter for events to appear in view
|
|
104 |
*/
|
|
105 |
|
|
106 |
CLogIter* ReadRecentEventsL( TLogRecentList aRecentList ,
|
|
107 |
CLogFilter *aFilter = NULL ) ;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Gets the details of the event as specified by the
|
|
111 |
* input paramater
|
|
112 |
*
|
|
113 |
* @param aEvent, details of the event to be fetched
|
|
114 |
*/
|
|
115 |
|
|
116 |
CLogIter* GetEventL( CLogEvent *aEvent ) ;
|
|
117 |
|
|
118 |
|
|
119 |
/**
|
|
120 |
* Default Destructor
|
|
121 |
*/
|
|
122 |
|
|
123 |
~CLogSyncService() ;
|
|
124 |
|
|
125 |
|
|
126 |
protected :
|
|
127 |
|
|
128 |
/**
|
|
129 |
* ConstructL(): Internal method to construct members
|
|
130 |
*/
|
|
131 |
|
|
132 |
void ConstructL() ;
|
|
133 |
|
|
134 |
/**
|
|
135 |
* Default constructor
|
|
136 |
*/
|
|
137 |
|
|
138 |
CLogSyncService() ;
|
|
139 |
|
|
140 |
|
|
141 |
/**
|
|
142 |
* DoInitialiseL(): Internal method to initialise members
|
|
143 |
*/
|
|
144 |
|
|
145 |
void DoInitialiseL() ;
|
|
146 |
|
|
147 |
/**
|
|
148 |
* From CActive
|
|
149 |
*/
|
|
150 |
|
|
151 |
void DoCancel() ;
|
|
152 |
|
|
153 |
|
|
154 |
/**
|
|
155 |
* From CActive
|
|
156 |
*/
|
|
157 |
void RunL() ;
|
|
158 |
|
|
159 |
private:
|
|
160 |
|
|
161 |
/**
|
|
162 |
* Log Engine Handle
|
|
163 |
*/
|
|
164 |
CActiveSchedulerWait* iWaitScheduler;
|
|
165 |
CLogClient* iLogClient ;
|
|
166 |
CLogViewEvent* iLogViewEvents ;
|
|
167 |
CLogViewRecent* iLogViewRecent ;
|
|
168 |
RFs iFs ;
|
|
169 |
TInt iTaskId ;
|
|
170 |
|
|
171 |
|
|
172 |
};
|
|
173 |
|
|
174 |
#endif
|