16 */ |
16 */ |
17 |
17 |
18 #ifndef IPSPLGDISCONNECTOP_H |
18 #ifndef IPSPLGDISCONNECTOP_H |
19 #define IPSPLGDISCONNECTOP_H |
19 #define IPSPLGDISCONNECTOP_H |
20 |
20 |
|
21 |
21 #include "ipsplgonlineoperation.h" |
22 #include "ipsplgonlineoperation.h" |
22 |
23 |
|
24 |
23 /** |
25 /** |
24 * Disconnect operation |
26 * Disconnect operation. |
25 * Handles both POP and IMAP cases |
27 * |
26 */ |
28 */ |
27 NONSHARABLE_CLASS ( CIpsPlgDisconnectOp ) : |
29 class CIpsPlgDisconnectOp : |
28 public CIpsPlgOnlineOperation |
30 public CIpsPlgOnlineOperation |
29 { |
31 { |
30 public: |
32 public: |
31 /** |
|
32 * Construction |
|
33 * @param aMsvSession client/server session to MsvServer |
|
34 * @param aObserverRequestStatus caller's status |
|
35 * @param aService serviceId of the mailbox |
|
36 * @param aActivityTimer mailbox specific activity timer |
|
37 * @param aFSMailBoxId specifies mailbox |
|
38 * @param aFSOperationObserver observer of the operation |
|
39 * @param aFSRequestId identifier for this request instance |
|
40 * @return instance of this operation class |
|
41 */ |
|
42 // <qmail> aDoRemoveAfterDisconnect parameter removed |
|
43 // <qmail> MFSMailRequestObserver& changed to pointer |
|
44 static CIpsPlgDisconnectOp* NewL( |
|
45 CMsvSession& aMsvSession, |
|
46 TRequestStatus& aObserverRequestStatus, |
|
47 TMsvId aService, |
|
48 CIpsPlgTimerOperation& aActivityTimer, |
|
49 TFSMailMsgId aFSMailBoxId, |
|
50 MFSMailRequestObserver* aFSOperationObserver, |
|
51 TInt aFSRequestId ); |
|
52 |
33 |
53 virtual ~CIpsPlgDisconnectOp(); |
34 /** |
|
35 * |
|
36 */ |
|
37 static CIpsPlgDisconnectOp* NewL( |
|
38 CMsvSession& aMsvSession, |
|
39 TRequestStatus& aObserverRequestStatus, |
|
40 TMsvId aService, |
|
41 CIpsPlgTimerOperation& aActivityTimer, |
|
42 TFSMailMsgId aFSMailBoxId, |
|
43 MFSMailRequestObserver& aFSOperationObserver, |
|
44 TInt aFSRequestId, |
|
45 TBool aDoRemoveAfterDisconnect = EFalse ); |
54 |
46 |
55 /** |
47 /** |
56 * From MsvOperation |
48 * |
57 * Gets information on the progress of the operation |
49 */ |
58 * (see MsvOperation header) |
50 virtual ~CIpsPlgDisconnectOp(); |
59 */ |
|
60 const TDesC8& ProgressL(); |
|
61 |
51 |
62 /** |
52 /** |
63 * From CIpsPlgBaseOperation |
53 * |
64 * For reporting if DoRunL leaves |
54 */ |
65 */ |
55 const TDesC8& ProgressL(); |
66 const TDesC8& GetErrorProgressL( TInt aError ); |
|
67 |
|
68 TFSProgress GetFSProgressL() const; |
|
69 |
56 |
70 // <qmail> Connected() used from baseclass |
57 /** |
71 |
58 * |
72 // <qmail> new function in this op |
59 */ |
73 TIpsOpType IpsOpType() const; |
60 const TDesC8& GetErrorProgressL( TInt aError ); |
74 // </qmail> |
61 |
75 |
62 /** |
76 protected: // From CActive |
63 * |
77 void DoRunL(); |
64 */ |
78 |
65 TFSProgress GetFSProgressL() const; |
79 private: |
|
80 |
66 |
81 // <qmail> aDoRemoveAfterDisconnect parameter removed |
67 /** |
82 // <qmail> MFSMailRequestObserver& changed to pointer |
68 * |
83 CIpsPlgDisconnectOp( |
69 */ |
84 CMsvSession& aMsvSession, |
70 TBool Connected() const; |
85 TRequestStatus& aObserverRequestStatus, |
|
86 TMsvId aServiceId, |
|
87 CIpsPlgTimerOperation& aActivityTimer, |
|
88 TFSMailMsgId aFSMailBoxId, |
|
89 MFSMailRequestObserver* aFSOperationObserver, |
|
90 TInt aFSRequestId ); |
|
91 |
71 |
92 void ConstructL(); |
72 protected: |
93 |
73 |
94 /** |
|
95 * Sends the disconnect command to MsvServer |
|
96 */ |
|
97 void DoDisconnectL(); |
|
98 |
74 |
99 private: // Data |
75 /** |
100 TPckgBuf<TPop3Progress> iPopProgress; |
76 * From CActive |
101 TPckgBuf<TImap4CompoundProgress> iImapProgress; |
77 */ |
102 TMsvEntry iTEntry; |
78 void DoRunL(); |
103 // <qmail> iDisconnected; removed; using baseclass's Connected() instead |
79 |
104 // <qmail> iDoRemoveAfterDisconnect removed; not a task for disconnect op |
80 private: |
|
81 |
|
82 /** |
|
83 * |
|
84 */ |
|
85 CIpsPlgDisconnectOp( |
|
86 CMsvSession& aMsvSession, |
|
87 TRequestStatus& aObserverRequestStatus, |
|
88 TMsvId aServiceId, |
|
89 CIpsPlgTimerOperation& aActivityTimer, |
|
90 TFSMailMsgId aFSMailBoxId, |
|
91 MFSMailRequestObserver& aFSOperationObserver, |
|
92 TInt aFSRequestId, |
|
93 TBool aDoRemoveAfterDisconnect ); |
|
94 |
|
95 /** |
|
96 * |
|
97 */ |
|
98 void ConstructL(); |
|
99 |
|
100 /** |
|
101 * |
|
102 */ |
|
103 void DoDisconnectL(); |
|
104 |
|
105 |
|
106 private: // Data |
|
107 |
|
108 TPckgBuf<TPop3Progress> iPopProgress; |
|
109 TPckgBuf<TImap4CompoundProgress> iImapProgress; |
|
110 TMsvEntry iTEntry; |
|
111 TBool iDisconnected; |
|
112 TBool iDoRemoveAfterDisconnect; |
|
113 |
105 }; |
114 }; |
106 |
115 |
107 #endif //IPSPLGDISCONNECTOP_H |
116 #endif //IPSPLGDISCONNECTOP_H |