|
1 /* |
|
2 * Copyright (c) 2006-2009 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef PHONEBOOKSTORE_H |
|
21 #define PHONEBOOKSTORE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <et_phone.h> |
|
25 #include <mpbutil.h> |
|
26 #include <ctsy/rmmcustomapi.h> |
|
27 #include "cmmgsmphonestorageprivateutility.h" |
|
28 #include <ctsy/tflogger.h> |
|
29 #include "MmTsy_timeoutdefs.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CMmTsyReqHandleStore; |
|
33 class CMmPhoneBookStoreExtInterface; |
|
34 class CPhoneBookDataPackage; |
|
35 class CMmDataPackage; |
|
36 class CMmPhoneTsy; |
|
37 |
|
38 /** |
|
39 * CMmPhoneTsy contains phonebook storage functionality. |
|
40 * Extension request handles and parameters are stored as attributes. |
|
41 */ |
|
42 NONSHARABLE_CLASS( CMmPhoneBookStoreTsy ) : public CSubSessionExtBase |
|
43 { |
|
44 private: |
|
45 |
|
46 /** |
|
47 * Request types used for Phonebook store requests. |
|
48 */ |
|
49 enum TPBRequestTypes |
|
50 { |
|
51 EMultimodePhoneBookStoreReqHandleUnknown, // 0 |
|
52 EMultimodePhoneStoreRead, |
|
53 EMultimodePhoneStoreWrite, |
|
54 EMultimodePhoneBookStoreRead, |
|
55 EMultimodePhoneBookStoreWrite, |
|
56 EMultimodePhoneStoreDelete, |
|
57 EMultimodePhoneStoreDeleteAll, |
|
58 EMultimodePhoneStoreGetInfo, |
|
59 EMultimodePhoneStoreNotifyStoreEvent, // 8 |
|
60 |
|
61 // This value must be 1 + exactly the same as the maximum enum |
|
62 // value of CMmPhoneBookStoreTsy::TPBRequestTypes. |
|
63 EMmTsyNumOfStorageRequests |
|
64 }; |
|
65 |
|
66 /** |
|
67 * Array handling enums |
|
68 */ |
|
69 enum TPBArrayTypeToRead |
|
70 { |
|
71 EPBStoreCacheArray, |
|
72 EPBStoreReadEntriesArray |
|
73 }; |
|
74 |
|
75 struct TReadRequestStore |
|
76 { |
|
77 /** ETel request handle */ |
|
78 TTsyReqHandle iReqHandle; |
|
79 /** index entries */ |
|
80 RMobilePhoneBookStore::TPBIndexAndNumEntries* iIndexAndEntries; |
|
81 /** pointer to client-side data */ |
|
82 TDes8* iPBData; |
|
83 /** Boolean indicating that new cache is processing*/ |
|
84 TBool iCaching; |
|
85 }; |
|
86 |
|
87 public: // Constructors and destructor |
|
88 |
|
89 /** |
|
90 * Two-phased constructor. |
|
91 * |
|
92 * |
|
93 * @param aMmPhone pointer to the Phone object |
|
94 * @param aName Name of the phonebook |
|
95 * @return Created phonebook store object |
|
96 */ |
|
97 static CMmPhoneBookStoreTsy* NewL( CMmPhoneTsy* aMmPhoneTsy, |
|
98 const TDesC& aName ); |
|
99 |
|
100 /** |
|
101 * Destructor. |
|
102 */ |
|
103 virtual ~CMmPhoneBookStoreTsy(); |
|
104 |
|
105 // New functions |
|
106 |
|
107 /** |
|
108 * Methods that are inherited from ETel Server base classes |
|
109 * Initialisation method |
|
110 */ |
|
111 virtual void Init(); |
|
112 |
|
113 /** |
|
114 * Creates new PBStore object by name and returns a pointer to it. |
|
115 * New instances are created by given name, hence this method is |
|
116 * NOT SUPPORTED. |
|
117 * |
|
118 * |
|
119 * @param aName A name of the object to be opened. |
|
120 * @return Pointer to created instance by given name. |
|
121 */ |
|
122 virtual CTelObject* OpenNewObjectByNameL( const TDesC& aName ); |
|
123 |
|
124 /** |
|
125 * Opens extendable sub-sessions. This method is not supported. |
|
126 * |
|
127 * |
|
128 * @param aName A name of the object to be opened. |
|
129 * @return Pointer to created instance by given name. |
|
130 */ |
|
131 virtual CTelObject* OpenNewObjectL( TDes& aName ); |
|
132 |
|
133 /** |
|
134 * Handles extended client requests |
|
135 * |
|
136 * |
|
137 * @param aTsyReqHandle The request handle |
|
138 * @param aIpc Request IPC number |
|
139 * @param aPackage Packaged data from ETel server |
|
140 * @return KErrNone or error |
|
141 */ |
|
142 virtual TInt ExtFunc( |
|
143 const TTsyReqHandle aTsyReqHandle, |
|
144 const TInt aIpc, |
|
145 const TDataPackage& aPackage ); |
|
146 |
|
147 /** |
|
148 * To ask what type of flow control is used for the IPC number. |
|
149 * |
|
150 * |
|
151 * @param aIp Request IPC number |
|
152 * @return Request mode for given IPC |
|
153 */ |
|
154 virtual CTelObject::TReqMode ReqModeL( const TInt aIpc ); |
|
155 |
|
156 /** |
|
157 * To ask the TSY how big buffer it wants. |
|
158 * |
|
159 * |
|
160 * @param aIpc Request IPC number |
|
161 * @return Number of slots |
|
162 */ |
|
163 virtual TInt NumberOfSlotsL( const TInt aIpc ); |
|
164 |
|
165 /** |
|
166 * To cancel any extension requests. |
|
167 * |
|
168 * |
|
169 * @param aIpc Request IPC number |
|
170 * @param aTsyReqHandle Request handle |
|
171 * @return KErrNone or error value |
|
172 */ |
|
173 virtual TInt CancelService( |
|
174 const TInt aIpc, |
|
175 const TTsyReqHandle aTsyReqHandle ); |
|
176 |
|
177 /** |
|
178 * Enables the TSY to "turn on" any regular notification. |
|
179 * |
|
180 * |
|
181 * @param aIpc Request IPC number |
|
182 * @return KErrNone or KErrNotSupported |
|
183 */ |
|
184 virtual TInt RegisterNotification( const TInt aIpc ); |
|
185 |
|
186 /** |
|
187 * Deregister given notification |
|
188 * |
|
189 * |
|
190 * @param aIpc Request IPC number |
|
191 * @return KErrNone or KErrNotSupported |
|
192 */ |
|
193 virtual TInt DeregisterNotification( const TInt aIpc ); |
|
194 |
|
195 /** |
|
196 * Sets the active phonebook extension |
|
197 * |
|
198 * |
|
199 * @param aMmPBExt pointer to the new PB extension |
|
200 * @return KErrNone if extension set, else KErrGeneral |
|
201 */ |
|
202 virtual TInt SetActivePBExtension( |
|
203 CMmPhoneBookStoreExtInterface* aMmPBExt ); |
|
204 |
|
205 /** |
|
206 * Gets the active phonebook extension |
|
207 * |
|
208 * |
|
209 * @return Pointer to the active PB extension |
|
210 */ |
|
211 virtual CMmPhoneBookStoreExtInterface* ActivePBExtension(); |
|
212 |
|
213 /** |
|
214 * Completes read -request from SIM and fills descriptor |
|
215 * with requested entry. |
|
216 * |
|
217 * |
|
218 * @param aResult Read result |
|
219 */ |
|
220 virtual void CompleteReadL( TInt aResult, CMmDataPackage* aDataPackage); |
|
221 |
|
222 /** |
|
223 * Completes write -request |
|
224 * |
|
225 * |
|
226 * @param aResult Result value |
|
227 * @param aDataPackage Data package |
|
228 */ |
|
229 virtual void CompleteWriteL( |
|
230 TInt aResult, |
|
231 CMmDataPackage* aDataPackage ); |
|
232 |
|
233 /** |
|
234 * Completes delete -request |
|
235 * |
|
236 * |
|
237 * @param TInt aResult Result value |
|
238 */ |
|
239 virtual void CompleteDeleteL( TInt aError, |
|
240 CMmDataPackage* aDataPackage ); |
|
241 |
|
242 /** |
|
243 * Completes GetInfo request |
|
244 * |
|
245 * |
|
246 * @param aResult Result value |
|
247 */ |
|
248 virtual void CompleteGetInfo( TInt aResult ); |
|
249 |
|
250 /** |
|
251 * Completes DeleteAll request |
|
252 * |
|
253 * |
|
254 * @param aResult Result value |
|
255 */ |
|
256 virtual void CompleteDeleteAll( TInt aResult, |
|
257 CMmDataPackage* aDataPackage ); |
|
258 |
|
259 /** |
|
260 * Completes Phonebook initialization |
|
261 * |
|
262 * |
|
263 * @param aResult Result value |
|
264 * @param aDataPackage |
|
265 */ |
|
266 virtual void CompletePBStoreInitializationL( TInt aResult, |
|
267 CMmDataPackage* aDataPackage ); |
|
268 |
|
269 /** |
|
270 * This method completes caching from SIM to TSY |
|
271 * |
|
272 * |
|
273 * @param aResult Result |
|
274 */ |
|
275 virtual void CompleteCachingL( TInt aResult, |
|
276 CMmDataPackage* aDataPackage ); |
|
277 |
|
278 /** |
|
279 * Sets PhoneBookType by name parameter |
|
280 * |
|
281 * |
|
282 * @param aName A name of the phonebook to be opened |
|
283 */ |
|
284 void SetPhoneBookType( const TDesC& aName ); |
|
285 |
|
286 /** |
|
287 * This method resets cache |
|
288 * |
|
289 * |
|
290 */ |
|
291 virtual void ResetCache(); |
|
292 |
|
293 /** |
|
294 * This method resets iCacheReady flag |
|
295 * |
|
296 * |
|
297 */ |
|
298 virtual void ResetCacheReady(); |
|
299 |
|
300 /** |
|
301 * This method resets iIsPhonebookInitialized flag |
|
302 * |
|
303 * |
|
304 */ |
|
305 virtual void ResetInitialisationStatus(); |
|
306 |
|
307 /** |
|
308 * This method returns pointer to CMmPhoneTsy -class |
|
309 * |
|
310 * |
|
311 * @return Pointer to CMmPhoneTsy -class |
|
312 */ |
|
313 virtual CMmPhoneTsy* Phone(); |
|
314 |
|
315 #ifdef REQHANDLE_TIMER |
|
316 /** |
|
317 * Calls the needed complete method due timer expiration |
|
318 * |
|
319 * |
|
320 * @param aReqHandleType req handle type. |
|
321 * @param aError error value |
|
322 */ |
|
323 virtual void Complete( TInt aReqHandleType, TInt aError ); |
|
324 #endif |
|
325 /** |
|
326 * This method continues Read |
|
327 * |
|
328 * |
|
329 */ |
|
330 void ContinueReadL(); |
|
331 |
|
332 /** |
|
333 * This method returns is the initialization done |
|
334 * |
|
335 * @param none |
|
336 * @return Phonebook init status |
|
337 */ |
|
338 TBool IsPBInitDone(); |
|
339 |
|
340 /** |
|
341 * This method returns phonebooktype |
|
342 * |
|
343 * @since S60 v3.2 |
|
344 * @param none |
|
345 * @return Phonebook type |
|
346 */ |
|
347 TUint8 GetPhonebookType(); |
|
348 |
|
349 private: |
|
350 |
|
351 /** |
|
352 * C++ default constructor. |
|
353 */ |
|
354 CMmPhoneBookStoreTsy(); |
|
355 |
|
356 /** |
|
357 * By default Symbian 2nd phase constructor is private. |
|
358 */ |
|
359 void ConstructL( const TDesC& aName ); |
|
360 |
|
361 /** |
|
362 * Handles extended client requests. Uses TRAP to ensure functioning |
|
363 * on memory allocation failure. |
|
364 * |
|
365 * |
|
366 * @param aTsyReqHandle Request handle |
|
367 * @param aIpc Interprocess communication command identifier (IPC) |
|
368 * @param aPackage reference to a data package |
|
369 * @return KErrNone if request accepted, else several possibilities |
|
370 * depending on IPC |
|
371 */ |
|
372 TInt DoExtFuncL( const TTsyReqHandle aTsyReqHandle, |
|
373 const TInt aIpc, const TDataPackage& aPackage ); |
|
374 |
|
375 /** |
|
376 * Gets store information |
|
377 * |
|
378 * |
|
379 * @param aTsyReqHandle Request handle |
|
380 * @param aInfo package containing TMobilePhoneBookInfoV1 object |
|
381 * @return KErrNone or system wide error code |
|
382 */ |
|
383 TInt GetInfoL( const TTsyReqHandle aTsyReqHandle, TDes8* aInfo ); |
|
384 |
|
385 /** |
|
386 * Cancels get store information |
|
387 * |
|
388 * |
|
389 * @param aTsyReqHandle Request handle |
|
390 * @return KErrNone |
|
391 */ |
|
392 TInt GetInfoCancel( const TTsyReqHandle aTsyReqHandle ); |
|
393 |
|
394 /** |
|
395 * Phonebookstorage specific Read -Request |
|
396 * |
|
397 * |
|
398 * @param aTsyReqHandle Request handle |
|
399 * @param aIndexAndEntries |
|
400 * @param aPBData descriptor to fill entry(ies) |
|
401 * @param aContinuedRead ETrue means this method has been invoked from ContinueReadL. Otherwise, EFalse. |
|
402 * @return KErrNone |
|
403 */ |
|
404 TInt ReadL( const TTsyReqHandle aTsyReqHandle, |
|
405 RMobilePhoneBookStore::TPBIndexAndNumEntries* aIndexAndEntries, |
|
406 TDes8* aPBData, TBool aContinuedRead=EFalse ); |
|
407 |
|
408 /** |
|
409 * Fill buffered descriptor with data from SIM Server |
|
410 * |
|
411 * |
|
412 * @param aPhoneBookStoreResp |
|
413 * @return KErrNone |
|
414 */ |
|
415 TInt FillBufferedDesL( CPhoneBookStoreEntry* aPhoneBookStoreResp ); |
|
416 |
|
417 /** |
|
418 * Cancel reading process |
|
419 * |
|
420 * |
|
421 * @param aTsyReqHandle Request handle |
|
422 * @return KErrNone |
|
423 */ |
|
424 TInt ReadCancel( const TTsyReqHandle aTsyReqHandle ); |
|
425 |
|
426 /** |
|
427 * Phonebookstorage specific Write -Request |
|
428 * |
|
429 * |
|
430 * @param aTsyReqHandle Request handle |
|
431 * @param aPBData data holding entry to write |
|
432 * @param aIndex index to write |
|
433 * @return KErrNone |
|
434 */ |
|
435 TInt WriteL( const TTsyReqHandle aTsyReqHandle, TDesC8* aPBData, |
|
436 TInt* aIndex ); |
|
437 |
|
438 /** |
|
439 * Writes entry by given index, index should be mapped to (U)SIM world |
|
440 * |
|
441 * |
|
442 * @param aIndex |
|
443 * @return None |
|
444 */ |
|
445 TInt WriteByIndexL( TInt aIndex ); |
|
446 |
|
447 /** |
|
448 * Deletes an entry from SIM |
|
449 * |
|
450 * |
|
451 * @param const TTsyReqHandle aTsyReqHandle Request handle |
|
452 * @param aIndex index to delete |
|
453 * @return KErrNone |
|
454 */ |
|
455 TInt DeleteL( const TTsyReqHandle aTsyReqHandle, TInt* aIndex ); |
|
456 |
|
457 /** |
|
458 * Deletes all entries from SIM |
|
459 * |
|
460 * |
|
461 * @param aTsyReqHandle Request handle |
|
462 * @return KErrNone |
|
463 */ |
|
464 TInt DeleteAllL( const TTsyReqHandle aTsyReqHandle ); |
|
465 |
|
466 /** |
|
467 * Notifies an entry event |
|
468 * |
|
469 * |
|
470 * @param aEvent event to notify |
|
471 * @param aIndex location to notify |
|
472 * @return KErrNone |
|
473 */ |
|
474 TInt NotifyStoreEvent( RMobilePhoneStore::TMobileStoreEvent *aEvent, |
|
475 TInt* aIndex ); |
|
476 |
|
477 /** |
|
478 * Cancels notify store event -request |
|
479 * |
|
480 * |
|
481 * @param aTsyReqHandle Request handle |
|
482 * @return KErrNone |
|
483 */ |
|
484 TInt NotifyStoreEventCancel( const TTsyReqHandle aTsyReqHandle ); |
|
485 |
|
486 /** |
|
487 * Completes NotifyStoreEvent request |
|
488 * |
|
489 * |
|
490 * @param aLocation index to notify |
|
491 */ |
|
492 void CompleteNotifyStoreEvent( TInt aLocation ); |
|
493 |
|
494 /** |
|
495 * Sets requested info parameters |
|
496 * |
|
497 * |
|
498 */ |
|
499 void SetInfo(); |
|
500 |
|
501 /** |
|
502 * This method resets class variables |
|
503 * |
|
504 * |
|
505 */ |
|
506 void ResetVariables(); |
|
507 |
|
508 /** |
|
509 * This method separates phonebook storage data from byte stream |
|
510 * |
|
511 * |
|
512 * @param aPBData data to separate |
|
513 * @param aWriteData data to be filled |
|
514 * @return KErrNone or error value |
|
515 */ |
|
516 TInt SeparatePBDataL( TDesC8* aPBData, |
|
517 CPhoneBookStoreEntry* aWriteData ); |
|
518 |
|
519 /** |
|
520 * This method starts the new caching request to (U)SIM |
|
521 * |
|
522 * |
|
523 */ |
|
524 void ReadToCacheL(); |
|
525 |
|
526 /** |
|
527 * This method updates cache |
|
528 * |
|
529 * |
|
530 * @param aEntry phonebook entry |
|
531 * @param aDeleteEntry Is the updating cache entry write or delete. |
|
532 */ |
|
533 void UpdateCacheL( CPhoneBookStoreEntry* aEntry, |
|
534 TBool aDeleteEntry ); |
|
535 |
|
536 /** |
|
537 * This method read num of entries by the phonebook type |
|
538 * and it is part of GetInfo functionality |
|
539 * |
|
540 * |
|
541 * @param aPhoneBookType phonebook type |
|
542 * @return KErrNone or error value |
|
543 */ |
|
544 TInt CountEntriesL(); |
|
545 |
|
546 /** |
|
547 * Sets maximum name & number length for the current phonebook |
|
548 * |
|
549 * |
|
550 */ |
|
551 void SetMaxNameAndNumLenght(); |
|
552 |
|
553 public: |
|
554 |
|
555 /** |
|
556 * This method returns the name of the phonebook |
|
557 * |
|
558 * |
|
559 * @param none |
|
560 * @return Phonebook name |
|
561 */ |
|
562 TName* PhoneBookName(); |
|
563 |
|
564 /** |
|
565 * This method Activates phonebook entry caching from SIM |
|
566 * |
|
567 * |
|
568 */ |
|
569 void CacheEntriesL(); |
|
570 |
|
571 /** |
|
572 * This method reads entries from array to fill client's read buffer |
|
573 * |
|
574 * |
|
575 * @param aArrayType Array type to be filled |
|
576 */ |
|
577 void ReadEntriesFromArrayL( TPBArrayTypeToRead aArrayType ); |
|
578 |
|
579 /** |
|
580 * This method completes read num of entries by the phonebook type |
|
581 * |
|
582 * |
|
583 * @param aResult Result value |
|
584 * @param aDataPackage Data package |
|
585 */ |
|
586 virtual void CompleteCountEntries( TInt aResult, |
|
587 CMmDataPackage* aDataPackage ); |
|
588 |
|
589 #ifdef REQHANDLE_TIMER |
|
590 /** |
|
591 * Chooses the type of response, automatic or common |
|
592 * |
|
593 * |
|
594 * @param aReqHandleType req handle type. |
|
595 * @param aTsyReqHandle req handle to be stored. |
|
596 */ |
|
597 void SetTypeOfResponse( const TInt aReqHandleType, |
|
598 const TTsyReqHandle aTsyReqHandle ); |
|
599 #endif |
|
600 |
|
601 #ifdef TF_LOGGING_ENABLED |
|
602 /** |
|
603 * Overloads original ReqCompleted for logging pourpouses |
|
604 * |
|
605 * |
|
606 * @param aTsyReqHandle TSY request handle |
|
607 * @param aError Error value |
|
608 */ |
|
609 virtual void ReqCompleted( |
|
610 const TTsyReqHandle aTsyReqHandle, |
|
611 const TInt aError ); |
|
612 #endif |
|
613 |
|
614 /** |
|
615 * This method copies entries from the LTSY cache to CTSYs own version of the cache |
|
616 * |
|
617 * |
|
618 * @param aEntryData Array type to be filled |
|
619 */ |
|
620 void CopyLtsyCacheToCtsyCache( CArrayPtrSeg<CPhoneBookStoreEntry>* aEntryData ); |
|
621 |
|
622 |
|
623 |
|
624 protected: // Data |
|
625 |
|
626 /* |
|
627 * Notify PhoneBookStore event |
|
628 */ |
|
629 RMobilePhoneStore::TMobileStoreEvent iMobilePhoneBookStoreEvent; |
|
630 |
|
631 private: // Data |
|
632 |
|
633 /* |
|
634 * Name of the phonebook |
|
635 */ |
|
636 TName iPhoneBookName; |
|
637 |
|
638 /* |
|
639 * Phonebook type |
|
640 */ |
|
641 TUint8 iPhoneBookType; |
|
642 |
|
643 /* |
|
644 * A pointer to the Phone TSY |
|
645 * Own. |
|
646 */ |
|
647 CMmPhoneTsy* iMmPhoneTsy; |
|
648 |
|
649 /* |
|
650 * A pointer to the active extension |
|
651 * Own. |
|
652 */ |
|
653 CMmPhoneBookStoreExtInterface* iMmPhoneBookStoreExtInterface; |
|
654 |
|
655 /* |
|
656 * Pointer to PhoneBookInfo Received from ETel |
|
657 * Own. |
|
658 */ |
|
659 RMobilePhoneBookStore::TMobilePhoneBookInfoV1* iPhoneBookInfoChanged; |
|
660 |
|
661 /* |
|
662 * PhoneBookInfo variable |
|
663 */ |
|
664 RMobilePhoneBookStore::TMobilePhoneBookInfoV1 iPhoneBookInfo; |
|
665 |
|
666 /* |
|
667 * Variable for reading entries |
|
668 */ |
|
669 TInt iNumEntriesToRead; |
|
670 |
|
671 /* |
|
672 * Variable to read entries |
|
673 * Own. |
|
674 */ |
|
675 TDes8* iBufferToRead; |
|
676 |
|
677 /* |
|
678 * Variable for reading multiple entries |
|
679 */ |
|
680 TInt iIndexToRead; |
|
681 |
|
682 /* |
|
683 * Attribute to hold the number of entries |
|
684 */ |
|
685 TInt iNumEntriesFilled; |
|
686 |
|
687 /* |
|
688 * Attribute to hold the pointer to index and entries |
|
689 * Own. |
|
690 */ |
|
691 RMobilePhoneBookStore::TPBIndexAndNumEntries* iIndexAndEntries; |
|
692 |
|
693 /* |
|
694 * Variable for return index value if needed |
|
695 * Own. |
|
696 */ |
|
697 TInt* iWriteIndexToReturn; |
|
698 |
|
699 /* |
|
700 * Pointer to PBData |
|
701 * Own. |
|
702 */ |
|
703 TDesC8* iPBData; |
|
704 |
|
705 /* |
|
706 * Class attribute to take a eventptr |
|
707 * Own. |
|
708 */ |
|
709 TAny* iNotifyPhoneBookStoreEventPtr; |
|
710 |
|
711 /* |
|
712 * Class attribute to indexptr |
|
713 * Own. |
|
714 */ |
|
715 TInt* iNotifyPhoneBookStoreEventIndexPtr; |
|
716 |
|
717 /* |
|
718 * A table for phonebook store request handles |
|
719 */ |
|
720 TTsyReqHandle iStorageReqHandles[EMmTsyNumOfStorageRequests]; |
|
721 |
|
722 /* |
|
723 * Pointer to ReqHandler instance |
|
724 * Own. |
|
725 */ |
|
726 CMmTsyReqHandleStore* iTsyReqHandleStore; |
|
727 |
|
728 /* |
|
729 * Class attribute to PB request type |
|
730 */ |
|
731 TPBRequestTypes iReqHandleType; |
|
732 |
|
733 /* |
|
734 * Attribute for reading multiple entries |
|
735 */ |
|
736 TInt iMultipleReadPosTo; |
|
737 |
|
738 /* |
|
739 * Attribute to hold information about max num len |
|
740 * for current phonebook |
|
741 */ |
|
742 TInt iMaxNumLen; |
|
743 |
|
744 /* |
|
745 * Attribute to hold information about max text len |
|
746 * for current phonebook |
|
747 */ |
|
748 TInt iMaxTextLen; |
|
749 |
|
750 /* |
|
751 * Pointer to phonebook cache |
|
752 * Own. |
|
753 */ |
|
754 CArrayPtrSeg<CPhoneBookStoreEntry>* iPBStoreCache; |
|
755 |
|
756 /* |
|
757 * Pointer to array for Read -request |
|
758 * Array is owned an destroyed by the LTSY |
|
759 */ |
|
760 CArrayPtrSeg<CPhoneBookStoreEntry>* iPBStoreReadEntries; |
|
761 |
|
762 /* |
|
763 * Attribute tells status of the cache |
|
764 */ |
|
765 TBool iCacheReady; |
|
766 |
|
767 /* |
|
768 * Pointer to write entry |
|
769 * Own. |
|
770 */ |
|
771 CPhoneBookStoreEntry* iWriteEntry; |
|
772 |
|
773 /* |
|
774 * Pointer to delete entry |
|
775 * Own. |
|
776 */ |
|
777 CPhoneBookStoreEntry* iDeleteEntry; |
|
778 |
|
779 /* |
|
780 * Attribute to used entries |
|
781 */ |
|
782 TInt iUsedEntries; |
|
783 |
|
784 /* |
|
785 * Attribute to hold info are used entries counted or not |
|
786 */ |
|
787 TBool iIsUsedEntriesCounted; |
|
788 |
|
789 /* |
|
790 * Attribute to hold storage info |
|
791 * Own. |
|
792 */ |
|
793 CStorageInfoData* iStoreInfoData; |
|
794 |
|
795 /* |
|
796 * Attribute to hold Read req. info |
|
797 * Own. |
|
798 */ |
|
799 TReadRequestStore* iReadReqStore; |
|
800 |
|
801 /* |
|
802 * Boolean indicating that read is requested |
|
803 */ |
|
804 TBool iRequestedOnPBRead; |
|
805 |
|
806 /* |
|
807 * Return value FillBufferedDesL |
|
808 */ |
|
809 TInt iRetFillBufferedDes; |
|
810 |
|
811 /* |
|
812 * Attribute to tell the status of PB initialization |
|
813 */ |
|
814 TBool iIsPBInitCompleted; |
|
815 }; |
|
816 |
|
817 #endif // PHONEBOOKSTORAGE_H |
|
818 |
|
819 // End of File |