|
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: Contacts plug-in for LAWMO. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <f32file.h> |
|
19 #include <data_caging_path_literals.hrh> |
|
20 #include <centralrepository.h> |
|
21 #include "contactsplugin.h" |
|
22 #include "fdebug.h" |
|
23 #include "lawmocontactsasyncwipe.h" |
|
24 // Construction and destruction functions |
|
25 |
|
26 // ---------------------------------------------------------------------------------------- |
|
27 // CLAWMOContactsPlugin::NewL |
|
28 // ---------------------------------------------------------------------------------------- |
|
29 CLAWMOContactsPlugin* CLAWMOContactsPlugin::NewL(MLawmoPluginWipeObserver* aObserver) |
|
30 { |
|
31 FLOG(_L(" CLAWMOContactsPlugin* CLAWMOContactsPlugin::NewL(MLawmoPluginWipeObserver* aObserver) >>")); |
|
32 |
|
33 CLAWMOContactsPlugin* self=new(ELeave) CLAWMOContactsPlugin(); |
|
34 CleanupStack::PushL(self); |
|
35 self->ConstructL(aObserver); |
|
36 CleanupStack::Pop(); |
|
37 FLOG(_L(" CLAWMOContactsPlugin* CLAWMOContactsPlugin::NewL(MLawmoPluginWipeObserver* aObserver) <<")); |
|
38 return self; |
|
39 } |
|
40 |
|
41 // ---------------------------------------------------------------------------------------- |
|
42 // CLAWMOContactsPlugin::~CLAWMOContactsPlugin |
|
43 // ---------------------------------------------------------------------------------------- |
|
44 CLAWMOContactsPlugin::~CLAWMOContactsPlugin() |
|
45 { |
|
46 FLOG(_L(" CLAWMOContactsPlugin::~CLAWMOContactsPlugin() >>")); |
|
47 if(asyncOp) |
|
48 { |
|
49 FLOG(_L(" delete asyncOp; ")); |
|
50 delete asyncOp; |
|
51 } |
|
52 FLOG(_L(" CLAWMOContactsPlugin::~CLAWMOContactsPlugin() <<")); |
|
53 } |
|
54 |
|
55 // ---------------------------------------------------------------------------------------- |
|
56 // CLAWMOContactsPlugin::CLAWMOContactsPlugin |
|
57 // ---------------------------------------------------------------------------------------- |
|
58 CLAWMOContactsPlugin::CLAWMOContactsPlugin() |
|
59 { |
|
60 FLOG(_L(" CLAWMOContactsPlugin::CLAWMOContactsPlugin() >>")); |
|
61 // See ConstructL() for initialisation completion. |
|
62 FLOG(_L(" CLAWMOContactsPlugin::CLAWMOContactsPlugin() <<")); |
|
63 } |
|
64 |
|
65 // ---------------------------------------------------------------------------------------- |
|
66 // CLAWMOContactsPlugin::ConstructL |
|
67 // ---------------------------------------------------------------------------------------- |
|
68 void CLAWMOContactsPlugin::ConstructL(MLawmoPluginWipeObserver* aObserver) |
|
69 { |
|
70 FLOG(_L(" void CLAWMOContactsPlugin::ConstructL(MLawmoPluginWipeObserver* aObserver) >>")); |
|
71 FLOG(_L(" asyncOp = CActiveWipeObject::NewL(aObserver);")); |
|
72 asyncOp = CActiveWipeObject::NewL(aObserver); |
|
73 FLOG(_L(" void CLAWMOContactsPlugin::ConstructL(MLawmoPluginWipeObserver* aObserver) <<")); |
|
74 } |
|
75 |
|
76 // Implementation of CLAWMOPluginInterface |
|
77 |
|
78 // ---------------------------------------------------------------------------------------- |
|
79 // CLAWMOContactsPlugin::WipeL |
|
80 // Wipes the Contacts. |
|
81 // ---------------------------------------------------------------------------------------- |
|
82 |
|
83 void CLAWMOContactsPlugin::WipeL () |
|
84 { |
|
85 FLOG(_L(" void CLAWMOContactsPlugin::WipeL () >>")); |
|
86 |
|
87 FLOG(_L(" asyncOp->WipeAsyncL(); ")); |
|
88 asyncOp->WipeAsyncL(); |
|
89 /* |
|
90 TRequestStatus* status = &iStatus; |
|
91 User::RequestComplete(status, KErrNone); |
|
92 */ |
|
93 FLOG(_L(" void CLAWMOContactsPlugin::WipeL () <<")); |
|
94 } |
|
95 |