| Start/ | End/ | |||
| True | False | - | Line | Source |
| 1 | /* | |||
| 2 | * ============================================================================== | |||
| 3 | * Name : cvimpststoragecontact.cpp | |||
| 4 | * Part of : IMUiserviceTab / vimpststorage | |||
| 5 | * Description : Implementation of contact data container | |||
| 6 | * Version : %version: 29 % | |||
| 7 | * | |||
| 8 | * Copyright (c) 2008 Nokia Corporation. | |||
| 9 | * This material, including documentation and any related | |||
| 10 | * computer programs, is protected by copyright controlled by | |||
| 11 | * Nokia Corporation. All rights are reserved. Copying, | |||
| 12 | * including reproducing, storing, adapting or translating, any | |||
| 13 | * or all of this material requires the prior written consent of | |||
| 14 | * Nokia Corporation. This material also contains confidential | |||
| 15 | * information which may not be disclosed to others without the | |||
| 16 | * prior written consent of Nokia Corporation. | |||
| 17 | * ============================================================================== | |||
| 18 | */ | |||
| 19 | ||||
| 20 | ||||
| 21 | // INCLUDE FILES | |||
| 22 | #include "s_storageitemmodel.h" | |||
| 23 | #include "s_vimpststoragecontact.h" | |||
| 24 | ||||
| 25 | ||||
| 26 | // ============================ MEMBER FUNCTIONS =============================== | |||
| 27 | ||||
| 28 | ||||
| 29 | ||||
| 30 | // ----------------------------------------------------------------------------- | |||
| 31 | // CVIMPSTStorageContact::NewL | |||
| 32 | // Two-phased constructor. | |||
| 33 | // ----------------------------------------------------------------------------- | |||
| 34 | // | |||
| 64 | 0 | 35 | MVIMPSTStorageItemModel* vimpststorageitemlist_stub::NewL() | |
| 36 | { | |||
| 37 | MVIMPSTStorageItemModel* list = new(ELeave)vimpststorageitemlist_stub; | |||
| 64 | 38 | return list; | ||
| 39 | } | |||
| 40 | ||||
| 41 | ||||
| 42 | ||||
| 66 | 0 | 43 | TInt vimpststorageitemlist_stub::Count() const | |
| 44 | { | |||
| 66 | 45 | return 1; | ||
| 46 | } | |||
| 47 | ||||
| 48 | /** | |||
| 49 | * Returns List item at given index. | |||
| 50 | * @param aIndex | |||
| 51 | * @return SItem List item | |||
| 52 | ||||
| 53 | */ | |||
| 66 | 0 | 54 | MVIMPSTStorageItemModel::SItem vimpststorageitemlist_stub::Item( TInt aIndex ) const | |
| 55 | { | |||
| 56 | MVIMPSTStorageItemModel::SItem item; | |||
| 57 | item.iType = MVIMPSTStorageItemModel::EContactItem; | |||
| 58 | item.iContactList = NULL; | |||
| 59 | item.iContact = vimpststoragecontact_stub::NewL(); | |||
| 66 | 60 | return item; | ||
| 61 | } | |||
| 62 | ||||
| 63 | ||||
| 64 | /** | |||
| 65 | * Get index for contact. | |||
| 66 | * @param aContact. Contact item to be found. | |||
| 67 | * @return TInt Index of contact. If contact not found returns KErrNotFound | |||
| 68 | */ | |||
| 1 | 0 | 69 | TInt vimpststorageitemlist_stub::IndexOfContact( MVIMPSTStorageContact* aContact ) const | |
| 70 | { | |||
| 1 | 71 | return 1; | ||
| 72 | } | |||
| 73 | ||||
| 74 | /** | |||
| 75 | * Get index for list | |||
| 76 | * @param aList. Contact item to be found. | |||
| 77 | * @param aIgnoreOwnItem. If ETrue own item is not taken into account | |||
| 78 | * when resolving index. | |||
| 79 | * @param aIgnoreEmptyLists If ETrue, empty lists are ignored. | |||
| 80 | * @return TInt Index of list. If list not found returns KErrNotFound | |||
| 81 | */ | |||
| 0 | 0 | - | 82 | TInt vimpststorageitemlist_stub::IndexOfList( MVIMPSTStorageContactList* aList, |
| 83 | TBool aIgnoreOwnItem , | |||
| 84 | TBool aIgnoreEmptyLists ) const | |||
| 85 | { | |||
| 0 | - | 86 | return 1; | |
| 87 | } | |||
| 88 | ||||
| 89 | // ----------------------------------------------------------------------------- | |||
| 90 | // CVIMPSTContactListModel::MdcaCount | |||
| 91 | // (other items were commented in a header). | |||
| 92 | // ----------------------------------------------------------------------------- | |||
| 93 | // | |||
| 0 | 0 | - | 94 | TInt vimpststorageitemlist_stub::MdcaCount() const |
| 95 | { | |||
| 96 | ||||
| 0 | - | 97 | return Count(); | |
| 98 | } | |||
| 99 | ||||
| 100 | // ----------------------------------------------------------------------------- | |||
| 101 | // CVIMPSTContactListModel::MdcaPoint | |||
| 102 | // (other items were commented in a header). | |||
| 103 | // ----------------------------------------------------------------------------- | |||
| 104 | // | |||
| 0 | 0 | - | 105 | TPtrC vimpststorageitemlist_stub::MdcaPoint( TInt /*aIndex */) const |
| 106 | { | |||
| 107 | ||||
| 108 | // These will be filtered out | |||
| 0 | - | 109 | return KNullDesC(); | |
| 110 | } | |||
| 111 | ||||
| 112 | // End of File | |||
| ***TER 57% (8/14) of SOURCE FILE s_storageitemmodel.cpp | ||||