idlehomescreen/sapiwrapper/hspswrapper/inc/hspsconfiguration.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     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:  Hsps configuration message
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CHSPSCONFIGURATION_H
       
    20 #define C_CHSPSCONFIGURATION_H
       
    21 
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 
       
    27 namespace hspswrapper{
       
    28 
       
    29 
       
    30 class CPluginMap;
       
    31 class CItemMap;
       
    32 class CObjectMap;
       
    33 class CPluginInfo;
       
    34 
       
    35 /**
       
    36  *  Hsps configuration message
       
    37  *  
       
    38  *
       
    39  *  @code
       
    40  *  
       
    41  *  @endcode
       
    42  *
       
    43  *  @lib xnlayoutengine
       
    44  *  @since S60 v5.0
       
    45  */
       
    46 class CHspsConfiguration : public CBase
       
    47     {
       
    48 
       
    49 public:
       
    50 
       
    51     /**
       
    52      * Two-phased constructor.
       
    53      */
       
    54     IMPORT_C static CHspsConfiguration* NewL();
       
    55     IMPORT_C static CHspsConfiguration* NewLC();
       
    56 
       
    57     /**
       
    58     * Destructor.
       
    59     */
       
    60     IMPORT_C virtual ~CHspsConfiguration();
       
    61 
       
    62     /**
       
    63      * Set configuration id
       
    64      *
       
    65      * @param aId configuration id
       
    66      */
       
    67     IMPORT_C CHspsConfiguration& SetConfIdL(const TDesC8& aId);
       
    68     
       
    69     /**
       
    70      * Get configuration id
       
    71      *
       
    72      * @return Configuration id or KNullDesC8
       
    73      */
       
    74     IMPORT_C const TDesC8& ConfId()const;
       
    75     
       
    76     /**
       
    77      * Get plugin info 
       
    78      *
       
    79      * @return Reference to plugin info
       
    80      */
       
    81     IMPORT_C CPluginInfo& PluginInfo();
       
    82     
       
    83     /**
       
    84      * Append plugin map into plugin map array
       
    85      *
       
    86      * @param aPluginMap Plugin map. Takes ownership
       
    87      */
       
    88     IMPORT_C CHspsConfiguration& AddPluginMapL(CPluginMap* aPluginMap);
       
    89     
       
    90     /**
       
    91      * Get plugin maps in a array
       
    92      *
       
    93      * @return Reference to plugin map array
       
    94      */
       
    95     IMPORT_C RPointerArray<CPluginMap>& PluginMaps();
       
    96     
       
    97     /**
       
    98      * Append item map into settings array  map
       
    99      *
       
   100      * @param aItemMap Item map. Takes ownership
       
   101      */
       
   102     IMPORT_C CHspsConfiguration& AddItemMapL(CItemMap* aItemMap);
       
   103     
       
   104     /**
       
   105      * Get settings array. Contains item maps
       
   106      *
       
   107      * @return Reference to settings array
       
   108      */
       
   109     IMPORT_C RPointerArray<CItemMap>& Settings();
       
   110     
       
   111     /**
       
   112      * Append object map into resources array  map
       
   113      *
       
   114      * @param aObjectMap Object map. Takes ownership
       
   115      */
       
   116     IMPORT_C CHspsConfiguration& AddObjectMapL(CObjectMap* aObjectMap);
       
   117     
       
   118     /**
       
   119      * Get resource array. Contains object maps
       
   120      *
       
   121      * @return Reference to resource array
       
   122      */
       
   123     IMPORT_C RPointerArray<CObjectMap>& Resources();
       
   124 private:
       
   125 
       
   126     CHspsConfiguration();
       
   127 
       
   128     void ConstructL();
       
   129 private: // data
       
   130 
       
   131     /**
       
   132      * Own. Configuration id
       
   133      */
       
   134     HBufC8* iId;
       
   135     /**
       
   136      * Own. Plugin info
       
   137      */
       
   138     CPluginInfo*    iPluginInfo;
       
   139     /**
       
   140      * Own. Plugins
       
   141      */
       
   142     RPointerArray<CPluginMap>   iPlugins;
       
   143     /**
       
   144      * Own. Settings
       
   145      */
       
   146     RPointerArray<CItemMap>     iSettings;
       
   147     /**
       
   148      * Own. Resources
       
   149      */
       
   150     RPointerArray<CObjectMap>   iResources;
       
   151     };
       
   152 
       
   153 }
       
   154 
       
   155 #endif // C_CHSPSCONFIGURATION_H