contacts_plat/virtual_phonebook_policy_api/inc/phonebook/CVPbkContactCopyPolicyManager.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  A class for finding a copy policy for different stores
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CVPBKCONTACTCOPYPOLICYMANAGER_H
       
    21 #define CVPBKCONTACTCOPYPOLICYMANAGER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class TVPbkContactStoreUriPtr;
       
    28 class CImplementationInformation;
       
    29 class CVPbkContactCopyPolicy;
       
    30 class MVPbkContactCopyPolicy;
       
    31 class CVPbkContactManager;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36  * A class for finding a copy policy for different stores.
       
    37  *
       
    38  * @lib VPbkEng.lib
       
    39  */
       
    40 class CVPbkContactCopyPolicyManager : public CBase
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43         /**
       
    44          * Two-phased constructor.
       
    45          * @return A new instance of this class
       
    46          */
       
    47         IMPORT_C static CVPbkContactCopyPolicyManager* NewL();
       
    48 
       
    49         /**
       
    50          * Destructor.
       
    51          */
       
    52         virtual ~CVPbkContactCopyPolicyManager();
       
    53 
       
    54     public: // New functions
       
    55 
       
    56         /**
       
    57          * Returns the policy for the given store or NULL if there
       
    58          * is no policy for the given URI. Ownership is not given.
       
    59          *
       
    60          * @param aContactManager the contact manager that has
       
    61          *        an open store for aUri
       
    62          * @param aUri The URI of the target store
       
    63          * @return The copy policy or NULL. Ownership is not given.
       
    64          */
       
    65         IMPORT_C MVPbkContactCopyPolicy* GetPolicyL(
       
    66                 CVPbkContactManager& aContactManager,
       
    67                 const TVPbkContactStoreUriPtr& aUri);
       
    68 
       
    69     private: // Construction
       
    70         CVPbkContactCopyPolicyManager();
       
    71         void ConstructL();
       
    72 
       
    73     private:    // implementation
       
    74         CImplementationInformation* FindInfoL(
       
    75                 const TVPbkContactStoreUriPtr& aUri);
       
    76         MVPbkContactCopyPolicy* FindPolicy(TUid aUid);
       
    77         MVPbkContactCopyPolicy* LoadPolicyL(TUid aUid,
       
    78                 CVPbkContactManager& aContactManager);
       
    79 
       
    80     private:    // Data
       
    81         /// Own: copy policy implementation informations
       
    82         RPointerArray<CImplementationInformation> iImplementationInfoArray;
       
    83         /// Own: copy policies
       
    84         RPointerArray<CVPbkContactCopyPolicy> iPolicyArray;
       
    85     };
       
    86 
       
    87 #endif      // CVPBKCONTACTCOPYPOLICYMANAGER_H
       
    88 
       
    89 // End of File