omadm/lawmo/lawmoplugins/messagingplugin/inc/lawmomessagingasyncwipe.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 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 
       
    32 #define KMessagingAppUid 0x100058C5  // Messgaing App Uid
       
    33 
       
    34 class CDummyObserver : public CBase, public MMsvSessionObserver
       
    35 {
       
    36 public:
       
    37         void HandleSessionEventL(TMsvSessionEvent aEvent, TAny*, TAny*, TAny*){}
       
    38 };
       
    39 
       
    40 class CActiveWipeObject : public CActive
       
    41 {
       
    42 public:
       
    43      static CActiveWipeObject* NewL(MLawmoPluginWipeObserver* aObserver);
       
    44 
       
    45      ~CActiveWipeObject();
       
    46      void WipeAsyncL();
       
    47        
       
    48 private:
       
    49      // Over-riding the Base class functions.
       
    50      void DoCancel();
       
    51      TInt RunError(TInt aError);
       
    52      void RunL();
       
    53      
       
    54 private:
       
    55      /**
       
    56       * second phase constructor
       
    57       */
       
    58      void ConstructL();
       
    59      
       
    60      // Construction
       
    61      CActiveWipeObject(MLawmoPluginWipeObserver* aObserver);
       
    62      void DoJobL(CMsvEntry* aContext);
       
    63      void InitializeL();
       
    64      void Close();
       
    65      void  WipeAllL();
       
    66      TBool WaitTillMessageAppKilled();
       
    67     
       
    68      MLawmoPluginWipeObserver* iObserver;
       
    69      RTimer iTimer; // Provides async timing service
       
    70      RWsSession iWs;
       
    71      CDummyObserver* iDummyObserver;
       
    72      CMsvSession* iSession;
       
    73 } ;
       
    74 
       
    75 #endif //ACTIVEWIPEOBJECT_H