|
1 /* |
|
2 * Copyright (c) 2006 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 * Class declaration file |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __EMAILPRECREATION_H__ |
|
20 #define __EMAILPRECREATION_H__ |
|
21 |
|
22 #include "ImumOnlineOperation.h" |
|
23 #include "SelectionOperationBase.h" |
|
24 #include <smtpset.h> |
|
25 #include <ImumInternalApi.h> |
|
26 class CMsvEmailConnectionProgressProvider; |
|
27 class CMtmStore; |
|
28 |
|
29 /** |
|
30 * CEmailPreCreation |
|
31 * This operation encapsulates an optimisation that, rather than forcing the |
|
32 * editor to create a new message every time, we create one invisible blank |
|
33 * message for each email account in the drafts folder, and tell the editor to |
|
34 * edit this message. |
|
35 */ |
|
36 class CEmailPreCreation : public CBase |
|
37 { |
|
38 public: |
|
39 /** |
|
40 * NewL |
|
41 * @param CMsvSession&, session reference |
|
42 * @return CEmailPreCreation*, self pointer |
|
43 */ |
|
44 static CEmailPreCreation* NewL( CImumInternalApi& aMailboxApi ); |
|
45 |
|
46 /** |
|
47 * ~CEmailPreCreation |
|
48 * Destructior |
|
49 */ |
|
50 virtual ~CEmailPreCreation(); |
|
51 |
|
52 public: |
|
53 /** |
|
54 * PreCreateBlankEmailL |
|
55 * @param TRequestStatus&, request status |
|
56 * @param TMsvId, service id |
|
57 * @return CMsvOperation*, operation |
|
58 */ |
|
59 CMsvOperation* PreCreateBlankEmailL( |
|
60 TMsvId aServiceId, |
|
61 TRequestStatus& aStatus ); |
|
62 |
|
63 /** |
|
64 * DeleteAllPreCreatedEmailsL (synchronous) |
|
65 * @param TMsvId, service id |
|
66 */ |
|
67 void DeleteAllPreCreatedEmailsL( |
|
68 TMsvId aServiceId ); |
|
69 |
|
70 /** |
|
71 * DeleteAllPreCreatedEmailsL |
|
72 * Returns NULL if none found. |
|
73 * @param TRequestStatus&, request status |
|
74 * @param TMsvId, service id |
|
75 * @return CMsvOperation*, operation |
|
76 */ |
|
77 CMsvOperation* DeleteAllPreCreatedEmailsL( |
|
78 TMsvId aServiceId, |
|
79 TRequestStatus& aStatus ); |
|
80 |
|
81 /** |
|
82 * FindPreCreatedEmailL |
|
83 * @param TMsvId, service id |
|
84 * @param TMsvId, exclude id |
|
85 * @return TMsvId, id of found email |
|
86 */ |
|
87 TMsvId FindPreCreatedEmailL( |
|
88 TMsvId aServiceId, |
|
89 TMsvId aExclude ); |
|
90 |
|
91 private: |
|
92 /** |
|
93 * ConstructL |
|
94 * @param CMsvSession&, session reference |
|
95 */ |
|
96 void ConstructL(); |
|
97 |
|
98 /** |
|
99 * |
|
100 * @since S60 3.2 |
|
101 */ |
|
102 CEmailPreCreation( CImumInternalApi& aMailboxApi ); |
|
103 |
|
104 /** |
|
105 * ServiceUsesMHTMLEncodingL |
|
106 * @param TMsvId, service id |
|
107 * @return TBool, ETrue if uses HTML encoding |
|
108 */ |
|
109 TBool ServiceUsesMHTMLEncodingL( TMsvId aServiceId ); |
|
110 |
|
111 /** |
|
112 * DeleteEmailWithoutServiceL |
|
113 * Deletes all the invisible mail entries which service cannot be found |
|
114 */ |
|
115 void DeleteEmailWithoutServiceL(); |
|
116 |
|
117 private: // Data |
|
118 CImumInternalApi& iMailboxApi; |
|
119 CMsvEntry* iEntry; |
|
120 }; |
|
121 |
|
122 |
|
123 |
|
124 #endif |