phonebookengines/VirtualPhonebook/VPbkLdapStore/src/ContactStoreInfo.cpp
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  CContactStoreInfo implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "contactstoreinfo.h"
       
    21 #include "contactstore.h"
       
    22 
       
    23 // -----------------------------------------------------------------------------
       
    24 // LDAP Store namespace
       
    25 // -----------------------------------------------------------------------------
       
    26 namespace LDAPStore {
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CContactStoreInfo::CContactStoreInfo
       
    30 // C++ default constructor can NOT contain any code, that might leave.
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 CContactStoreInfo::CContactStoreInfo(CContactStore& aStore)
       
    34 :   iStore(aStore)
       
    35     {
       
    36     // No implementation required
       
    37     }
       
    38 // -----------------------------------------------------------------------------
       
    39 // CContactStoreInfo::NewL
       
    40 // CContactStoreInfo two-phased constructor.
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 CContactStoreInfo* CContactStoreInfo::NewL(CContactStore& aStore)
       
    44     {
       
    45     return new(ELeave) CContactStoreInfo(aStore);
       
    46     }
       
    47 // -----------------------------------------------------------------------------
       
    48 // CContactStoreInfo::~CContactStoreInfo
       
    49 // CContactStoreInfo Destructor
       
    50 // -----------------------------------------------------------------------------
       
    51 //
       
    52 CContactStoreInfo::~CContactStoreInfo()
       
    53     {
       
    54     }
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 //                  MVPbkContactStoreInfo implementation
       
    58 // -----------------------------------------------------------------------------
       
    59 // CContactStoreInfo::MaxNumberOfContactsL
       
    60 // Returns the maximum number of contacts in store.
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 TInt CContactStoreInfo::MaxNumberOfContactsL() const
       
    64     {
       
    65     return KVPbkStoreInfoUnlimitedNumber;
       
    66     }
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // CContactStoreInfo::NumberOfContactsL
       
    70 // Returns the current number of contacts in the store.
       
    71 // -----------------------------------------------------------------------------
       
    72 //
       
    73 TInt CContactStoreInfo::NumberOfContactsL() const
       
    74     {
       
    75     // Constantly changing returned currently cached count
       
    76     return iStore.ContactCount();
       
    77     }
       
    78         
       
    79 // -----------------------------------------------------------------------------
       
    80 // CContactStoreInfo::ReservedMemoryL
       
    81 // Returns the amount of memory that this store reserves.
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 TInt64 CContactStoreInfo::ReservedMemoryL() const
       
    85     {
       
    86     // Remote store
       
    87     return 0;
       
    88     }
       
    89 
       
    90 // -----------------------------------------------------------------------------
       
    91 // CContactStoreInfo::FreeMemoryL
       
    92 // Returns the amount of memory that can be used.
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 inline TInt64 CContactStoreInfo::FreeMemoryL() const
       
    96 {
       
    97     // Remote store
       
    98     return 0;
       
    99 }
       
   100 
       
   101 // -----------------------------------------------------------------------------
       
   102 // CContactStoreInfo::MaxNumberOfGroupsL
       
   103 // Returns the maximum number of groups.
       
   104 // -----------------------------------------------------------------------------
       
   105 //
       
   106 TInt CContactStoreInfo::MaxNumberOfGroupsL() const
       
   107     {
       
   108     return KVPbkStoreInfoUnlimitedNumber;
       
   109     }
       
   110         
       
   111 // -----------------------------------------------------------------------------
       
   112 // CContactStoreInfo::NumberOfGroupsL
       
   113 // Returns the maximum number of groups.
       
   114 // -----------------------------------------------------------------------------
       
   115 //
       
   116 TInt CContactStoreInfo::NumberOfGroupsL() const
       
   117     {
       
   118     // No groups
       
   119     return 0;
       
   120     }
       
   121 
       
   122 }  // End of namespace LDAPStore
       
   123 // -----------------------------------------------------------------------------
       
   124 //  End of File
       
   125 // -----------------------------------------------------------------------------