omadm/lawmo/lawmoplugins/contactsplugin/inc/lawmocontactsasyncwipe.h
branchRCL_3
changeset 70 5d5344402085
parent 65 450d1facd418
child 73 5042b6604f6f
equal deleted inserted replaced
65:450d1facd418 70:5d5344402085
     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 Contacts, will be called by lawmocontactsplugin.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef ACTIVEWIPEOBJECT_H 
       
    19 #define ACTIVEWIPEOBJECT_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <f32file.h>
       
    23 #include <lawmocallbackinterface.h>
       
    24 
       
    25 #include <CPbkContactEngine.h>
       
    26 #include <CPbkSingleEntryFetchDlg.h>
       
    27 #include <RPbkViewResourceFile.h>
       
    28 #include <cntdb.h>
       
    29 #include "fdebug.h"
       
    30  
       
    31 #include <w32std.h>
       
    32 
       
    33 
       
    34 class CActiveWipeObject : public CActive
       
    35 {
       
    36 public:
       
    37      static CActiveWipeObject* NewL(MLawmoPluginWipeObserver* aObserver);
       
    38 
       
    39      ~CActiveWipeObject();
       
    40      void WipeAsyncL();
       
    41 private: //Derived from CActive
       
    42      // Handle completion
       
    43      void RunL();
       
    44 
       
    45      // How to cancel me
       
    46      void DoCancel();
       
    47 
       
    48      // Override to handle leaves from RunL(). Default implementation causes
       
    49      // the active scheduler to panic.
       
    50      TInt RunError(TInt aError);
       
    51 
       
    52 private: //All private functions of this class     
       
    53      // Deletes the Phone book contacts
       
    54      void DeletePhoneContactsL();
       
    55      // Deletes all the SIM contacts
       
    56      void DeleteSIMContactsL();
       
    57      // Wait Till PhoneBook Application EndTask();
       
    58      TBool WaitTillPhoneBookKilled();     
       
    59      
       
    60      /**
       
    61       * second phase constructor
       
    62       */
       
    63      void ConstructL();
       
    64      
       
    65      // Construction
       
    66      CActiveWipeObject(MLawmoPluginWipeObserver* aObserver);
       
    67     
       
    68 private: //All private members of this class
       
    69 	    	
       
    70      MLawmoPluginWipeObserver* iObserver; //Not owned
       
    71      CContactDatabase* iContactsDb;
       
    72      const CContactIdArray* iContacts;
       
    73      RTimer iTimer;
       
    74      RWsSession iWsSession;
       
    75 } ;
       
    76 
       
    77 #endif //ACTIVEWIPEOBJECT_H