20 #define __MUSAVACONTACTAVAILABILITY_H__ |
20 #define __MUSAVACONTACTAVAILABILITY_H__ |
21 |
21 |
22 #include "musavaavailability.h" |
22 #include "musavaavailability.h" |
23 #include "musunittesting.h" |
23 #include "musunittesting.h" |
24 #include "mussettingskeys.h" |
24 #include "mussettingskeys.h" |
25 #include "muscallmonitorobserver.h" |
25 |
26 #include <badesca.h> |
26 #include <badesca.h> |
27 #include <PbkFields.hrh> |
|
28 |
27 |
29 class MMusAvaAvailabilityObserver; |
28 class MMusAvaAvailabilityObserver; |
30 class MMusAvaObserver; |
29 class MMusAvaObserver; |
31 class CMusAvaSharedObject; |
30 class CMusAvaSharedObject; |
32 class CPbkContactEngine; |
|
33 class CContactIdArray; |
31 class CContactIdArray; |
34 class CPbkContactItem; |
|
35 class CContactItem; |
32 class CContactItem; |
36 class CMusAvaSettingsImp; |
33 class CMusAvaSettingsImp; |
37 class CMusAvaCallEventMonitor; |
34 |
38 |
35 |
39 /** |
36 /** |
40 * Implemets register vailability. |
37 * Implemets register vailability. |
41 * |
38 * |
42 * Provide interface for the client to availability class. |
39 * Provide interface for the client to availability class. |
43 * |
40 * |
44 * @lib musavailabilityplugin.lib |
41 * @lib musavailabilityplugin.lib |
45 */ |
42 */ |
46 class CMusAvaContactAvailability : public CMusAvaAvailability, |
43 class CMusAvaContactAvailability : public CMusAvaAvailability |
47 public MMusCallMonitorObserver |
|
48 { |
44 { |
49 |
45 |
50 public: |
46 public: |
51 |
47 |
52 /** |
48 /** |
97 * Returns availability name. |
93 * Returns availability name. |
98 * |
94 * |
99 * @return Name of *this* availability. |
95 * @return Name of *this* availability. |
100 */ |
96 */ |
101 virtual MMusAvaObserver::TAvailabilityName Name(); |
97 virtual MMusAvaObserver::TAvailabilityName Name(); |
102 // from class MMusCallMonitorObserver |
|
103 /** |
|
104 * Call connected |
|
105 * |
|
106 * @since S60 v3.2 |
|
107 * @return |
|
108 */ |
|
109 virtual void CallConnectedL( const TDesC& aTelNumber ); |
|
110 |
|
111 /** |
|
112 * Call on hold |
|
113 * |
|
114 * @since S60 v3.2 |
|
115 * @return |
|
116 */ |
|
117 virtual void CallHoldL( const TDesC& aTelNumber ); |
|
118 |
|
119 /** |
|
120 * Call disconnected |
|
121 * |
|
122 * @since S60 v3.2 |
|
123 * @return |
|
124 */ |
|
125 virtual void NoActiveCallL(); |
|
126 |
|
127 /** |
|
128 * Call on hold |
|
129 * |
|
130 * @since S60 v3.2 |
|
131 * @return |
|
132 */ |
|
133 virtual void ConferenceCallL(); |
|
134 |
|
135 |
|
136 virtual void ConferenceCallLTerminated(); |
|
137 |
98 |
138 private: |
99 private: |
139 |
100 |
140 /** |
101 /** |
141 * |
102 * |
142 */ |
103 */ |
143 TBool ActiveCallL( CDesCArrayFlat*& aContactsArray ); |
104 TBool ActiveCallL( CDesCArrayFlat*& aContactsArray ); |
144 |
|
145 /** |
|
146 * |
|
147 */ |
|
148 TBool ContactL( CContactIdArray*& aContactIdArray, |
|
149 CPbkContactEngine& aPbkContactEngine ); |
|
150 |
|
151 /** |
|
152 * |
|
153 */ |
|
154 void UpdateContactNameL( CContactItem& aContactItem ); |
|
155 |
|
156 /** |
|
157 * |
|
158 */ |
|
159 TInt ContactArrayL( CContactIdArray*& aContactIdArray, |
|
160 CPbkContactEngine& aPbkContactEngine ); |
|
161 |
|
162 /** |
|
163 * |
|
164 */ |
|
165 TInt ContactItem( CContactIdArray& aContactIdArray, |
|
166 CPbkContactItem*& aPbkContactItem, |
|
167 CPbkContactEngine& aPbkContactEngine ); |
|
168 |
|
169 /** |
|
170 * |
|
171 */ |
|
172 TBool ContactId( CPbkContactItem& aPbkItem, |
|
173 TPbkFieldId aTPbkFieldId ); |
|
174 /** |
|
175 * |
|
176 */ |
|
177 TPbkFieldId ContactIdSearch( CContactIdArray& aContactIdArray, |
|
178 CPbkContactEngine& aPbkContactEngine ); |
|
179 |
|
180 /** |
|
181 * |
|
182 */ |
|
183 TBool PhoneResolutionL( CPbkContactItem& aPbkItem, |
|
184 CDesCArrayFlat*& aContactsArray ); |
|
185 |
105 |
186 |
106 |
187 /** |
107 /** |
188 * |
108 * |
189 */ |
109 */ |
190 TBool ResolveAddressesL( CPbkContactItem& aPbkItem, |
110 TBool ResolveAddressesL( const TDesC& aContactId, |
191 CDesCArrayFlat*& aContactsArray, |
111 CDesCArrayFlat*& aContactsArray ); |
192 TPbkFieldId aTPbkFieldId ); |
|
193 |
112 |
194 /** |
113 |
195 * |
|
196 */ |
|
197 TBool ResolvePhoneContactL( CPbkContactItem& aPbkItem, |
|
198 CDesCArrayFlat*& aContactsArray ); |
|
199 |
|
200 /* ------------------------------------------------------------------------- |
|
201 * Checks that whether aDesItem present in aDesArray. |
|
202 * Utility function used to avoid dublication. |
|
203 * ------------------------------------------------------------------------- |
|
204 */ |
|
205 TBool IsExistAlready(const MDesCArray& aDesArray, |
|
206 const TDesC& aDesItem); |
|
207 |
|
208 private: |
114 private: |
209 /** |
|
210 * iPhoneStatus subscribe property resource. When the resource |
|
211 * changed somewhere,availability will get notification. |
|
212 */ |
|
213 CMusAvaCallEventMonitor* iPhoneStatus; |
|
214 |
115 |
215 /** |
116 /** |
216 * resolved contact name |
117 * resolved contact name |
217 */ |
118 */ |
218 HBufC* iContactName; |
119 HBufC* iContactName; |