|
1 /* |
|
2 * Copyright (c) 2002 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 * Message type module UI data part. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef CIRMTMUIDATA_H |
|
22 #define CIRMTMUIDATA_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <mtudcbas.h> |
|
26 #include <obexutilsuilayer.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * CIrMtmUiData |
|
34 * |
|
35 */ |
|
36 class CIrMtmUiData : public CBaseMtmUiData |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 */ |
|
43 static CIrMtmUiData* NewL(CRegisteredMtmDll& aRegisteredDll); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CIrMtmUiData(); |
|
49 |
|
50 /** |
|
51 * By default Symbian OS constructor is private. |
|
52 */ |
|
53 void ConstructL(); |
|
54 |
|
55 public: // Functions from base classes |
|
56 |
|
57 /** |
|
58 * From CBaseMtmUiData function query. |
|
59 * @param aOperationId Id for function. |
|
60 * @param aContext messaging store entry. |
|
61 * @return TInt error code. |
|
62 */ |
|
63 virtual TInt OperationSupportedL( |
|
64 TInt aOperationId, |
|
65 const TMsvEntry& aContext) const; |
|
66 |
|
67 /** |
|
68 * From CBaseMtmUiData MTM capability check. |
|
69 * @param aCapability Uid for message type. |
|
70 * @param aResponse response for capability check. |
|
71 * @return TInt error code. |
|
72 */ |
|
73 virtual TInt QueryCapability( |
|
74 TUid aCapability, |
|
75 TInt& aResponse) const; |
|
76 |
|
77 /** |
|
78 * From CBaseMtmUiData MTM related context icons. |
|
79 * @param aContext Messaging entry refence. |
|
80 * @param aStateFlags Flags for icon. |
|
81 * @return TInt error code. |
|
82 */ |
|
83 virtual const CBitmapArray& ContextIcon( |
|
84 const TMsvEntry& aContext, |
|
85 TInt aStateFlags) const; |
|
86 |
|
87 /** |
|
88 * From CBaseMtmUiData Provide context-specific function information. |
|
89 * @param aParent Messaging entry refence. |
|
90 * @param aNewEntry Messaging entry refence(created entry). |
|
91 * @param aReasonResourceId ResourceID. |
|
92 * @return TBool inform that mtm can provice function or not. |
|
93 */ |
|
94 virtual TBool CanCreateEntryL( |
|
95 const TMsvEntry& aParent, |
|
96 TMsvEntry& aNewEntry, |
|
97 TInt& aReasonResourceId) const; |
|
98 |
|
99 /** |
|
100 * From CBaseMtmUiData Provide context-specific function information. |
|
101 * @param aContext Messaging entry refence. |
|
102 * @param aReasonResourceId Resource id. |
|
103 * @return TBool inform that mtm can provice function or not. |
|
104 */ |
|
105 virtual TBool CanReplyToEntryL( |
|
106 const TMsvEntry& aContext, |
|
107 TInt& aReasonResourceId) const; |
|
108 |
|
109 /** |
|
110 * From CBaseMtmUiData Provide context-specific function information. |
|
111 * @param aContext Messaging entry refence. |
|
112 * @param aReasonResourceId Resource id. |
|
113 * @return TBool inform that mtm can provice function or not. |
|
114 */ |
|
115 virtual TBool CanForwardEntryL( |
|
116 const TMsvEntry& aContext, |
|
117 TInt& aReasonResourceId) const; |
|
118 |
|
119 /** |
|
120 * From CBaseMtmUiData Provide context-specific function information. |
|
121 * @param aContext Messaging entry refence. |
|
122 * @param aReasonResourceId Resource id. |
|
123 * @return TBool inform that mtm can provice function or not. |
|
124 */ |
|
125 virtual TBool CanEditEntryL( |
|
126 const TMsvEntry& aContext, |
|
127 TInt& aReasonResourceId) const; |
|
128 |
|
129 /** |
|
130 * From CBaseMtmUiData Provide context-specific function information. |
|
131 * @param aContext Messaging entry refence. |
|
132 * @param aReasonResourceId Resource id. |
|
133 * @return TBool inform that mtm can provice function or not. |
|
134 */ |
|
135 virtual TBool CanViewEntryL(const TMsvEntry& aContext, |
|
136 TInt& aReasonResourceId) const; |
|
137 |
|
138 /** |
|
139 * From CBaseMtmUiData Provide context-specific function information. |
|
140 * @param aContext Messaging entry refence. |
|
141 * @param aReasonResourceId Resource id. |
|
142 * @return TBool inform that mtm can provice function or not. |
|
143 */ |
|
144 virtual TBool CanOpenEntryL( |
|
145 const TMsvEntry& aContext, |
|
146 TInt& aReasonResourceId) const; |
|
147 |
|
148 /** |
|
149 * From CBaseMtmUiData Provide context-specific function information. |
|
150 * @param aContext Messaging entry refence. |
|
151 * @param aReasonResourceId Resource id. |
|
152 * @return TBool inform that mtm can provice function or not. |
|
153 */ |
|
154 virtual TBool CanCloseEntryL( |
|
155 const TMsvEntry& aContext, |
|
156 TInt& aReasonResourceId) const; |
|
157 |
|
158 /** |
|
159 * From CBaseMtmUiData Provide context-specific function information. |
|
160 * @param aContext Messaging entry refence. |
|
161 * @param aReasonResourceId Resource id. |
|
162 * @return TBool inform that mtm can provice function or not. |
|
163 */ |
|
164 virtual TBool CanDeleteFromEntryL( |
|
165 const TMsvEntry& aContext, |
|
166 TInt& aReasonResourceId) const; |
|
167 |
|
168 /** |
|
169 * From CBaseMtmUiData Provide context-specific function information. |
|
170 * @param aContext Messaging entry refence. |
|
171 * @param aReasonResourceId Resource id. |
|
172 * @return TBool inform that mtm can provice function or not. |
|
173 */ |
|
174 virtual TBool CanDeleteServiceL( |
|
175 const TMsvEntry& aService, |
|
176 TInt& aReasonResourceId) const; |
|
177 |
|
178 /** |
|
179 * From CBaseMtmUiData Provide context-specific function information. |
|
180 * @param aContext Messaging entry refence. |
|
181 * @param aReasonResourceId Resource id. |
|
182 * @return TBool inform that mtm can provice function or not. |
|
183 */ |
|
184 virtual TBool CanCopyMoveToEntryL( |
|
185 const TMsvEntry& aContext, |
|
186 TInt& aReasonResourceId) const; |
|
187 |
|
188 /** |
|
189 * From CBaseMtmUiData Provide context-specific function information. |
|
190 * @param aContext Messaging entry refence. |
|
191 * @param aReasonResourceId Resource id. |
|
192 * @return TBool inform that mtm can provice function or not. |
|
193 */ |
|
194 virtual TBool CanCopyMoveFromEntryL( |
|
195 const TMsvEntry& aContext, |
|
196 TInt& aReasonResourceId) const; |
|
197 |
|
198 /** |
|
199 * From CBaseMtmUiData Provide context-specific function information. |
|
200 * @param aContext Messaging entry refence. |
|
201 * @param aReasonResourceId Resource id. |
|
202 * @return TBool inform that mtm can provice function or not. |
|
203 */ |
|
204 virtual TBool CanCancelL(const TMsvEntry& aContext, |
|
205 TInt& aReasonResourceId) const; |
|
206 |
|
207 /** |
|
208 * From CBaseMtmUiData Provide context-specific function information. |
|
209 * @param aContext Messaging entry refence. |
|
210 * @return HBufC* Statustext for sending. |
|
211 */ |
|
212 virtual HBufC* StatusTextL(const TMsvEntry& aContext) const; |
|
213 |
|
214 protected: // Functions from base classes |
|
215 |
|
216 /** |
|
217 * From CBaseMtmUiData Populate icon array |
|
218 */ |
|
219 virtual void PopulateArraysL(); |
|
220 |
|
221 /** |
|
222 * From CBaseMtmUiData gets resource filename. |
|
223 */ |
|
224 virtual void GetResourceFileName(TFileName& aFileName) const; |
|
225 |
|
226 protected: |
|
227 |
|
228 /** |
|
229 * C++ default constructor. |
|
230 */ |
|
231 CIrMtmUiData(CRegisteredMtmDll& aRegisteredDll); |
|
232 |
|
233 protected: // New functions |
|
234 |
|
235 /** |
|
236 * Checks is the entry valid. |
|
237 * @param aContext reference to the entry. |
|
238 * @return TBool |
|
239 */ |
|
240 TBool CheckEntry(const TMsvEntry& aContext) const; |
|
241 |
|
242 }; |
|
243 |
|
244 #endif // CIRMTMUIDATA_H |
|
245 // End of File |