uiservicetab/vimpststorage/inc/cvimpststoragemanager.h
changeset 0 5e5d6b214f4f
child 9 be6847aef077
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Declaration of storage manager class
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CVIMPSTSTORAGEMANAGER_H
       
    21 #define CVIMPSTSTORAGEMANAGER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CVIMPSTStorageServiceView;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  *  Factory to create contact and group list interfaces.
       
    34  */
       
    35 class CVIMPSTStorageManager : public CBase
       
    36     {
       
    37     public: // New functions
       
    38 
       
    39 		/**
       
    40          * Initialises the Library
       
    41          */
       
    42         static void InitialiseLibraryL();
       
    43          
       
    44         /**
       
    45          * Release the resources allocated 
       
    46          */
       
    47        	static TInt Release();
       
    48         
       
    49         /**
       
    50          * Returns the instance of Storagemanager
       
    51          * @return CVIMPSTStorageManager pointer
       
    52          */ 
       
    53        	static  CVIMPSTStorageManager& Instance();
       
    54          
       
    55        
       
    56         /**
       
    57          * Creates object of viewid 
       
    58          * @param aServiceId - Service Id
       
    59          * @param ContactStoreName
       
    60          * @param aServiceName ServiceName
       
    61          * @return CVIMPSTStorageViewId pointer
       
    62          */
       
    63         CVIMPSTStorageServiceView* CreateServiceViewL(TUint32 aServiceId,
       
    64         							const TDesC& aStoreName,
       
    65         							const TDesC& aServiceName);
       
    66         
       
    67         /**
       
    68          * Find the storage views index
       
    69          * @param aServiceId - Service Id
       
    70          * @return index of the view
       
    71          */
       
    72          TInt FindServiceView(TUint32 aServiceId);
       
    73          
       
    74          
       
    75         /**
       
    76          * Romoves the storage view from the array.
       
    77          * @param aServiceId - Service Id
       
    78          */
       
    79          void RemoveServiceView(TUint32 aServiceId);
       
    80          
       
    81         /**
       
    82          * Destructor
       
    83          */
       
    84           ~CVIMPSTStorageManager();
       
    85 
       
    86     private:
       
    87     
       
    88         /**
       
    89          * Two-phased constructor.
       
    90          */
       
    91         static CVIMPSTStorageManager* NewL();
       
    92         
       
    93         // ConstructL
       
    94         void CVIMPSTStorageManager::ConstructL();
       
    95   
       
    96        
       
    97     private:
       
    98     
       
    99     	// list of storage viewsn created for diff services
       
   100     	// owns
       
   101         RPointerArray< CVIMPSTStorageServiceView > iServiceViewList; 
       
   102        
       
   103     };
       
   104 
       
   105 #endif      // CVIMPSTSTORAGEMANAGER_H
       
   106 
       
   107 // End of File