emailuis/nmframeworkadapter/inc/nmfwamessagesendingoperation.h
branchRCL_3
changeset 63 d189ee25cf9d
equal deleted inserted replaced
61:dcf0eedfc1a3 63:d189ee25cf9d
       
     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 NMFWAMESSAGESENDINGOPERATION_H_
       
    19 #define NMFWAMESSAGESENDINGOPERATION_H_
       
    20 
       
    21 #include <QPointer>
       
    22 #include <nmmessagesendingoperation.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 NmFwaMessageSendingOperation : public NmMessageSendingOperation,
       
    32                                      public MFSMailRequestObserver
       
    33 {
       
    34     Q_OBJECT
       
    35 public:
       
    36     NmFwaMessageSendingOperation(NmDataPluginInterface &pluginInterface,
       
    37                                  NmMessage *message,
       
    38                                  CFSMailClient &mailClient);
       
    39     
       
    40     const NmMessage *getMessage() const;
       
    41 
       
    42     // from MFSMailRequestObserver
       
    43     void RequestResponseL(TFSProgress aEvent, TInt aRequestId);
       
    44 
       
    45 protected slots:
       
    46     void handleCompletedSaveOperation(int error);
       
    47     
       
    48 protected:
       
    49     void doRunAsyncOperation();
       
    50     void doCompleteOperation();
       
    51     void doCancelOperation();
       
    52 
       
    53 private:
       
    54     ~NmFwaMessageSendingOperation();
       
    55     int saveMessageWithSubparts();
       
    56     int sendMessageL();
       
    57 
       
    58 private:
       
    59     NmDataPluginInterface &mPluginInterface;
       
    60     QPointer<NmOperation> mSaveOperation;    // Not owned
       
    61     NmMessage *mMessage;                     // Owned
       
    62     CFSMailClient &mMailClient;
       
    63     TInt mRequestId;
       
    64     bool mSaved;
       
    65 };
       
    66 
       
    67 #endif /* NMFWAMESSAGESENDINGOPERATION_H_ */