|
1 /* |
|
2 * Copyright (c) 2007-2009 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: common base mailbox object |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CFSMAILBOXBASE_H |
|
20 #define __CFSMAILBOXBASE_H |
|
21 |
|
22 #include "cfsmailfolder.h" |
|
23 #include "mmrinfoprocessor.h" |
|
24 #include "cemailextensionbase.h" |
|
25 |
|
26 /** |
|
27 * base class for handling mailbox data |
|
28 * |
|
29 * @lib FSFWCommonLib |
|
30 |
|
31 */ |
|
32 |
|
33 class CFSMailBoxBase : public CExtendableEmail |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * |
|
40 * @param aMailBoxId mailbox id in plugin containing mailbox |
|
41 */ |
|
42 IMPORT_C static CFSMailBoxBase* NewL(const TFSMailMsgId aMailBoxId); |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * |
|
47 * @param aMailBoxId mailbox id in plugin containing mailbox |
|
48 */ |
|
49 IMPORT_C static CFSMailBoxBase* NewLC(const TFSMailMsgId aMailBoxId); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 IMPORT_C virtual ~CFSMailBoxBase(); |
|
55 |
|
56 /** |
|
57 * mailbox id accessor |
|
58 * |
|
59 * @return mailbox id |
|
60 */ |
|
61 IMPORT_C TFSMailMsgId GetId( ) const; |
|
62 |
|
63 /** |
|
64 * mailbox name accessor |
|
65 * |
|
66 * @return mailbox name |
|
67 */ |
|
68 IMPORT_C TDesC& GetName( ) const; |
|
69 |
|
70 /** |
|
71 * mailbox name mutator |
|
72 * |
|
73 * @param aMailBoxName mailbox name |
|
74 */ |
|
75 IMPORT_C void SetName( const TDesC& aMailBoxName ); |
|
76 |
|
77 /** |
|
78 * retuns mailbox status accessor |
|
79 * |
|
80 * @return mailbox status |
|
81 */ |
|
82 IMPORT_C TFSMailBoxStatus GetStatus( ) const; |
|
83 |
|
84 /** |
|
85 * mailbox status mutator |
|
86 * |
|
87 * @param aStatus mailbox status |
|
88 */ |
|
89 //<cmail> |
|
90 //function definition is empty, we need to remove it if not needed |
|
91 //</cmail> |
|
92 IMPORT_C void SetStatus( const TFSMailBoxStatus aStatus ); |
|
93 |
|
94 /* |
|
95 * Function to set context of Remote Contact Lookup service for |
|
96 * this mailbox for protocol plugins. |
|
97 * |
|
98 * @param aProtocolUid specifies Ecom implementation UID of |
|
99 * "Remote Contact Lookup Protocol Adaptation API" to use. |
|
100 * @param aMailBoxId mailbox id in plugin |
|
101 */ |
|
102 IMPORT_C void SetRCLInfo(const TUid aProtocolUid, const TUint aMailBoxId); |
|
103 |
|
104 /* |
|
105 * Function to retrieve Remote Contact Lookup service context for |
|
106 * this mailbox. |
|
107 * |
|
108 * @param aProtocolUid specifies Ecom implementation UID of |
|
109 * "Remote Contact Lookup Protocol Adaptation API" to use. |
|
110 * @param aMailBoxId mailbox id in plugin |
|
111 */ |
|
112 IMPORT_C void GetRCLInfo(TUid& aProtocolUid, TUint& aAccountUid); |
|
113 |
|
114 /** |
|
115 * returns settings view id for mailbox |
|
116 * |
|
117 * @return settings view id |
|
118 */ |
|
119 IMPORT_C const TUid GetSettingsUid(); |
|
120 |
|
121 /** |
|
122 * sets settings view id for mailbox |
|
123 * |
|
124 * @param aUid settings view id |
|
125 */ |
|
126 IMPORT_C void SetSettingsUid(const TUid aUid); |
|
127 |
|
128 /** |
|
129 * Returns a meeting request info processor, which is used for replying |
|
130 * to meeting request received as MMRInfoObjet |
|
131 * |
|
132 * @return meeting info Processor, NULL if not supported by plugin |
|
133 * ownership not transferred |
|
134 */ |
|
135 IMPORT_C MMRInfoProcessor& MRInfoProcessorL(); |
|
136 |
|
137 /** |
|
138 * method to cheack if MRInfoProcessor is set |
|
139 * |
|
140 * @return |
|
141 */ |
|
142 IMPORT_C TBool IsMRInfoProcessorSet(); |
|
143 |
|
144 /** |
|
145 * Meeting request info processor mutator |
|
146 * |
|
147 * @param aMrInfoProcessor meeting info Processor, ownership transferred |
|
148 */ |
|
149 IMPORT_C void SetMRInfoProcessorL(MMRInfoProcessor* aMrInfoProcessor); |
|
150 |
|
151 /** |
|
152 * mailbox own address accessor |
|
153 * |
|
154 * @return mailbox own address |
|
155 */ |
|
156 IMPORT_C CFSMailAddress& OwnMailAddress( ); |
|
157 |
|
158 /** |
|
159 * mailbox own address mutator |
|
160 * |
|
161 * @param aOwnMailAddress mailbox own address |
|
162 */ |
|
163 IMPORT_C void SetOwnMailAddressL( CFSMailAddress* aOwnMailAddress); |
|
164 |
|
165 protected: |
|
166 |
|
167 /** |
|
168 * C++ default constructor. |
|
169 */ |
|
170 CFSMailBoxBase(); |
|
171 |
|
172 /** |
|
173 * branding id accessor |
|
174 */ |
|
175 TDesC& BrandingId(); |
|
176 |
|
177 /** |
|
178 * mailbox id mutator |
|
179 */ |
|
180 void SetMailBoxId( TFSMailMsgId aMailBoxId ); |
|
181 |
|
182 protected: // data |
|
183 |
|
184 protected: // <cmail> |
|
185 |
|
186 /** |
|
187 * Two-phased constructor |
|
188 */ |
|
189 void ConstructL( const TFSMailMsgId aMailBoxId ); |
|
190 |
|
191 private: // data |
|
192 |
|
193 /** |
|
194 * mailbox name |
|
195 */ |
|
196 HBufC* iMailBoxName; |
|
197 |
|
198 |
|
199 /** |
|
200 * remote contact lookup info |
|
201 */ |
|
202 TUid iProtocolUid; |
|
203 TUint iAccountUid; |
|
204 |
|
205 /** |
|
206 * settings uid |
|
207 */ |
|
208 TUid iSettingsUid; |
|
209 |
|
210 /** |
|
211 * Meeting request info |
|
212 */ |
|
213 MMRInfoProcessor* iMRInfoProcessor; |
|
214 |
|
215 /** |
|
216 * mailbox own address |
|
217 */ |
|
218 CFSMailAddress* iOwnMailAddress; |
|
219 |
|
220 /** |
|
221 * branding id |
|
222 */ |
|
223 HBufC* iBrId; |
|
224 |
|
225 protected: // <cmail> |
|
226 |
|
227 /** |
|
228 * mailbox id |
|
229 */ |
|
230 TFSMailMsgId iMailBoxId; |
|
231 }; |
|
232 |
|
233 #endif // __CFSMAILBOXBASE_H |