|
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 "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: Active object for wiping CallLogs, called by lawmocalllogsplugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef LAWMOCALLLOGSAYNCWIPE_H |
|
19 #define LAWMOCALLLOGSAYNCWIPE_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <f32file.h> |
|
23 #include <lawmocallbackinterface.h> |
|
24 #include <logcli.h> |
|
25 #include <w32std.h> |
|
26 #include "fdebug.h" |
|
27 |
|
28 |
|
29 // Time Max constant |
|
30 _LIT( KMaxTime, "99991130:235959.999999"); |
|
31 // Call Logs App UId |
|
32 #define KCallLogsAppUid 0x101F4CD5 |
|
33 |
|
34 class CActiveWipeObject : public CActive |
|
35 { |
|
36 public: |
|
37 static CActiveWipeObject* NewL(MLawmoPluginWipeObserver* aObserver); |
|
38 |
|
39 ~CActiveWipeObject(); |
|
40 /* |
|
41 * Name: WipeAsyncL |
|
42 * Input args: None |
|
43 * Output args: None |
|
44 * Description: Wipes the call-logs - including master logs. |
|
45 */ |
|
46 void WipeAsyncL(); |
|
47 |
|
48 private: // Derived from CActive |
|
49 // Handle completion |
|
50 void RunL(); |
|
51 |
|
52 // How to cancel me |
|
53 void DoCancel(); |
|
54 |
|
55 // Override to handle leaves from RunL(). Default implementation causes |
|
56 // the active scheduler to panic. |
|
57 TInt RunError(TInt aError); |
|
58 |
|
59 private: //Private functions for this class |
|
60 |
|
61 /** |
|
62 * second phase constructor |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 // Construction |
|
67 CActiveWipeObject(MLawmoPluginWipeObserver* aObserver); |
|
68 |
|
69 // Wait Till Call-Logs Application EndTask(); |
|
70 TBool WaitTillLogsAppKilled(); |
|
71 |
|
72 // Clears the logs |
|
73 void ClearLogsL(); |
|
74 |
|
75 private: //Private member variables |
|
76 |
|
77 // State of the active object |
|
78 TInt iState; |
|
79 |
|
80 // Observer member for the callback. Not owned |
|
81 MLawmoPluginWipeObserver* iObserver; |
|
82 |
|
83 // Call-log client member |
|
84 CLogClient* ilogClient; |
|
85 |
|
86 // RFs for Call-logs |
|
87 RFs ifs; |
|
88 |
|
89 // Timer |
|
90 RTimer iTimer; |
|
91 |
|
92 //The windows server session |
|
93 RWsSession iWsSession; |
|
94 |
|
95 //Tells whether timer is started or not |
|
96 TBool iTimerStarted; |
|
97 } ; |
|
98 |
|
99 #endif //LAWMOCALLLOGSAYNCWIPE_H |