|
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This is the public API header file for SMTS.DLL - |
|
15 // the transport driver which sends Imail using the |
|
16 // SMTP Internet protocol. |
|
17 // |
|
18 // |
|
19 |
|
20 #if !defined(__SMTS_H__) |
|
21 #define __SMTS_H__ |
|
22 #if !defined(__MTSR_H__) |
|
23 #include <mtsr.h> |
|
24 #endif |
|
25 |
|
26 #include <smtpset.h> |
|
27 #include <commdb.h> |
|
28 #include <tnonoperationmtmdata.h> |
|
29 |
|
30 class CMsgImOutboxSend; |
|
31 |
|
32 /** |
|
33 @internalTechnology |
|
34 @released |
|
35 */ |
|
36 typedef TPckgBuf<TImSmtpProgress> TImSmtpProgressBuf; |
|
37 |
|
38 class CSmtpSrvMtm : public CBaseServerMtm |
|
39 /** |
|
40 @internalTechnology |
|
41 @released |
|
42 */ |
|
43 { |
|
44 public: |
|
45 IMPORT_C static CSmtpSrvMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry); |
|
46 ~CSmtpSrvMtm(); |
|
47 |
|
48 void CopyToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
49 void MoveToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
50 void CopyFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
51 void MoveFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
52 void CopyWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
53 void MoveWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
54 void DeleteAllL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus); |
|
55 void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus); |
|
56 void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus); |
|
57 // |
|
58 void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus); |
|
59 // |
|
60 TBool CommandExpected(); |
|
61 // |
|
62 const TDesC8& Progress(); |
|
63 // |
|
64 |
|
65 protected: |
|
66 void DoCancel(); |
|
67 void DoRunL(); |
|
68 void DoComplete(TInt aError); |
|
69 TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1); |
|
70 private: |
|
71 CSmtpSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry); |
|
72 void ConstructL(); |
|
73 void DoSendMessagesL(TRequestStatus& aStatus); |
|
74 void CopyToOurSelectionL(const CMsvEntrySelection& aSourceSelection); |
|
75 void AddWaitingInOutboxToSelectionL(); |
|
76 TInt SetServiceToConnected(TBool aConnected); |
|
77 TInt GetNonOperationMtmData(TNonOperationMtmDataType aMtmDataType, TPtrC8& aMtmDataBuffer); |
|
78 |
|
79 private: |
|
80 |
|
81 TMsvId iServiceId; |
|
82 CMsgImOutboxSend* iOutboxSend; |
|
83 TRequestStatus* iReport; |
|
84 TImSmtpProgressBuf iProgressBuffer; |
|
85 TInt iSessionError; |
|
86 TUint32 iIntrAddress; |
|
87 CMsvEntrySelection* iSendSelection; |
|
88 |
|
89 #if (defined SYMBIAN_USER_PROMPT_SERVICE) |
|
90 TThreadId iClientThreadId; |
|
91 TBool iHasCapability; |
|
92 #endif |
|
93 |
|
94 TNonOperationMtmDataAccessPointIdBuffer iMtmDataAccessPointIdBuffer; |
|
95 |
|
96 }; |
|
97 |
|
98 #endif |