44
|
1 |
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// CLtsyPhonebookHandler
|
|
15 |
|
|
16 |
#include <ctsy/ltsy/cctsydispatchercallback.h>
|
|
17 |
#include <mmtsy_ipcdefs.h>
|
|
18 |
#include <mpbutil.h>
|
|
19 |
#include <etelmm.h>
|
|
20 |
|
|
21 |
|
|
22 |
#include "cltsyphonebookhandler.h"
|
|
23 |
#include <ctsy/ltsy/ltsylogger.h>
|
|
24 |
#include "ltsymacros.h"
|
|
25 |
#include "globalphonemanager.h"
|
|
26 |
#include "atsmsstoreinfo.h"
|
|
27 |
#include "atsmsstorewrite.h"
|
|
28 |
#include "atsmsstoreread.h"
|
|
29 |
#include "atsmsstoredelete.h"
|
|
30 |
#include "atsmsstorereadall.h"
|
|
31 |
#include "atphbkgetphonestoreinfo.h"
|
|
32 |
#include "atphbkstoreinitialise.h"
|
|
33 |
#include "atphbkstorewrite.h"
|
|
34 |
#include "atphbkstoreread.h"
|
|
35 |
#include "atphbkstorecache.h"
|
|
36 |
#include "atphbkstoredelete.h"
|
|
37 |
|
|
38 |
|
|
39 |
CLtsyPhonebookHandler::CLtsyPhonebookHandler(
|
|
40 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone)
|
|
41 |
:iCtsyDispatcherCallback(aCtsyDispatcherCallback),iGloblePhone(aGloblePhone)
|
|
42 |
{
|
|
43 |
}
|
|
44 |
|
|
45 |
|
|
46 |
CLtsyPhonebookHandler::~CLtsyPhonebookHandler()
|
|
47 |
{
|
|
48 |
|
|
49 |
}
|
|
50 |
|
|
51 |
|
|
52 |
CLtsyPhonebookHandler* CLtsyPhonebookHandler::NewLC(
|
|
53 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone)
|
|
54 |
{
|
|
55 |
TSYLOGENTRYEXIT;
|
|
56 |
CLtsyPhonebookHandler* self = new (ELeave) CLtsyPhonebookHandler(aCtsyDispatcherCallback,aGloblePhone);
|
|
57 |
CleanupStack::PushL(self);
|
|
58 |
self->ConstructL();
|
|
59 |
return self;
|
|
60 |
}
|
|
61 |
|
|
62 |
|
|
63 |
CLtsyPhonebookHandler* CLtsyPhonebookHandler::NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone)
|
|
64 |
{
|
|
65 |
TSYLOGENTRYEXIT;
|
|
66 |
CLtsyPhonebookHandler* self=
|
|
67 |
CLtsyPhonebookHandler::NewLC(aCtsyDispatcherCallback,aGloblePhone);
|
|
68 |
CleanupStack::Pop(self);
|
|
69 |
return self;
|
|
70 |
}
|
|
71 |
|
|
72 |
|
|
73 |
void CLtsyPhonebookHandler::ConstructL()
|
|
74 |
/**
|
|
75 |
* Second phase constructor.
|
|
76 |
*/
|
|
77 |
{
|
|
78 |
TSYLOGENTRYEXIT;
|
|
79 |
} // CLtsyPhonebookHandler::ConstructL
|
|
80 |
|
|
81 |
TBool CLtsyPhonebookHandler::IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId)
|
|
82 |
/**
|
|
83 |
* Returns whether a Dispatch Interface APi is supported or not.
|
|
84 |
*
|
|
85 |
* @param aDispatchApiId Id of Dispatch interface being queried.
|
|
86 |
* @return indication whether interface is supported or not.
|
|
87 |
*/
|
|
88 |
{
|
|
89 |
|
|
90 |
switch(aDispatchApiId)
|
|
91 |
{
|
|
92 |
case KLtsyDispatchPhonebookStoreReadEntryApiId:
|
|
93 |
return ETrue;
|
|
94 |
case KLtsyDispatchPhonebookStoreDeleteEntryApiId:
|
|
95 |
return ETrue;
|
|
96 |
case KLtsyDispatchPhonebookStoreCacheApiId:
|
|
97 |
return ETrue;
|
|
98 |
case KLtsyDispatchPhonebookStoreCacheCancelApiId:
|
|
99 |
return ETrue;
|
|
100 |
// case KLtsyDispatchPhonebookStoreGetPhonebookInfoApiId:
|
|
101 |
// return ETrue;
|
|
102 |
case KLtsyDispatchPhonebookStoreInitialiseApiId:
|
|
103 |
return ETrue;
|
|
104 |
case KLtsyDispatchPhonebookStoreDeleteAllApiId:
|
|
105 |
return ETrue;
|
|
106 |
case KLtsyDispatchPhonebookStoreWriteEntryApiId:
|
|
107 |
return ETrue;
|
|
108 |
case KLtsyDispatchPhonebookGetPhoneStoreInfoApiId:
|
|
109 |
return ETrue;
|
|
110 |
case KLtsyDispatchPhonebookSmsStoreReadAllApiId:
|
|
111 |
return ETrue;
|
|
112 |
case KLtsyDispatchPhonebookSmsStoreDeleteEntryApiId:
|
|
113 |
return ETrue;
|
|
114 |
case KLtsyDispatchPhonebookSmsStoreDeleteAllApiId:
|
|
115 |
return ETrue;
|
|
116 |
case KLtsyDispatchPhonebookSmsStoreGetInfoApiId:
|
|
117 |
return ETrue;
|
|
118 |
case KLtsyDispatchPhonebookSmsStoreReadEntryApiId:
|
|
119 |
return ETrue;
|
|
120 |
case KLtsyDispatchPhonebookSmsStoreWriteEntryApiId:
|
|
121 |
return ETrue;
|
|
122 |
default:
|
|
123 |
return EFalse;
|
|
124 |
}
|
|
125 |
}
|
|
126 |
|
|
127 |
void CLtsyPhonebookHandler::IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup /*aIdGroup*/, TUint32& /*aIndIdBitMask*/)
|
|
128 |
/**
|
|
129 |
* Returns the set of callback indicators that are supported.
|
|
130 |
*
|
|
131 |
* @param aIdGroup ID of group that is being queried e.g. aIdGroup=EIndIdGroup1.
|
|
132 |
* @param aIndIdBitMask [out] argument that should return a bitmask indicating which indicator callbacks are supported.
|
|
133 |
*/
|
|
134 |
{
|
|
135 |
|
|
136 |
//Create bitmask with bitset for each indicator ID that is supported. E.g.
|
|
137 |
}
|
|
138 |
|
|
139 |
|
|
140 |
TInt CLtsyPhonebookHandler::HandleStoreReadEntryReqL(DispatcherPhonebook::TPhonebook aPhonebook, TInt aIndex, TInt aNumberOfSlots)
|
|
141 |
/**
|
|
142 |
* This request is completed by invoking
|
|
143 |
* CCtsyDispatcherCallback::CallbackPhonebookStoreReadEntryComp()
|
|
144 |
*
|
|
145 |
* @param aPhonebook The phonebook to read entries from.
|
|
146 |
* @param aIndex Specifies the index to start reading from, must be >= 1.
|
|
147 |
* @param aNumSlots Specifies the number of slots to read, must be >= 1 and <= total number of slots.
|
|
148 |
*
|
|
149 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
150 |
* or another error code to indicate the failure otherwise.
|
|
151 |
*
|
|
152 |
* @see RMobilePhoneBookStore::Read()
|
|
153 |
*/
|
|
154 |
{
|
|
155 |
TSYLOGENTRYEXIT;
|
|
156 |
|
|
157 |
if((aPhonebook != DispatcherPhonebook::EIccAdn)&&
|
|
158 |
(aPhonebook != DispatcherPhonebook::EIccAdn))
|
|
159 |
{
|
|
160 |
return TSYLOGSETEXITERR(KErrNotSupported);
|
|
161 |
}
|
|
162 |
|
|
163 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
164 |
if( KErrNone == ret )
|
|
165 |
{
|
|
166 |
CAtPhbkStoreRead* atPhbkStoreRead = CAtPhbkStoreRead::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
167 |
//Setting Port active
|
|
168 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
169 |
iGloblePhone->SetActiveRequest(atPhbkStoreRead);
|
|
170 |
atPhbkStoreRead->SetPhonebookType(aPhonebook);
|
|
171 |
atPhbkStoreRead->SetReadParam(aIndex,aNumberOfSlots);
|
|
172 |
atPhbkStoreRead->StartRequest();
|
|
173 |
}
|
|
174 |
return TSYLOGSETEXITERR(ret);
|
|
175 |
} // CLtsyPhonebookHandler::HandleStoreReadEntryReqL
|
|
176 |
|
|
177 |
|
|
178 |
TInt CLtsyPhonebookHandler::HandleStoreDeleteEntryReqL(DispatcherPhonebook::TPhonebook aPhonebook, TInt aIndex)
|
|
179 |
/**
|
|
180 |
* This request is completed by invoking
|
|
181 |
* CCtsyDispatcherCallback::CallbackPhonebookStoreDeleteEntryComp()
|
|
182 |
*
|
|
183 |
* @param aPhonebook The phonebook to delete an entry from.
|
|
184 |
* @param aIndex The entry index in the phonebook to delete.
|
|
185 |
*
|
|
186 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
187 |
* or another error code to indicate the failure otherwise.
|
|
188 |
*
|
|
189 |
* @see RMobilePhoneBookStore::Delete()
|
|
190 |
*/
|
|
191 |
{
|
|
192 |
TSYLOGENTRYEXIT;
|
|
193 |
|
|
194 |
if((aPhonebook != DispatcherPhonebook::EIccAdn)&&
|
|
195 |
(aPhonebook != DispatcherPhonebook::EIccAdn))
|
|
196 |
{
|
|
197 |
return TSYLOGSETEXITERR(KErrNotSupported);
|
|
198 |
}
|
|
199 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
200 |
if( KErrNone == ret )
|
|
201 |
{
|
|
202 |
CAtPhbkStoreDelete* atPhbkStoreDelete = CAtPhbkStoreDelete::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
203 |
//Setting Port active
|
|
204 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
205 |
iGloblePhone->SetActiveRequest(atPhbkStoreDelete);
|
|
206 |
atPhbkStoreDelete->SetPhonebookType(aPhonebook);
|
|
207 |
atPhbkStoreDelete->SetDeleteIndex(aIndex);
|
|
208 |
atPhbkStoreDelete->StartRequest();
|
|
209 |
}
|
|
210 |
return TSYLOGSETEXITERR(ret);
|
|
211 |
} // CLtsyPhonebookHandler::HandleStoreDeleteEntryReqL
|
|
212 |
|
|
213 |
|
|
214 |
TInt CLtsyPhonebookHandler::HandleStoreCacheReqL(DispatcherPhonebook::TPhonebook aPhonebook)
|
|
215 |
/**
|
|
216 |
* This request is completed by invoking
|
|
217 |
* CCtsyDispatcherCallback::CallbackPhonebookStoreCacheComp()
|
|
218 |
*
|
|
219 |
* @param aPhonebook The phonebook to cache.
|
|
220 |
*
|
|
221 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
222 |
* or another error code to indicate the failure otherwise.
|
|
223 |
*/
|
|
224 |
{
|
|
225 |
TSYLOGENTRYEXIT;
|
|
226 |
if((aPhonebook != DispatcherPhonebook::EIccAdn)&&
|
|
227 |
(aPhonebook != DispatcherPhonebook::EIccAdn))
|
|
228 |
{
|
|
229 |
return TSYLOGSETEXITERR(KErrNotSupported);
|
|
230 |
}
|
|
231 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
232 |
if( KErrNone == ret )
|
|
233 |
{
|
|
234 |
CAtPhbkStoreCache* atPhbkStoreCache = CAtPhbkStoreCache::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
235 |
//Setting Port active
|
|
236 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
237 |
iGloblePhone->SetActiveRequest(atPhbkStoreCache);
|
|
238 |
atPhbkStoreCache->SetPhonebookType(aPhonebook);
|
|
239 |
atPhbkStoreCache->StartRequest();
|
|
240 |
}
|
|
241 |
return TSYLOGSETEXITERR(ret);
|
|
242 |
} // CLtsyPhonebookHandler::HandleStoreCacheReqL
|
|
243 |
|
|
244 |
|
|
245 |
TInt CLtsyPhonebookHandler::HandleStoreGetPhonebookInfoReqL(DispatcherPhonebook::TPhonebook /*aPhonebook*/)
|
|
246 |
/**
|
|
247 |
* This request is completed by invoking
|
|
248 |
* CCtsyDispatcherCallback::CallbackPhonebookStoreGetPhonebookInfoComp()
|
|
249 |
*
|
|
250 |
* @param aPhonebook The phonebook to retrieve the information from.
|
|
251 |
*
|
|
252 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
253 |
* or another error code to indicate the failure otherwise.
|
|
254 |
*
|
|
255 |
* @see RMobilePhoneBookStore::GetInfo()
|
|
256 |
*/
|
|
257 |
{
|
|
258 |
TSYLOGENTRYEXIT;
|
|
259 |
|
|
260 |
TInt ret = KErrNotSupported;
|
|
261 |
|
|
262 |
// TODO: Add implementation here.......
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
return TSYLOGSETEXITERR(ret);
|
|
267 |
} // CLtsyPhonebookHandler::HandleStoreGetPhonebookInfoReqL
|
|
268 |
|
|
269 |
|
|
270 |
TInt CLtsyPhonebookHandler::HandleStoreInitialiseReqL()
|
|
271 |
/**
|
|
272 |
* This request is completed by invoking
|
|
273 |
* CCtsyDispatcherCallback::CallbackPhonebookStoreInitialiseComp()
|
|
274 |
*
|
|
275 |
*
|
|
276 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
277 |
* or another error code to indicate the failure otherwise.
|
|
278 |
*/
|
|
279 |
{
|
|
280 |
TSYLOGENTRYEXIT;
|
|
281 |
|
|
282 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
283 |
if( KErrNone == ret )
|
|
284 |
{
|
|
285 |
CAtPhbkStoreInitialise* atPhbkStoreInitialise = CAtPhbkStoreInitialise::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
286 |
//Setting Port active
|
|
287 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
288 |
iGloblePhone->SetActiveRequest(atPhbkStoreInitialise);
|
|
289 |
atPhbkStoreInitialise->StartRequest();
|
|
290 |
}
|
|
291 |
return TSYLOGSETEXITERR(ret);
|
|
292 |
} // CLtsyPhonebookHandler::HandleStoreInitialiseReqL
|
|
293 |
|
|
294 |
|
|
295 |
TInt CLtsyPhonebookHandler::HandleStoreDeleteAllReqL(DispatcherPhonebook::TPhonebook /*aPhonebook*/)
|
|
296 |
/**
|
|
297 |
* This request is completed by invoking
|
|
298 |
* CCtsyDispatcherCallback::CallbackPhonebookStoreDeleteAllComp()
|
|
299 |
*
|
|
300 |
* @param aPhonebook The phonebook to delete all entries from.
|
|
301 |
*
|
|
302 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
303 |
* or another error code to indicate the failure otherwise.
|
|
304 |
*
|
|
305 |
* @see RMobilePhoneBookStore::DeleteAll()
|
|
306 |
*/
|
|
307 |
{
|
|
308 |
TSYLOGENTRYEXIT;
|
|
309 |
|
|
310 |
TInt ret = KErrNotSupported;
|
|
311 |
|
|
312 |
// TODO: Add implementation here.......
|
|
313 |
|
|
314 |
|
|
315 |
return TSYLOGSETEXITERR(ret);
|
|
316 |
} // CLtsyPhonebookHandler::HandleStoreDeleteAllReqL
|
|
317 |
|
|
318 |
|
|
319 |
TInt CLtsyPhonebookHandler::HandleSmsStoreReadAllReqL()
|
|
320 |
/**
|
|
321 |
* This request is completed by invoking
|
|
322 |
* CCtsyDispatcherCallback::CallbackPhonebookSmsStoreReadAllComp().
|
|
323 |
*
|
|
324 |
*
|
|
325 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
326 |
* or another error code to indicate the failure otherwise.
|
|
327 |
*/
|
|
328 |
{
|
|
329 |
TSYLOGENTRYEXIT;
|
|
330 |
|
|
331 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
332 |
if( KErrNone == ret )
|
|
333 |
{
|
|
334 |
CAtSmsStoreReadAll* atSmsStoreReadAll = CAtSmsStoreReadAll::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
335 |
//Setting Port active
|
|
336 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
337 |
iGloblePhone->SetActiveRequest(atSmsStoreReadAll);
|
|
338 |
atSmsStoreReadAll->StartRequest();
|
|
339 |
}
|
|
340 |
return TSYLOGSETEXITERR(ret);
|
|
341 |
} // CLtsyPhonebookHandler::HandleSmsStoreReadAllReqL
|
|
342 |
|
|
343 |
|
|
344 |
TInt CLtsyPhonebookHandler::HandleStoreWriteEntryReqL(DispatcherPhonebook::TPhonebook aPhonebook, const TDesC8& aEntry)
|
|
345 |
/**
|
|
346 |
* This request is completed by invoking
|
|
347 |
* CCtsyDispatcherCallback::CallbackPhonebookStoreWriteEntryComp()
|
|
348 |
*
|
|
349 |
* @param aPhonebook The phonebook to be written to.
|
|
350 |
* @param aEntry The entry to be written, this is coded as a TLV, this can be decoded either
|
|
351 |
* directly via a CPhoneBookBuffer() or via the CPhoneBookEntry::InternalizeFromTlvEntry() utility.
|
|
352 |
*
|
|
353 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
354 |
* or another error code to indicate the failure otherwise.
|
|
355 |
*
|
|
356 |
* @see RMobilePhoneBookStore::Write()
|
|
357 |
* @see CPhoneBookBuffer()
|
|
358 |
* @see CPhoneBookEntry::InternalizeFromTlvEntry()
|
|
359 |
*/
|
|
360 |
{
|
|
361 |
TSYLOGENTRYEXIT;
|
|
362 |
if((aPhonebook != DispatcherPhonebook::EIccAdn)&&
|
|
363 |
(aPhonebook != DispatcherPhonebook::EIccAdn))
|
|
364 |
{
|
|
365 |
return TSYLOGSETEXITERR(KErrNotSupported);
|
|
366 |
}
|
|
367 |
|
|
368 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
369 |
if( KErrNone == ret )
|
|
370 |
{
|
|
371 |
CAtPhbkStoreWrite* atPhbkStoreWrite = CAtPhbkStoreWrite::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
372 |
//Setting Port active
|
|
373 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
374 |
iGloblePhone->SetActiveRequest(atPhbkStoreWrite);
|
|
375 |
atPhbkStoreWrite->SetPhonebookType(aPhonebook);
|
|
376 |
atPhbkStoreWrite->SetPhonebookEntryL(aEntry);
|
|
377 |
atPhbkStoreWrite->StartRequest();
|
|
378 |
}
|
|
379 |
|
|
380 |
return TSYLOGSETEXITERR(ret);
|
|
381 |
} // CLtsyPhonebookHandler::HandleStoreWriteEntryReqL
|
|
382 |
|
|
383 |
|
|
384 |
TInt CLtsyPhonebookHandler::HandleGetPhoneStoreInfoReqL(const TDesC& aStoreName)
|
|
385 |
/**
|
|
386 |
* This request is completed by invoking
|
|
387 |
* CCtsyDispatcherCallback::CallbackPhonebookGetPhoneStoreInfoComp()
|
|
388 |
*
|
|
389 |
* @param aStoreName The store to retrieve the information from.
|
|
390 |
*
|
|
391 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
392 |
* or another error code to indicate the failure otherwise.
|
|
393 |
*
|
|
394 |
* @see RMobilePhone::GetPhoneStoreInfo()
|
|
395 |
*/
|
|
396 |
{
|
|
397 |
TSYLOGENTRYEXIT;
|
|
398 |
if((aStoreName.CompareF(KETelIccFdnPhoneBook) != KErrNone)
|
|
399 |
&&(aStoreName.CompareF(KETelIccAdnPhoneBook) != KErrNone)
|
|
400 |
&&(aStoreName.CompareF(KETelIccSmsStore) != KErrNone))
|
|
401 |
{
|
|
402 |
return TSYLOGSETEXITERR(KErrNotSupported);
|
|
403 |
}
|
|
404 |
|
|
405 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
406 |
if( KErrNone == ret )
|
|
407 |
{
|
|
408 |
CAtPhbkGetPhoneStoreInfo* atPhbkGetPhoneStoreInfo =CAtPhbkGetPhoneStoreInfo::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
409 |
//Setting Port active
|
|
410 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
411 |
iGloblePhone->SetActiveRequest(atPhbkGetPhoneStoreInfo);
|
|
412 |
atPhbkGetPhoneStoreInfo->SetPhoneStoreParam(aStoreName);
|
|
413 |
atPhbkGetPhoneStoreInfo->StartRequest();
|
|
414 |
}
|
|
415 |
|
|
416 |
return TSYLOGSETEXITERR(ret);
|
|
417 |
} // CLtsyPhonebookHandler::HandleGetPhoneStoreInfoReqL
|
|
418 |
|
|
419 |
|
|
420 |
TInt CLtsyPhonebookHandler::HandleSmsStoreDeleteEntryReqL(TInt aIndex)
|
|
421 |
/**
|
|
422 |
* This request is completed by invoking
|
|
423 |
* CCtsyDispatcherCallback::CallbackPhonebookSmsStoreDeleteEntryComp().
|
|
424 |
*
|
|
425 |
* @param aIndex index of the entry to be deleted from the SMS store.
|
|
426 |
*
|
|
427 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
428 |
* or another error code to indicate the failure otherwise.
|
|
429 |
*/
|
|
430 |
{
|
|
431 |
TSYLOGENTRYEXIT;
|
|
432 |
|
|
433 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
434 |
if( KErrNone == ret )
|
|
435 |
{
|
|
436 |
CAtSmsStoreDelete* atSmsStoreDelete = CAtSmsStoreDelete::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
437 |
//Setting Port active
|
|
438 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
439 |
iGloblePhone->SetActiveRequest(atSmsStoreDelete);
|
|
440 |
atSmsStoreDelete->SetDelIndex(aIndex);
|
|
441 |
atSmsStoreDelete->StartRequest();
|
|
442 |
}
|
|
443 |
|
|
444 |
return TSYLOGSETEXITERR(ret);
|
|
445 |
} // CLtsyPhonebookHandler::HandleSmsStoreDeleteEntryReqL
|
|
446 |
|
|
447 |
|
|
448 |
TInt CLtsyPhonebookHandler::HandleSmsStoreDeleteAllReqL()
|
|
449 |
/**
|
|
450 |
* This request is completed by invoking
|
|
451 |
* CCtsyDispatcherCallback::CallbackPhonebookSmsStoreDeleteAllComp().
|
|
452 |
*
|
|
453 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
454 |
* or another error code to indicate the failure otherwise.
|
|
455 |
*/
|
|
456 |
{
|
|
457 |
TSYLOGENTRYEXIT;
|
|
458 |
|
|
459 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
460 |
if( KErrNone == ret )
|
|
461 |
{
|
|
462 |
CAtSmsStoreDeleteAll* atSmsStoreDeleteAll = CAtSmsStoreDeleteAll::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
463 |
//Setting Port active
|
|
464 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
465 |
iGloblePhone->SetActiveRequest(atSmsStoreDeleteAll);
|
|
466 |
atSmsStoreDeleteAll->StartRequest();
|
|
467 |
}
|
|
468 |
|
|
469 |
return TSYLOGSETEXITERR(ret);
|
|
470 |
} // CLtsyPhonebookHandler::HandleSmsStoreDeleteAllReqL
|
|
471 |
|
|
472 |
|
|
473 |
TInt CLtsyPhonebookHandler::HandleSmsStoreGetInfoReqL()
|
|
474 |
/**
|
|
475 |
* This request is completed by invoking
|
|
476 |
* CCtsyDispatcherCallback::CallbackPhonebookSmsStoreGetInfoComp().
|
|
477 |
*
|
|
478 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
479 |
* or another error code to indicate the failure otherwise.
|
|
480 |
*/
|
|
481 |
{
|
|
482 |
TSYLOGENTRYEXIT;
|
|
483 |
|
|
484 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
485 |
if( KErrNone == ret )
|
|
486 |
{
|
|
487 |
CAtSmsStoreInfo* atSmsStoreInfo = CAtSmsStoreInfo::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
488 |
//Setting Port active
|
|
489 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
490 |
iGloblePhone->SetActiveRequest(atSmsStoreInfo);
|
|
491 |
atSmsStoreInfo->StartRequest();
|
|
492 |
}
|
|
493 |
|
|
494 |
return TSYLOGSETEXITERR(ret);
|
|
495 |
} // CLtsyPhonebookHandler::HandleSmsStoreGetInfoReqL
|
|
496 |
|
|
497 |
|
|
498 |
TInt CLtsyPhonebookHandler::HandleSmsStoreReadEntryReqL(TInt aIndex)
|
|
499 |
/**
|
|
500 |
* This request is completed by invoking
|
|
501 |
* CCtsyDispatcherCallback::CallbackPhonebookSmsStoreReadEntryComp().
|
|
502 |
*
|
|
503 |
* @param aIndex index of the entry to be read.
|
|
504 |
*
|
|
505 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
506 |
* or another error code to indicate the failure otherwise.
|
|
507 |
*/
|
|
508 |
{
|
|
509 |
TSYLOGENTRYEXIT;
|
|
510 |
|
|
511 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
512 |
if( KErrNone == ret )
|
|
513 |
{
|
|
514 |
CAtSmsStoreRead* atSmsStoreRead = CAtSmsStoreRead::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
515 |
//Setting Port active
|
|
516 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
517 |
iGloblePhone->SetActiveRequest(atSmsStoreRead);
|
|
518 |
atSmsStoreRead->SetMsgIndex(aIndex);
|
|
519 |
atSmsStoreRead->StartRequest();
|
|
520 |
}
|
|
521 |
return TSYLOGSETEXITERR(ret);
|
|
522 |
} // CLtsyPhonebookHandler::HandleSmsStoreReadEntryReqL
|
|
523 |
|
|
524 |
|
|
525 |
TInt CLtsyPhonebookHandler::HandleSmsStoreWriteEntryReqL(const RMobileSmsStore::TMobileGsmSmsEntryV1& aMobileGsmEntry)
|
|
526 |
/**
|
|
527 |
* This request is completed by invoking
|
|
528 |
* CCtsyDispatcherCallback::CallbackPhonebookSmsStoreWriteEntryComp().
|
|
529 |
*
|
|
530 |
* @param aMobileGsmEntry Defines contents of a fixed-size GSM SMS entry to be stored.
|
|
531 |
*
|
|
532 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
533 |
* or another error code to indicate the failure otherwise.
|
|
534 |
*/
|
|
535 |
{
|
|
536 |
TSYLOGENTRYEXIT;
|
|
537 |
|
|
538 |
TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
|
|
539 |
if( KErrNone == ret )
|
|
540 |
{
|
|
541 |
CAtSmsStoreWrite* atSmsStoreWrite = CAtSmsStoreWrite::NewL(*iGloblePhone,iCtsyDispatcherCallback);
|
|
542 |
//Setting Port active
|
|
543 |
iGloblePhone->iEventSignalActive = ETrue;
|
|
544 |
iGloblePhone->SetActiveRequest(atSmsStoreWrite);
|
|
545 |
atSmsStoreWrite->SeGsmSmsEntry(aMobileGsmEntry);
|
|
546 |
atSmsStoreWrite->StartRequest();
|
|
547 |
}
|
|
548 |
return TSYLOGSETEXITERR(ret);
|
|
549 |
} // CLtsyPhonebookHandler::HandleSmsStoreWriteEntryReqL
|
|
550 |
|
|
551 |
|
|
552 |
TInt CLtsyPhonebookHandler::HandleStoreCacheCancelReqL(DispatcherPhonebook::TPhonebook /*aPhonebook*/)
|
|
553 |
/**
|
|
554 |
* This request is completed by invoking
|
|
555 |
* CCtsyDispatcherCallback::CallbackPhonebookStoreCacheCancel()
|
|
556 |
*
|
|
557 |
* @param aPhonebook The phonebook to cancel the pending cache.
|
|
558 |
*
|
|
559 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
560 |
* or another error code to indicate the failure otherwise.
|
|
561 |
*/
|
|
562 |
{
|
|
563 |
TSYLOGENTRYEXIT;
|
|
564 |
|
|
565 |
TInt ret = KErrNotSupported;
|
|
566 |
|
|
567 |
|
|
568 |
return TSYLOGSETEXITERR(ret);
|
|
569 |
} // CLtsyPhonebookHandler::HandleStoreCacheCancelReqL
|
|
570 |
|