19 #ifndef IPSPLGSENDOPERATION_H |
19 #ifndef IPSPLGSENDOPERATION_H |
20 #define IPSPLGSENDOPERATION_H |
20 #define IPSPLGSENDOPERATION_H |
21 |
21 |
22 #include <smtcmtm.h> |
22 #include <smtcmtm.h> |
23 #include "ipsplgcommon.h" |
23 #include "ipsplgcommon.h" |
|
24 // <qmail> |
24 #include "ipsplgbaseoperation.h" |
25 #include "ipsplgbaseoperation.h" |
25 |
26 |
26 class CClientMtmRegistry; |
27 class CClientMtmRegistry; |
27 class MFSMailRequestObserver; |
28 class MFSMailRequestObserver; |
|
29 // </qmail> |
28 |
30 |
29 /** |
31 /** |
30 * Class for smtp related operations |
32 * Class for smtp related operations |
31 * |
33 * |
32 * @lib ipssosplugin.lib |
34 * @lib ipssosplugin.lib |
33 * @since FS 1.0 |
35 * @since FS 1.0 |
34 */ |
36 */ |
35 //should this class inherited from online operation |
37 // <qmail> base class changed: CMsvOperation -> CIpsPlgBaseOperation, MIpsPlgConnectOpCallback removed |
36 NONSHARABLE_CLASS( CIpsPlgSmtpOperation ) : public CIpsPlgBaseOperation |
38 NONSHARABLE_CLASS( CIpsPlgSmtpOperation ) : public CIpsPlgBaseOperation |
37 { |
39 { |
|
40 |
|
41 // <qmail> CredientialsSetL removed |
|
42 |
38 public: |
43 public: |
39 |
44 |
40 /** |
45 /** |
41 * Symbian 2nd phase construcror |
46 * Symbian 2nd phase construcror |
42 * |
47 * |
43 * @since FS 1.0 |
48 * @since FS 1.0 |
44 * @return None |
49 * @return None |
45 */ |
50 */ |
46 // <qmail> priority parameter has been removed |
51 // <qmail> aPriority, aUsePublishSubscribe parameters removed, aFSOperationObserver, aFSRequestId added |
47 IMPORT_C static CIpsPlgSmtpOperation* NewL( |
52 IMPORT_C static CIpsPlgSmtpOperation* NewL( |
48 CMsvSession& aMsvSession, |
53 CMsvSession& aMsvSession, |
49 TRequestStatus& aObserverRequestStatus, |
54 TRequestStatus& aObserverRequestStatus, |
50 MFSMailRequestObserver* aFSOperationObserver = NULL, |
55 MFSMailRequestObserver* aFSOperationObserver = NULL, |
51 TInt aFSRequestId = KErrNotFound ); |
56 TInt aFSRequestId = KErrNotFound ); |
54 * Symbian 2nd phase construcror |
59 * Symbian 2nd phase construcror |
55 * |
60 * |
56 * @since FS 1.0 |
61 * @since FS 1.0 |
57 * @return None |
62 * @return None |
58 */ |
63 */ |
59 // <qmail> priority parameter has been removed |
64 // <qmail> aPriority, aUsePublishSubscribe parameters removed, aFSOperationObserver, aFSRequestId added |
60 IMPORT_C static CIpsPlgSmtpOperation* NewLC( |
65 IMPORT_C static CIpsPlgSmtpOperation* NewLC( |
61 CMsvSession& aMsvSession, |
66 CMsvSession& aMsvSession, |
62 TRequestStatus& aObserverRequestStatus, |
67 TRequestStatus& aObserverRequestStatus, |
63 MFSMailRequestObserver* aOperationObserver = NULL, |
68 MFSMailRequestObserver* aOperationObserver = NULL, |
64 TInt aFSRequestId = KErrNotFound ); |
69 TInt aFSRequestId = KErrNotFound ); |
74 /** |
79 /** |
75 * From CMsvOperation |
80 * From CMsvOperation |
76 */ |
81 */ |
77 virtual const TDesC8& ProgressL(); |
82 virtual const TDesC8& ProgressL(); |
78 |
83 |
|
84 // <qmail> |
79 virtual const TDesC8& GetErrorProgressL( TInt aError ); |
85 virtual const TDesC8& GetErrorProgressL( TInt aError ); |
80 |
86 |
81 virtual TFSProgress GetFSProgressL() const; |
87 virtual TFSProgress GetFSProgressL() const; |
82 |
88 // </qmail> |
83 // <qmail> change ret val type |
89 |
|
90 // <qmail> change ret val type |
84 /** |
91 /** |
85 * Returns operation type |
92 * Returns operation type |
86 */ |
93 */ |
87 TIpsOpType IpsOpType() const; |
94 TIpsOpType IpsOpType() const; |
|
95 // </qmail> |
88 |
96 |
89 /** |
97 /** |
90 * Stard sending operation |
98 * Stard sending operation |
91 * |
99 * |
92 * @param aSelection message selection for send messages |
100 * @param aSelection message selection for send messages |
96 IMPORT_C void StartSendL( TMsvId aMessageId ); |
104 IMPORT_C void StartSendL( TMsvId aMessageId ); |
97 |
105 |
98 IMPORT_C TInt EmptyOutboxFromPendingMessagesL( TMsvId aMailboxId ); |
106 IMPORT_C TInt EmptyOutboxFromPendingMessagesL( TMsvId aMailboxId ); |
99 |
107 |
100 IMPORT_C CMsvEntrySelection* GetOutboxChildrensL( ); |
108 IMPORT_C CMsvEntrySelection* GetOutboxChildrensL( ); |
|
109 |
|
110 /** |
|
111 * Sets CIpsPlgEventHandler |
|
112 */ |
|
113 void SetEventHandler( TAny* aEventHandler ); |
101 |
114 |
102 protected: |
115 protected: |
103 |
116 |
104 /** |
117 /** |
105 * Class constructor |
118 * Class constructor |
106 * |
119 * |
107 * @since FS 1.0 |
120 * @since FS 1.0 |
108 * @return None |
121 * @return None |
109 */ |
122 */ |
110 // <qmail> priority parameter has been removed |
123 // <qmail> aPriority parameter removed, aFSOperationObserver, aFSRequestId added |
111 CIpsPlgSmtpOperation( |
124 CIpsPlgSmtpOperation( |
112 CMsvSession& aMsvSession, |
125 CMsvSession& aMsvSession, |
113 TRequestStatus& aObserverRequestStatus, |
126 TRequestStatus& aObserverRequestStatus, |
114 MFSMailRequestObserver* aFSOperationObserver, |
127 MFSMailRequestObserver* aFSOperationObserver, |
115 TInt aFSRequestId ); |
128 TInt aFSRequestId ); |
116 |
129 |
117 /** |
130 /** |
118 * Constructor for leaving methods |
131 * Constructor for leaving methods |
119 * |
132 * |
120 * @since FS 1.0 |
133 * @since FS 1.0 |
121 * @return None |
134 * @return None |
122 */ |
135 */ |
123 void ConstructL( ); |
136 void ConstructL( ); |
124 |
137 |
|
138 /** |
|
139 * Completes observer with status aStatus |
|
140 * @param aStatus: Status of the operation. |
|
141 */ |
|
142 void CompleteObserver( TInt aStatus = KErrNone ); |
|
143 |
|
144 /** |
|
145 * Completes itself with KErrNone status |
|
146 */ |
|
147 void CompleteThis(); |
|
148 |
125 private: // From CActive |
149 private: // From CActive |
126 |
150 |
127 enum TIpsSendState |
151 enum TIpsSendState |
128 { |
152 { |
129 EMovingOutbox, |
153 EIdle, |
130 ESending |
154 EMovingOutbox, // moving mail to OutBox folder |
|
155 ESending // sending mail |
|
156 // <qmail> EQueryingDetails, EQueryingDetailsBusy removed |
131 }; |
157 }; |
132 |
158 |
133 /** |
159 /** |
134 * From CActive |
160 * From CActive |
135 * |
161 * |
136 * @since FS 1.0 |
162 * @since FS 1.0 |
137 */ |
163 */ |
138 void RunL( ); |
164 void RunL( ); |
139 |
165 |
|
166 // <qmail> |
140 TInt RunError( TInt aError ); |
167 TInt RunError( TInt aError ); |
|
168 // </qmail> |
141 |
169 |
142 void DoCancel( ); |
170 void DoCancel( ); |
143 |
171 |
144 /** |
172 /** |
145 * |
173 * |
164 * Validates an array of address |
192 * Validates an array of address |
165 * Either returns silently if everything id ok, or leaves with KErrBadName |
193 * Either returns silently if everything id ok, or leaves with KErrBadName |
166 * @param aRecipients array of addresses |
194 * @param aRecipients array of addresses |
167 */ |
195 */ |
168 void ValidateAddressArrayL( const CDesCArray& aRecipients ); |
196 void ValidateAddressArrayL( const CDesCArray& aRecipients ); |
169 |
197 |
|
198 // <qmail> QueryUserPassL() function removed |
170 private: |
199 private: |
171 |
200 |
172 CSmtpClientMtm* iSmtpMtm; |
201 CSmtpClientMtm* iSmtpMtm; |
173 CMsvOperation* iOperation; |
202 CMsvOperation* iOperation; |
174 CMsvEntrySelection* iSelection; |
203 CMsvEntrySelection* iSelection; |
175 CClientMtmRegistry* iMtmRegistry; |
204 CClientMtmRegistry* iMtmRegistry; |
176 TInt iState; |
205 TInt iState; |
177 TMsvId iSmtpService; |
206 TMsvId iSmtpService; |
|
207 // <qmail> |
178 MFSMailRequestObserver* iFSOperationObserver; |
208 MFSMailRequestObserver* iFSOperationObserver; |
179 TFSProgress iFSProgress; |
209 TFSProgress iFSProgress; |
|
210 // </qmail> |
|
211 // not owned |
|
212 TAny* iEventHandler; // pointer to CIpsPlgEventHandler |
180 }; |
213 }; |
181 |
214 |
182 #endif /* IPSPLGSENDOPERATION_H */ |
215 #endif /* IPSPLGSENDOPERATION_H */ |