|
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 * Sms Mtm Ui Data. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #if !defined(__SMSI_H__) |
|
22 #define __SMSI_H__ |
|
23 |
|
24 #if !defined(__MTUDBAS_H__) |
|
25 #include <mtudcbas.h> // CBaseMtmUiData |
|
26 #endif |
|
27 |
|
28 // CLASS DEFINITIONS |
|
29 |
|
30 /** |
|
31 * CSmsMtmUiData |
|
32 * Inherited from CBaseMtmUiData |
|
33 */ |
|
34 NONSHARABLE_CLASS( CSmsMtmUiData ) : public CBaseMtmUiData |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 */ |
|
41 static CSmsMtmUiData* NewL(CRegisteredMtmDll& aRegisteredDll); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CSmsMtmUiData(); |
|
47 |
|
48 protected: // Functions from base classes |
|
49 |
|
50 /** |
|
51 * From CBaseMtmUiData |
|
52 * service: set aStateFlags & EMtudEntryStateOpen if service includes |
|
53 * unread messages, otherwise aStateFlags should be 0 |
|
54 * @return array of two bitmaps: first icon and second mask for the icon |
|
55 */ |
|
56 virtual const CBitmapArray& ContextIcon(const TMsvEntry& aContext, TInt aStateFlags) const; |
|
57 |
|
58 /** |
|
59 * From CBaseMtmUiData |
|
60 * returns 0 if operation *IS* supported, |
|
61 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
62 */ |
|
63 virtual TInt OperationSupportedL(TInt aOperationId, const TMsvEntry& aContext) const; |
|
64 |
|
65 /** |
|
66 * From CBaseMtmUiData |
|
67 */ |
|
68 virtual TInt QueryCapability(TUid aFunctionId, TInt& aResponse) const; |
|
69 |
|
70 /** |
|
71 * From CBaseMtmUiData |
|
72 * @param aReasonResourceId set to 0 if can do operation, |
|
73 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
74 * @return ETrue if can do operation, EFalse otherwise |
|
75 */ |
|
76 virtual TBool CanCreateEntryL( |
|
77 const TMsvEntry& aParent, |
|
78 TMsvEntry& aNewEntry, |
|
79 TInt& aReasonResourceId) const; |
|
80 |
|
81 /** |
|
82 * From CBaseMtmUiData |
|
83 * @param aReasonResourceId set to 0 if can do operation, |
|
84 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
85 * @return ETrue if can do operation, EFalse otherwise |
|
86 */ |
|
87 virtual TBool CanDeleteFromEntryL( |
|
88 const TMsvEntry& aContext, |
|
89 TInt& aReasonResourceId ) const; |
|
90 |
|
91 /** |
|
92 * From CBaseMtmUiData |
|
93 * @param aReasonResourceId set to 0 if can do operation, |
|
94 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
95 * @return ETrue if can do operation, EFalse otherwise |
|
96 */ |
|
97 virtual TBool CanDeleteServiceL( |
|
98 const TMsvEntry& aService, |
|
99 TInt& aReasonResourceId ) const; |
|
100 |
|
101 /** |
|
102 * From CBaseMtmUiData |
|
103 * @param aReasonResourceId set to 0 if can do operation, |
|
104 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
105 * @return ETrue if can do operation, EFalse otherwise |
|
106 */ |
|
107 virtual TBool CanReplyToEntryL( |
|
108 const TMsvEntry& aContext, |
|
109 TInt& aReasonResourceId ) const; |
|
110 |
|
111 /** |
|
112 * From CBaseMtmUiData |
|
113 * @param aReasonResourceId set to 0 if can do operation, |
|
114 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
115 * @return ETrue if can do operation, EFalse otherwise |
|
116 */ |
|
117 virtual TBool CanForwardEntryL( |
|
118 const TMsvEntry& aContext, |
|
119 TInt& aReasonResourceId ) const; |
|
120 |
|
121 /** |
|
122 * From CBaseMtmUiData |
|
123 * @param aReasonResourceId set to 0 if can do operation, |
|
124 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
125 * @return ETrue if can do operation, EFalse otherwise |
|
126 */ |
|
127 virtual TBool CanEditEntryL( |
|
128 const TMsvEntry& aContext, |
|
129 TInt& aReasonResourceId ) const; |
|
130 |
|
131 /** |
|
132 * From CBaseMtmUiData |
|
133 * @param aReasonResourceId set to 0 if can do operation, |
|
134 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
135 * @return ETrue if can do operation, EFalse otherwise |
|
136 */ |
|
137 virtual TBool CanViewEntryL( |
|
138 const TMsvEntry& aContext, |
|
139 TInt& aReasonResourceId ) const; |
|
140 |
|
141 /** |
|
142 * From CBaseMtmUiData |
|
143 * @param aReasonResourceId set to 0 if can do operation, |
|
144 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
145 * @return ETrue if can do operation, EFalse otherwise |
|
146 */ |
|
147 virtual TBool CanOpenEntryL( |
|
148 const TMsvEntry& aContext, |
|
149 TInt& aReasonResourceId ) const; |
|
150 |
|
151 /** |
|
152 * From CBaseMtmUiData |
|
153 * @param aReasonResourceId set to 0 if can do operation, |
|
154 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
155 * @return ETrue if can do operation, EFalse otherwise |
|
156 */ |
|
157 virtual TBool CanCloseEntryL( |
|
158 const TMsvEntry& aContext, TInt& aReasonResourceId ) const; |
|
159 |
|
160 /** |
|
161 * From CBaseMtmUiData |
|
162 * @param aReasonResourceId set to 0 if can do operation, |
|
163 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
164 * @return ETrue if can do operation, EFalse otherwise |
|
165 */ |
|
166 virtual TBool CanCopyMoveToEntryL( |
|
167 const TMsvEntry& aContext, |
|
168 TInt& aReasonResourceId ) const; |
|
169 |
|
170 /** |
|
171 * From CBaseMtmUiData |
|
172 * @param aReasonResourceId set to 0 if can do operation, |
|
173 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
174 * @return ETrue if can do operation, EFalse otherwise |
|
175 */ |
|
176 virtual TBool CanCopyMoveFromEntryL( |
|
177 const TMsvEntry& aContext, |
|
178 TInt& aReasonResourceId ) const; |
|
179 |
|
180 /** |
|
181 * From CBaseMtmUiData |
|
182 * @param aReasonResourceId set to 0 if can do operation, |
|
183 * otherwise R_EIK_TBUF_NOT_AVAILABLE |
|
184 * @return ETrue if can do operation, EFalse otherwise |
|
185 */ |
|
186 virtual TBool CanCancelL( |
|
187 const TMsvEntry& aContext, |
|
188 TInt& aReasonResourceId ) const; |
|
189 |
|
190 /** |
|
191 * From CBaseMtmUiData |
|
192 */ |
|
193 virtual HBufC* StatusTextL( const TMsvEntry& aContext ) const; |
|
194 |
|
195 /** |
|
196 * From CBaseMtmUiData |
|
197 */ |
|
198 virtual void PopulateArraysL(); |
|
199 |
|
200 /** |
|
201 * From CBaseMtmUiData |
|
202 */ |
|
203 virtual void GetResourceFileName( TFileName& aFileName ) const; |
|
204 |
|
205 protected: // Constructors |
|
206 |
|
207 /** |
|
208 * By default Symbian OS constructor is private. |
|
209 */ |
|
210 virtual void ConstructL(); |
|
211 |
|
212 /** |
|
213 * Constructor (accessible only through factory function) |
|
214 */ |
|
215 CSmsMtmUiData(CRegisteredMtmDll& aRegisteredDll); |
|
216 |
|
217 /** |
|
218 * Creates skinned icons. Fallbacks are normal icons |
|
219 * @param aNumZoomStates: amount of elements in vector |
|
220 * ( bitmap & bitmapmask ) |
|
221 */ |
|
222 void CreateSkinnedBitmapsL( TInt aNumZoomStates ); |
|
223 |
|
224 }; |
|
225 |
|
226 #endif // __SMSI_H__ |
|
227 |
|
228 |
|
229 |
|
230 // End of File |