1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/loggingservices/eventlogger/LogCli/inc/logclientop.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,332 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __LOGCLIENTOP_H__
1.20 +#define __LOGCLIENTOP_H__
1.21 +
1.22 +#include <e32base.h>
1.23 +#include "logpackage.h"
1.24 +#include <logcli.h>
1.25 +#include "logservcli.h"
1.26 +#include "LogServShared.h"
1.27 +
1.28 +/**
1.29 +@internalComponent
1.30 +*/
1.31 +NONSHARABLE_CLASS(CLogClientOp) : public CActive
1.32 + {
1.33 +public:
1.34 + void Start(TRequestStatus& aObserver);
1.35 + TInt Start();
1.36 +
1.37 +protected:
1.38 + CLogClientOp(RLogSession& aSession, CLogPackage& aPackage, TLogOperationType aType, TInt aPriority);
1.39 + ~CLogClientOp();
1.40 + void FetchResultFromServerL(TInt aResult);
1.41 + void SetDataSlot1(TInt aValue);
1.42 +
1.43 +private:
1.44 + void RunL();
1.45 + void DoCancel();
1.46 + TInt RunError(TInt aError);
1.47 + TInt DoStartL();
1.48 + virtual void InitiateRequestToServerL()=0;
1.49 + virtual void CompleteL(TInt& aResult);
1.50 +
1.51 +protected:
1.52 + CLogPackage& iPackage;
1.53 + RLogSession& iSession;
1.54 + TPckgBuf<TLogClientServerData> iData;
1.55 +
1.56 +private:
1.57 + /**
1.58 + * The observer's request status
1.59 + */
1.60 + TRequestStatus* iObserver;
1.61 + };
1.62 +
1.63 +/**
1.64 +Add an event to the database
1.65 +@internalComponent
1.66 +*/
1.67 +NONSHARABLE_CLASS(CLogAddEventClientOp) : public CLogClientOp
1.68 + {
1.69 +public:
1.70 + CLogAddEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.71 + void Start(CLogEvent& aEvent, TRequestStatus& aObserver);
1.72 + //
1.73 +private:
1.74 + void InitiateRequestToServerL();
1.75 + void CompleteL(TInt& aResult);
1.76 + //
1.77 +private:
1.78 + CLogEvent* iEvent;
1.79 + };
1.80 +
1.81 +/**
1.82 +Change an event in the database
1.83 +@internalComponent
1.84 +*/
1.85 +NONSHARABLE_CLASS(CLogChangeEventClientOp) : public CLogClientOp
1.86 + {
1.87 +public:
1.88 + CLogChangeEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.89 + void Start(const CLogEvent& aEvent, TRequestStatus& aObserver);
1.90 + //
1.91 +private:
1.92 + void InitiateRequestToServerL();
1.93 + //
1.94 +private:
1.95 + const CLogEvent* iEvent;
1.96 + };
1.97 +
1.98 +/**
1.99 +Get an event from the database
1.100 +@internalComponent
1.101 +*/
1.102 +NONSHARABLE_CLASS(CLogGetEventClientOp) : public CLogClientOp
1.103 + {
1.104 +public:
1.105 + CLogGetEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.106 + void Start(CLogEvent& aEvent, TRequestStatus& aObserver);
1.107 + //
1.108 +private:
1.109 + void InitiateRequestToServerL();
1.110 + void CompleteL(TInt& aResult);
1.111 + //
1.112 +private:
1.113 + CLogEvent* iEvent;
1.114 + };
1.115 +
1.116 +/**
1.117 +Delete an event from the database
1.118 +@internalComponent
1.119 +*/
1.120 +NONSHARABLE_CLASS(CLogDeleteEventClientOp) : public CLogClientOp
1.121 + {
1.122 +public:
1.123 + CLogDeleteEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.124 + void Start(TLogId aId, TRequestStatus& aObserver);
1.125 + //
1.126 +private:
1.127 + void InitiateRequestToServerL();
1.128 + //
1.129 +private:
1.130 + TLogId iId;
1.131 + };
1.132 +
1.133 +/**
1.134 +Add an event type to the database
1.135 +@internalComponent
1.136 +*/
1.137 +NONSHARABLE_CLASS(CLogAddTypeClientOp) : public CLogClientOp
1.138 + {
1.139 +public:
1.140 + CLogAddTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.141 + void Start(const CLogEventType& aEventType, TRequestStatus& aObserver);
1.142 + //
1.143 +private:
1.144 + void InitiateRequestToServerL();
1.145 + //
1.146 +private:
1.147 + const CLogEventType* iEventType;
1.148 + };
1.149 +
1.150 +/**
1.151 +Change an event type in the database
1.152 +@internalComponent
1.153 +*/
1.154 +NONSHARABLE_CLASS(CLogChangeTypeClientOp) : public CLogClientOp
1.155 + {
1.156 +public:
1.157 + CLogChangeTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.158 + void Start(const CLogEventType& aEventType, TRequestStatus& aObserver);
1.159 + //
1.160 +private:
1.161 + void InitiateRequestToServerL();
1.162 + //
1.163 +private:
1.164 + const CLogEventType* iEventType;
1.165 + };
1.166 +
1.167 +/**
1.168 +Get event type details
1.169 +@internalComponent
1.170 +*/
1.171 +NONSHARABLE_CLASS(CLogGetTypeClientOp) : public CLogClientOp
1.172 + {
1.173 +public:
1.174 + CLogGetTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.175 + void Start(CLogEventType& aEventType, TRequestStatus& aObserver);
1.176 + //
1.177 +private:
1.178 + void InitiateRequestToServerL();
1.179 + void CompleteL(TInt& aResult);
1.180 + //
1.181 +private:
1.182 + CLogEventType* iEventType;
1.183 + };
1.184 +
1.185 +/**
1.186 +Delete an event type
1.187 +@internalComponent
1.188 +*/
1.189 +NONSHARABLE_CLASS(CLogDeleteTypeClientOp) : public CLogClientOp
1.190 + {
1.191 +public:
1.192 + CLogDeleteTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.193 + void Start(TUid aUid, TRequestStatus& aObserver);
1.194 + //
1.195 +private:
1.196 + void InitiateRequestToServerL();
1.197 + //
1.198 +private:
1.199 + TUid iUid;
1.200 + };
1.201 +
1.202 +/**
1.203 +Get engine configuration
1.204 +@internalComponent
1.205 +*/
1.206 +NONSHARABLE_CLASS(CLogGetConfigClientOp) : public CLogClientOp
1.207 + {
1.208 +public:
1.209 + CLogGetConfigClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.210 + void Start(TLogConfig& aConfig, TRequestStatus& aObserver);
1.211 + //
1.212 +private:
1.213 + void InitiateRequestToServerL();
1.214 + void CompleteL(TInt& aResult);
1.215 + //
1.216 +private:
1.217 + TLogConfig* iConfig;
1.218 + };
1.219 +
1.220 +/**
1.221 +Change the configuration
1.222 +@internalComponent
1.223 +*/
1.224 +NONSHARABLE_CLASS(CLogChangeConfigClientOp) : public CLogClientOp
1.225 + {
1.226 +public:
1.227 + CLogChangeConfigClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.228 + void Start(const TLogConfig& aConfig, TRequestStatus& aObserver);
1.229 + //
1.230 +private:
1.231 + void InitiateRequestToServerL();
1.232 + //
1.233 +private:
1.234 + const TLogConfig* iConfig;
1.235 + };
1.236 +
1.237 +/**
1.238 +Clear the main event log
1.239 +@internalComponent
1.240 +*/
1.241 +NONSHARABLE_CLASS(CLogClearLogClientOp) : public CLogClientOp
1.242 + {
1.243 +public:
1.244 + CLogClearLogClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.245 + void Start(const TTime& aDate, TRequestStatus& aObserver
1.246 +#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
1.247 + , TSimId aSimId = KLogNullSimId
1.248 +#endif
1.249 + );
1.250 + //
1.251 +private:
1.252 + void InitiateRequestToServerL();
1.253 + //
1.254 +private:
1.255 + TTime iDate; // UTC
1.256 +#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
1.257 + TSimId iSimId;
1.258 +#endif
1.259 + };
1.260 +
1.261 +/**
1.262 +Clear a recent event log
1.263 +@internalComponent
1.264 +*/
1.265 +NONSHARABLE_CLASS(CLogClearRecentClientOp) : public CLogClientOp
1.266 + {
1.267 +public:
1.268 + CLogClearRecentClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.269 + void Start(TLogRecentList aList, TRequestStatus& aObserver
1.270 +#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
1.271 + , TSimId aSimId = KLogNullSimId
1.272 +#endif
1.273 + );
1.274 + //
1.275 +private:
1.276 + void InitiateRequestToServerL();
1.277 + //
1.278 +private:
1.279 + TLogRecentList iList;
1.280 +#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
1.281 + TSimId iSimId;
1.282 +#endif
1.283 + };
1.284 +
1.285 +/**
1.286 +Setup a view - Only synch version provided
1.287 +@internalComponent
1.288 +*/
1.289 +NONSHARABLE_CLASS(CLogViewSetupClientOp) : public CLogClientOp
1.290 + {
1.291 +public:
1.292 + CLogViewSetupClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.293 + TInt Start(TLogViewId aViewId, const CLogFilterList& aFilterList, TInt aParam, TLogFilterConstructionType aFilterConstructionType);
1.294 + //
1.295 +private:
1.296 + void InitiateRequestToServerL();
1.297 + //
1.298 +private:
1.299 + TLogViewId iViewId;
1.300 + const CLogFilterList* iFilterList;
1.301 + TInt iParam;
1.302 + };
1.303 +
1.304 +/**
1.305 +Remove an event from a view - Only synch version provided
1.306 +@internalComponent
1.307 +*/
1.308 +NONSHARABLE_CLASS(CLogViewRemoveEventClientOp) : public CLogClientOp
1.309 + {
1.310 +public:
1.311 + CLogViewRemoveEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.312 + TInt Start(TLogViewId aViewId, TLogId aId);
1.313 + //
1.314 +private:
1.315 + void InitiateRequestToServerL();
1.316 + //
1.317 +private:
1.318 + TLogViewId iViewId;
1.319 + TLogId iId;
1.320 + };
1.321 +
1.322 +/**
1.323 +Do maintenance on the database - for view creation?
1.324 +@internalComponent
1.325 +*/
1.326 +NONSHARABLE_CLASS(CLogMaintainClientOp) : public CLogClientOp
1.327 + {
1.328 +public:
1.329 + CLogMaintainClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
1.330 + //
1.331 +private:
1.332 + void InitiateRequestToServerL();
1.333 + };
1.334 +
1.335 +#endif