emailuis/nmframeworkadapter/inc/nmfwaremovedraftmessageoperation.h
changeset 43 99bcbff212ad
child 62 a8c646b56683
equal deleted inserted replaced
42:139d4b7b2938 43:99bcbff212ad
       
     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:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef NMFWAREMOVEDRAFTMESSAGEOPERATION_H_
       
    19 #define NMFWAREMOVEDRAFTMESSAGEOPERATION_H_
       
    20 
       
    21 #include <QPointer>
       
    22 #include <nmoperation.h>
       
    23 #include <nmcommon.h>
       
    24 #include <CFSMailCommon.h>
       
    25 #include <MFSMailRequestObserver.h>
       
    26 
       
    27 class NmMessage;
       
    28 class NmDataPluginInterface;
       
    29 class CFSMailClient;
       
    30 
       
    31 class NmFwaRemoveDraftMessageOperation : public NmOperation,
       
    32                                          public MFSMailRequestObserver
       
    33 {
       
    34     Q_OBJECT
       
    35 public:
       
    36     NmFwaRemoveDraftMessageOperation(NmDataPluginInterface &pluginInterface,
       
    37                                  NmMessage *message,
       
    38                                  CFSMailClient &mailClient);
       
    39     
       
    40     // from MFSMailRequestObserver
       
    41     void RequestResponseL(TFSProgress aEvent, TInt aRequestId);
       
    42 
       
    43 protected:
       
    44     void doRunAsyncOperation();
       
    45     void doCompleteOperation();
       
    46     void doCancelOperation();
       
    47 
       
    48 private:
       
    49     ~NmFwaRemoveDraftMessageOperation();
       
    50 
       
    51     void removeMessageL();
       
    52 
       
    53 private:
       
    54     NmDataPluginInterface &mPluginInterface;
       
    55     NmMessage *mMessage;    // Owned
       
    56     CFSMailClient &mMailClient;
       
    57     TInt mRequestId;
       
    58 };
       
    59 
       
    60 #endif /* NMFWAREMOVEDRAFTMESSAGEOPERATION_H_ */