|
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 the wiping messages, called by lawmomessagingplugin. |
|
15 * |
|
16 */ |
|
17 #ifndef ACTIVEWIPEOBJECT_H |
|
18 #define ACTIVEWIPEOBJECT_H |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <f32file.h> |
|
22 #include <msvstd.h> |
|
23 #include <msvapi.h> |
|
24 #include <msvids.h> |
|
25 #include <lawmocallbackinterface.h> |
|
26 #include "fdebug.h" |
|
27 |
|
28 // Application Closing |
|
29 #include <apgtask.h> |
|
30 #include <w32std.h> |
|
31 #include <APGTASK.H> |
|
32 |
|
33 #define KMessagingAppUid 0x100058C5 // Messgaing App Uid |
|
34 |
|
35 class CDummyObserver : public CBase, public MMsvSessionObserver |
|
36 { |
|
37 public: |
|
38 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny*, TAny*, TAny*){} |
|
39 }; |
|
40 |
|
41 class CActiveWipeObject : public CActive |
|
42 { |
|
43 public: |
|
44 static CActiveWipeObject* NewL(MLawmoPluginWipeObserver* aObserver); |
|
45 |
|
46 ~CActiveWipeObject(); |
|
47 void WipeAsyncL(); |
|
48 |
|
49 private: |
|
50 // Over-riding the Base class functions. |
|
51 void DoCancel(); |
|
52 TInt RunError(TInt aError); |
|
53 void RunL(); |
|
54 |
|
55 private: |
|
56 /** |
|
57 * second phase constructor |
|
58 */ |
|
59 void ConstructL(); |
|
60 |
|
61 // Construction |
|
62 CActiveWipeObject(MLawmoPluginWipeObserver* aObserver); |
|
63 void DoJobL(CMsvEntry* aContext); |
|
64 void InitializeL(); |
|
65 void Close(); |
|
66 void WipeAllL(); |
|
67 TBool WaitTillMessageAppKilled(); |
|
68 |
|
69 MLawmoPluginWipeObserver* iObserver; |
|
70 RTimer iTimer; // Provides async timing service |
|
71 RWsSession iWs; |
|
72 CDummyObserver* iDummyObserver; |
|
73 CMsvSession* iSession; |
|
74 } ; |
|
75 |
|
76 #endif //ACTIVEWIPEOBJECT_H |