emailuis/nmframeworkadapter/inc/nmfwamessagesendingoperation.h
changeset 20 ecc8def7944a
parent 18 578830873419
child 23 2dc6caa42ec3
--- a/emailuis/nmframeworkadapter/inc/nmfwamessagesendingoperation.h	Fri Apr 16 14:51:52 2010 +0300
+++ b/emailuis/nmframeworkadapter/inc/nmfwamessagesendingoperation.h	Mon May 03 12:23:15 2010 +0300
@@ -25,6 +25,7 @@
 #include <MFSMailRequestObserver.h>
 
 class NmMessage;
+class NmDataPluginInterface;
 class CFSMailClient;
 
 class NmFwaMessageSendingOperation : public NmMessageSendingOperation,
@@ -32,31 +33,36 @@
 {
     Q_OBJECT
 public:
-    NmFwaMessageSendingOperation(NmMessage *message,
+    NmFwaMessageSendingOperation(NmDataPluginInterface &pluginInterface,
+                                 NmMessage *message,
                                  CFSMailClient &mailClient);
     
     ~NmFwaMessageSendingOperation();
 
-    const NmMessage *getMessage();
+    const NmMessage *getMessage() const;
 
     // from MFSMailRequestObserver
     void RequestResponseL(TFSProgress aEvent, TInt aRequestId);
 
 protected slots:
-    void runAsyncOperation();
+    void handleCompletedSaveOperation(int error);
     
 protected:
+    void doRunAsyncOperation();
     void doCompleteOperation();
-
     void doCancelOperation();
 
 private:
-    void runAsyncOperationL();
+    int saveMessageWithSubparts();
+    int sendMessageL();
 
 private:
-    NmMessage *mMessage;
+    NmDataPluginInterface &mPluginInterface;
+    NmOperation *mSaveOperation;    // Owned
+    NmMessage *mMessage;            // Owned
     CFSMailClient &mMailClient;
     TInt mRequestId;
+    bool mSaved;
 };
 
 #endif /* NMFWAMESSAGESENDINGOPERATION_H_ */