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 |
25 #include "muscallmonitorobserver.h" |
26 #include <badesca.h> |
26 #include <badesca.h> |
|
27 #include <PbkFields.hrh> |
27 |
28 |
28 class MMusAvaAvailabilityObserver; |
29 class MMusAvaAvailabilityObserver; |
29 class MMusAvaObserver; |
30 class MMusAvaObserver; |
30 class CMusAvaSharedObject; |
31 class CMusAvaSharedObject; |
|
32 class CPbkContactEngine; |
31 class CContactIdArray; |
33 class CContactIdArray; |
|
34 class CPbkContactItem; |
32 class CContactItem; |
35 class CContactItem; |
33 class CMusAvaSettingsImp; |
36 class CMusAvaSettingsImp; |
34 |
37 class CMusAvaCallEventMonitor; |
35 |
38 |
36 /** |
39 /** |
37 * Implemets register vailability. |
40 * Implemets register vailability. |
38 * |
41 * |
39 * Provide interface for the client to availability class. |
42 * Provide interface for the client to availability class. |
40 * |
43 * |
41 * @lib musavailabilityplugin.lib |
44 * @lib musavailabilityplugin.lib |
42 */ |
45 */ |
43 class CMusAvaContactAvailability : public CMusAvaAvailability |
46 class CMusAvaContactAvailability : public CMusAvaAvailability, |
|
47 public MMusCallMonitorObserver |
44 { |
48 { |
45 |
49 |
46 public: |
50 public: |
47 |
51 |
48 /** |
52 /** |
93 * Returns availability name. |
97 * Returns availability name. |
94 * |
98 * |
95 * @return Name of *this* availability. |
99 * @return Name of *this* availability. |
96 */ |
100 */ |
97 virtual MMusAvaObserver::TAvailabilityName Name(); |
101 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(); |
98 |
137 |
99 private: |
138 private: |
100 |
139 |
101 /** |
140 /** |
102 * |
141 * |
103 */ |
142 */ |
104 TBool ActiveCallL( CDesCArrayFlat*& aContactsArray ); |
143 TBool ActiveCallL( CDesCArrayFlat*& aContactsArray ); |
105 |
144 |
106 |
145 /** |
107 /** |
146 * |
108 * |
147 */ |
109 */ |
148 TBool ContactL( CContactIdArray*& aContactIdArray, |
110 TBool ResolveAddressesL( const TDesC& aContactId, |
149 CPbkContactEngine& aPbkContactEngine ); |
111 CDesCArrayFlat*& aContactsArray ); |
150 |
112 |
151 /** |
113 |
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 |
|
186 |
|
187 /** |
|
188 * |
|
189 */ |
|
190 TBool ResolveAddressesL( CPbkContactItem& aPbkItem, |
|
191 CDesCArrayFlat*& aContactsArray, |
|
192 TPbkFieldId aTPbkFieldId ); |
|
193 |
|
194 /** |
|
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 |
114 private: |
208 private: |
|
209 /** |
|
210 * iPhoneStatus subscribe property resource. When the resource |
|
211 * changed somewhere,availability will get notification. |
|
212 */ |
|
213 CMusAvaCallEventMonitor* iPhoneStatus; |
115 |
214 |
116 /** |
215 /** |
117 * resolved contact name |
216 * resolved contact name |
118 */ |
217 */ |
119 HBufC* iContactName; |
218 HBufC* iContactName; |