PECengine/ListLibrary2/ContactListSrc/CPEngContactListManager.h
branchRCL_3
changeset 17 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
16:6ca72c0fe49a 17:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Contact lists manager
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CPENGCONTACTLISTMANAGER_H__
       
    19 #define __CPENGCONTACTLISTMANAGER_H__
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include "CPEngContactListManagerBase.h"
       
    24 #include "MPEngContactListManager.h"
       
    25 #include <e32base.h>
       
    26 
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MPEngContactList;
       
    30 class CPEngContactListModBase;
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36  * Contact List manager
       
    37  * Used to maintain contact lists.
       
    38  *
       
    39  * @lib PEngListLib2
       
    40  * @since 3.0
       
    41  */
       
    42 NONSHARABLE_CLASS( CPEngContactListManager ) :
       
    43         public CPEngContactListManagerBase,
       
    44         public MPEngContactListManager
       
    45     {
       
    46 public:  // Two-phased constructors and destructor
       
    47 
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      */
       
    51     static CPEngContactListManager* NewL(
       
    52         MPEngListLibFactory& aFactory,
       
    53         const CPEngSessionSlotId& aSessionSlot );
       
    54 
       
    55     /**
       
    56      * Two-phased constructor.
       
    57      */
       
    58     static CPEngContactListManager* NewLC(
       
    59         MPEngListLibFactory& aFactory,
       
    60         const CPEngSessionSlotId& aSessionSlot );
       
    61 
       
    62     /**
       
    63      * Destructor
       
    64      */
       
    65     virtual ~CPEngContactListManager();
       
    66 
       
    67 
       
    68 public:  // Functions from MPEngContactListManager
       
    69 
       
    70     /**
       
    71      * Decrease reference count
       
    72      * @see <MPEngContactListManager.h>
       
    73      */
       
    74     void Close();
       
    75 
       
    76 
       
    77     /**
       
    78      * Retrieves contact list model
       
    79      * @see <MPEngContactListManager.h>
       
    80      */
       
    81     MPEngContactListAdvance& ContactListL( const TDesC& aContactList );
       
    82 
       
    83 
       
    84     /**
       
    85      * List of all contact lists
       
    86      * @see <MPEngContactListManager.h>
       
    87      */
       
    88     const MDesCArray& AllContactListsL() const;
       
    89 
       
    90 
       
    91     /**
       
    92      * Active contact list.
       
    93      * @see <MPEngContactListManager.h>
       
    94      */
       
    95     const MDesCArray& SynchronizedContactLists( ) const;
       
    96 
       
    97 
       
    98     /**
       
    99      * Contact list settings model
       
   100      * @see <MPEngContactListManager.h>
       
   101      */
       
   102     MPEngContactListProperties& ContactListSettingsL( const TDesC& aContacList );
       
   103 
       
   104 
       
   105     /**
       
   106      * Set Default contact list
       
   107      * @see <MPEngContactListManager.h>
       
   108      */
       
   109     void SetAsDefaultCntListL( const TDesC& aContactList );
       
   110 
       
   111 
       
   112     /**
       
   113      * Create new contact list.
       
   114      * @see <MPEngContactListManager.h>
       
   115      */
       
   116     MPEngContactListProperties& CreateContactListL(
       
   117         const TDesC& aContactList,
       
   118         TPEngContactListBaseSettings& aBaseSettings );
       
   119 
       
   120     /**
       
   121      * Delete contact list
       
   122      * @see <MPEngContactListManager.h>
       
   123      */
       
   124     void DeleteContactListL( const TDesC& aContactList );
       
   125 
       
   126 
       
   127     /**
       
   128      * Change contact list type
       
   129      * @see <MPEngContactListManager.h>
       
   130      */
       
   131     void ChangeContactListTypeL( const TDesC& aContactList,
       
   132                                  TPEngContactListType aContactListType );
       
   133 
       
   134 
       
   135     /**
       
   136      * Release contact list model from the memory
       
   137      * @see <MPEngContactListManager.h>
       
   138      */
       
   139     void ReleaseCntListModel( const TDesC& aContactList );
       
   140 
       
   141 
       
   142 
       
   143 private: // Overwrittent form CPEngContactListManagerBase
       
   144 
       
   145     /**
       
   146      * Handle settings update
       
   147      */
       
   148     void HandleSettingsUpdateL();
       
   149 
       
   150 
       
   151 
       
   152 private: // constructors
       
   153 
       
   154     /**
       
   155      * C++ constructor.
       
   156      */
       
   157     CPEngContactListManager( MPEngListLibFactory& aFactory );
       
   158 
       
   159 
       
   160     /**
       
   161      * By default Symbian 2nd phase constructor is private.
       
   162      */
       
   163     void ConstructL( const CPEngSessionSlotId& aSessionSlot );
       
   164 
       
   165 
       
   166 private:    // Data
       
   167 
       
   168     /// OWN: All contact lists
       
   169     CPtrC16Array                            iAllLists;
       
   170 
       
   171     /// OWN: Contact lists which synhronized
       
   172     CPtrC16Array                            iSynchronizedLists;
       
   173     };
       
   174 
       
   175 #endif      //  __CPENGCONTACTLISTMANAGER_H__
       
   176 
       
   177 //  End of File
       
   178 
       
   179 
       
   180 
       
   181