homescreensrv_plat/sapi_homescreenplugin/hspsservice/inc/hspspersonalisationservice.h
changeset 0 79c6a41cd166
child 4 1a2a00e78665
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     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:  Defination of class CHspsPersonalisationService
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_HSPSPERSONALISATIONSERVICE_H
       
    20 #define C_HSPSPERSONALISATIONSERVICE_H
       
    21 
       
    22 // SYSTEM INCLUDES
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <hspsclient.h>
       
    26 #include <hspsthememanagement.h>
       
    27 #include <hspsodt.h>
       
    28 
       
    29 #include <hspsdomlist.h>
       
    30 #include <hspsdomdocument.h>
       
    31 
       
    32 // USER INCLUDES
       
    33 
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class ChspsDomNode;
       
    37  
       
    38 /**
       
    39  * @ingroup group_hsps_sapi
       
    40  * This class provides HSPS personalisation services.
       
    41  * 
       
    42  * @since S60 5.0 
       
    43 */
       
    44 class CHspsPersonalisationService : public CBase, public MhspsThemeManagementServiceObserver
       
    45     {
       
    46     public: // Constructor and destructor
       
    47 
       
    48         /**
       
    49          * Two-phased constructor.
       
    50          * 
       
    51          * @since S60 5.0
       
    52          */
       
    53         IMPORT_C static CHspsPersonalisationService* NewL();
       
    54     
       
    55         /**
       
    56          * Destructor.
       
    57          */
       
    58         virtual ~CHspsPersonalisationService();
       
    59 
       
    60     private: // Constructors
       
    61 
       
    62         /**
       
    63          * Constructor
       
    64         */
       
    65         CHspsPersonalisationService();
       
    66     
       
    67         /**
       
    68          * Symbian Constructor
       
    69         */
       
    70         void ConstructL();
       
    71 
       
    72 
       
    73     public: // From base class MhspsThemeManagementServiceObserver
       
    74 
       
    75         /**
       
    76          * Realisation of MhspsThemeManagementServiceObserver Interface
       
    77          * @param aMessage contains a service completion message
       
    78          */
       
    79         void HandlehspsClientMessage( ThspsServiceCompletedMessage aMessage );
       
    80 
       
    81     public: // New methods
       
    82        
       
    83         /**
       
    84          * Get the list of plugins ODT headers.
       
    85          * 
       
    86          * @since S60 5.0
       
    87          * @param aInterface Interface of the requested plugins.
       
    88          * @param aType Type of the requested plugins.
       
    89          * @param aFamily Requested plugin configuration family
       
    90          * @param aList List of plugins ODT headers.
       
    91          */
       
    92         IMPORT_C void GetPluginListL( 
       
    93             TDesC8& aInterface,
       
    94             TDesC8& aType,
       
    95             TUint32 aFamily,
       
    96             CArrayPtrFlat<ChspsODT>& aList
       
    97             );
       
    98 
       
    99         /**
       
   100          * Add a new plugin to the defined configuration.
       
   101          * 
       
   102          * @since S60 5.0
       
   103          * @param aAppUid Uid of modified application configuration.
       
   104          * @param aConfId Id of modified configuration.
       
   105          * @param aPluginUid Uid of new plugin.
       
   106          * @param aPosition Position in configurations plugin list.
       
   107          * @param aPluginId Id of new plugin in modified configuration.
       
   108          */
       
   109         IMPORT_C void AddPluginL(
       
   110             TInt aAppUid,
       
   111             TDesC8& aConfId,
       
   112             TDesC8& aPluginUid,
       
   113             TDesC8& aPosition,
       
   114             TInt& aPluginId
       
   115             );
       
   116 
       
   117         /**
       
   118          * Remove plugin from the defined configuration.
       
   119          * 
       
   120          * @since S60 5.0
       
   121          * @param aAppUid Uid of modified application configuration.
       
   122          * @param aPluginId Id of removed plugin in configuration.
       
   123          */
       
   124         IMPORT_C void RemovePluginL(
       
   125             TInt aAppUid,
       
   126             TDesC8& aPluginId
       
   127             );
       
   128 
       
   129         /**
       
   130          * Sets/changed plugin settings. 
       
   131          * 
       
   132          * @since S60 5.0
       
   133          * @param aAppUid Uid of modified application configuration.
       
   134          * @param aPluginId Id of plugin whose settings are updated.
       
   135          * @param aDom Dom document of the settings which are changed.
       
   136          * @param aPluginStoringStatus status to tell whether plugin reference need to be stored.
       
   137          */
       
   138         IMPORT_C void SetPluginSettingsL(
       
   139                 TInt aAppUid,
       
   140                 TDesC8& aPluginId,
       
   141                 ChspsDomDocument& aDom,
       
   142                 TBool aPluginStoringStatus);
       
   143 
       
   144         /**
       
   145          * Updates plugin position in a configuration.
       
   146          * 
       
   147          * @since S60 5.0 
       
   148          * @param aAppUid Uid of modified application configuration.
       
   149          * @param aConfId Id of a configuration whose plugins list is updated.
       
   150          * @param aPluginIds An array of plugin ids in the new positions.         
       
   151          */
       
   152         IMPORT_C void MovePluginsL(
       
   153             const TInt aAppUid,
       
   154             TDesC8& aConfId,
       
   155             CArrayFixFlat<TInt>& aPluginIds );
       
   156 
       
   157         /**
       
   158          * Get a list of ODT headers containing the information of available
       
   159          * configurations for the defined application.
       
   160          * 
       
   161          * @since S60 5.0
       
   162          * @param aAppUid application UID.
       
   163          * @param aFamily Requested application configuration family
       
   164          * @param aList An array of available application configurations.         
       
   165          */
       
   166         IMPORT_C void GetAppConfListL(
       
   167             TInt aAppUid,
       
   168             TUint32 aFamily,
       
   169             CArrayPtrFlat<ChspsODT>& aList );
       
   170 
       
   171         /**
       
   172          * Set active application configuration.
       
   173          * 
       
   174          * @since S60 5.0
       
   175          * @param aAppUid application UID.
       
   176          * @param aConfUid configuration UID.         
       
   177          */
       
   178         IMPORT_C void SetActiveAppConfL(
       
   179             TInt aAppUid,
       
   180             TDesC8& aConfUid );
       
   181 
       
   182         /**
       
   183          * Gets plugin odt.
       
   184          * 
       
   185          * @since S60 5.0
       
   186          * @param aAppUid - application uid.
       
   187          * @param aPluginUid - plugin's uid to be retrieved. 
       
   188          * @param aPluginOdt - odt.
       
   189          */
       
   190         IMPORT_C void GetPluginOdtL(
       
   191             TInt aAppUid,
       
   192             TDesC8& aPluginUid,
       
   193             ChspsODT* aPluginOdt );    
       
   194 
       
   195         /**
       
   196          * Set configuration state.
       
   197          * 
       
   198          * @since S60 5.0
       
   199          * @param aAppUid - application uid.
       
   200          * @param aConfId - configuration id.
       
   201          * @param aState - configuration's next state.
       
   202          * @param aFilter - configuration selection options
       
   203          */
       
   204         IMPORT_C void SetConfStateL(
       
   205             TInt aAppUid,
       
   206             TDesC8& aConfId,
       
   207             TDesC8& aState,
       
   208             TDesC8& aFilter );    
       
   209 
       
   210         /**
       
   211          * Restore active application configuration
       
   212          * @param aAppUid - application uid
       
   213          * @param aConfId - configuration id 
       
   214          */
       
   215         IMPORT_C void RestoreActiveAppConfL(
       
   216             TInt aAppUid,
       
   217             TDesC8& aConfUid );
       
   218 
       
   219         /**
       
   220          * Activates defined plugin in plugin list
       
   221          * 
       
   222          * @since S60 5.0
       
   223          * @param aAppUid Uid of modified application configuration.
       
   224          * @param aPluginId Id of activated plugin
       
   225          */
       
   226         IMPORT_C void SetActivePluginL(
       
   227             TInt aAppUid,
       
   228             TDesC8& aPluginId
       
   229             );
       
   230         
       
   231         /**
       
   232          * Replaces a plugin in active application configuration
       
   233          * @param aAppUid - application uid
       
   234          * @param aPluginId - id of the plugin to be replaced
       
   235          * @param aConfUid - uid of the new plugin configuration 
       
   236          */
       
   237         IMPORT_C void ReplacePluginL(
       
   238             const TInt aAppUid,
       
   239             const TDesC8& aPluginId,
       
   240             const TDesC8& aConfUid );
       
   241 
       
   242     private: // Methods
       
   243     
       
   244     private: // Data        
       
   245 
       
   246         // Pointer to HSPS Theme server client object
       
   247         ChspsClient* iHspsClient;
       
   248 
       
   249     };
       
   250 
       
   251 #endif // C_HSPSPERSONALISATIONSERVICE_H
       
   252 
       
   253 // End of File.