menufw/hierarchynavigator/hnutilities/inc/hnrepositorymanager.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007-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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef HNREPOSITORYMANAGER_H_
       
    20 #define HNREPOSITORYMANAGER_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <centralrepository.h>
       
    24 
       
    25 #include "hnglobals.h"
       
    26 
       
    27 /**
       
    28  * Class for managing operation on the central repository.
       
    29  * It is used to store widget types of suites in the central repository.
       
    30  * 
       
    31  * @since S60 v5.0
       
    32  * @ingroup group_hnutilities
       
    33  */
       
    34 NONSHARABLE_CLASS( CHnRepositoryManager ) : public CBase
       
    35     {
       
    36 
       
    37 public:
       
    38     /**
       
    39      * Factory method.
       
    40      * 
       
    41      * @since S60 v5.0
       
    42      * @return Returns fully qualified object.
       
    43      */
       
    44     IMPORT_C static CHnRepositoryManager * NewL();
       
    45     
       
    46     /**
       
    47      * Factory method.
       
    48      * 
       
    49      * @since S60 v5.0 
       
    50      * @return Returns fully qualified object.
       
    51      */    
       
    52     IMPORT_C static CHnRepositoryManager * NewLC();
       
    53     
       
    54     /**
       
    55      * Stores widget type in the repository.
       
    56      * 
       
    57      * @since S60 v5.0
       
    58      * @param aSuiteName Name of the suite.
       
    59      * @param aWidgetType Widget type to be stored.
       
    60      * @return Error code.
       
    61      */    
       
    62     IMPORT_C TInt StoreSuiteWidgetTypeL( const TDesC & aSuiteName, 
       
    63                                          THnSuiteWidgetType aWidgetType );
       
    64     
       
    65     /**
       
    66      * Deletes all suite related information from the repository.
       
    67      * 
       
    68      * @since S60 v5.0
       
    69      * @param aSuiteName Name of the suite.
       
    70      * @return Error code.
       
    71      */    
       
    72     IMPORT_C TInt DeleteSuiteRelatedL( const TDesC & aSuiteName );
       
    73     
       
    74     /**
       
    75      * Read suite widget type from the repository.
       
    76      * 
       
    77      * @since S60 v5.0
       
    78      * @param aSuiteName Name of the suite.
       
    79      * @param aSuiteWidget Widget type.
       
    80      * @return Error code.
       
    81      */    
       
    82     IMPORT_C TInt ReadSuiteWidgetTypeL(
       
    83             const TDesC & aSuiteName, THnSuiteWidgetType& aSuiteWidget );
       
    84     
       
    85     /**
       
    86      * Standard C++ destructor.
       
    87      * 
       
    88      * @since S60 v5.0
       
    89      */    
       
    90     IMPORT_C ~CHnRepositoryManager();
       
    91     
       
    92 private:
       
    93 
       
    94     /**
       
    95      * Second phase symbian constructor.
       
    96      * 
       
    97      * @since S60 v5.0
       
    98      */
       
    99     void ConstructL();
       
   100     
       
   101     /**
       
   102      * Standard C++ constructor.
       
   103      * 
       
   104      * @since S60 v5.0
       
   105      */    
       
   106     CHnRepositoryManager();
       
   107     
       
   108 private: // data
       
   109 
       
   110     /**
       
   111      * Widget type position.
       
   112      */
       
   113     const TInt KWidgetTypePosition;
       
   114 
       
   115     /**
       
   116      * Central Repository object.
       
   117      * Own.
       
   118      */
       
   119     CRepository *iRepository;
       
   120     
       
   121     };
       
   122 
       
   123 #endif // HNREPOSITORYMANAGER_H_