homescreensrv_plat/sapi_homescreenplugin/inc/hspsconfigurationif.h
changeset 0 79c6a41cd166
child 1 844b978f8d5e
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 CHSPSConfigurationIf
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CHSPSCONFIGURATIONIF_H
       
    20 #define C_CHSPSCONFIGURATIONIF_H
       
    21 
       
    22 #include <LiwCommon.h>
       
    23 #include <LiwServiceIfBase.h>
       
    24 #include <LiwBufferExtension.h>
       
    25 #include "hspsconfigurationservice.h"
       
    26 #include "hspspersonalisationservice.h"
       
    27 
       
    28 //Forward declarations
       
    29 class CHspsLiwUtilities;
       
    30 
       
    31 
       
    32 #ifdef HSPS_LOG_ACTIVE
       
    33 class ChspsLogBus;
       
    34 class ChspsLiwDump;
       
    35 #endif
       
    36 
       
    37 /**
       
    38  * @ingroup group_hsps_sapi
       
    39  * This class provides the HSPS SAPI configuration interface to LIW Framework 
       
    40 */
       
    41 NONSHARABLE_CLASS( CHSPSConfigurationIf ) : public CBase, public MLiwInterface
       
    42     {
       
    43     public:
       
    44 
       
    45         /**
       
    46          * Two-phased constructor.
       
    47          * @return CHSPSConfigurationIf* 
       
    48         */
       
    49         static CHSPSConfigurationIf* NewL( TDesC8& aAppUid );
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CHSPSConfigurationIf();
       
    55 
       
    56     private:
       
    57 
       
    58         /**
       
    59          * Constructor
       
    60         */
       
    61         CHSPSConfigurationIf();
       
    62 
       
    63         /**
       
    64          * Symbian Constructor
       
    65          * @param aAppUid Application identifier of a configuration.
       
    66         */
       
    67         void ConstructL( TDesC8& aAppUid );
       
    68 
       
    69     public: // From MLiwInterface class
       
    70 
       
    71         /**
       
    72          * Executes the SAPI as per params
       
    73          * @param aCmdName Command name defining which operation is to be performed
       
    74          * @param aInParamList  Input param list
       
    75          * @param aOutParamList Output list
       
    76          * @param aCmdOptions Command option
       
    77          * @param aCallback Callback object pointer
       
    78         */
       
    79         void ExecuteCmdL( 
       
    80             const TDesC8& aCmdName,
       
    81             const CLiwGenericParamList& aInParamList,
       
    82             CLiwGenericParamList& aOutParamList,
       
    83             TUint aCmdOptions = 0,
       
    84             MLiwNotifyCallback* aCallback = 0 );
       
    85         
       
    86         /**
       
    87          * Closes the interface 
       
    88         */
       
    89         void Close();
       
    90 
       
    91     
       
    92     private: // New functions
       
    93 
       
    94         /**
       
    95          * Calls SAPI method syncronously
       
    96          * @param aCmdName Command name defining which operation is to be performed
       
    97          * @param aInParamList Input param list
       
    98          * @param aOutParamList Output param list
       
    99          */   
       
   100         void SyncMethodCallL( 
       
   101             const TDesC8& aCmdName,
       
   102             const CLiwGenericParamList& aInParamList, 
       
   103             CLiwGenericParamList& aOutParamList );
       
   104 
       
   105         /**
       
   106          * Calls SAPI method asyncronously
       
   107          * @param aCmdName Command name defining which operation is to be performed
       
   108          * @param aInParamList Input param list
       
   109          * @param aOutParamList Output param list
       
   110          * @param aCmdOptions asynchronous sapi command options
       
   111          * @param aCallback Callback object pointer
       
   112          */   
       
   113         void AsyncMethodCallL( 
       
   114             const TDesC8& aCmdName,
       
   115             const CLiwGenericParamList& aInParamList, 
       
   116             CLiwGenericParamList& aOutParamList,
       
   117             TUint aCmdOptions,
       
   118             MLiwNotifyCallback* aCallback );
       
   119 
       
   120         /**
       
   121          * Returns active configuration of the application
       
   122          * @param aOutParamList Output param list
       
   123          */     
       
   124         void GetActiveAppConfL( 
       
   125             CLiwGenericParamList& aOutParamList );
       
   126         
       
   127         /**
       
   128          * Returns plugin configuration of defined plugin
       
   129          * @param aInParamList Input param list
       
   130          * @param aOutParamList Output param list
       
   131          */   
       
   132         void GetPluginConfL( 
       
   133             const CLiwGenericParamList& aInParamList, 
       
   134             CLiwGenericParamList& aOutParamList );
       
   135 
       
   136         /**
       
   137          * Returns list of references to installed plugins
       
   138          * @param aInParamList Input param list
       
   139          * @param aOutParamList Output param list
       
   140          */   
       
   141         void GetPluginsL( 
       
   142             const CLiwGenericParamList& aInParamList, 
       
   143             CLiwGenericParamList& aOutParamList );
       
   144 
       
   145         /**
       
   146          * Returns list of references to plugins in active application 
       
   147          * configuration
       
   148          * @param aInParamList Input param list
       
   149          * @param aOutParamList Output param list
       
   150          */   
       
   151         void GetPluginListL( 
       
   152             const CLiwGenericParamList& aInParamList, 
       
   153             CLiwGenericParamList& aOutParamList );
       
   154         
       
   155         /**
       
   156          * Adds a new plugin to the defined configuration
       
   157          * @param aInParamList Input param list
       
   158          * @param aOutParamList Output param list
       
   159          */   
       
   160         void AddPluginL( 
       
   161             const CLiwGenericParamList& aInParamList, 
       
   162             CLiwGenericParamList& aOutParamList );
       
   163 
       
   164         /**
       
   165          * Removes a plugin from the active configuration
       
   166          * @param aInParamList Input param list
       
   167          * @param aOutParamList Output param list
       
   168          */   
       
   169         void RemovePluginL( 
       
   170             const CLiwGenericParamList& aInParamList, 
       
   171             CLiwGenericParamList& aOutParamList );
       
   172 
       
   173         /**
       
   174          * Replaces a plugin from the active configuration
       
   175          * @param aInParamList Input param list
       
   176          * @param aOutParamList Output param list
       
   177          */
       
   178         void ReplacePluginL( 
       
   179             const CLiwGenericParamList& aInParamList, 
       
   180             CLiwGenericParamList& aOutParamList );
       
   181         
       
   182         /**
       
   183          * Sets plugin settings
       
   184          * @param aInParamList Input param list
       
   185          * @param aOutParamList Output param list
       
   186          */
       
   187         void SetPluginSettingsL( 
       
   188             const CLiwGenericParamList& aInParamList, 
       
   189             CLiwGenericParamList& aOutParamList );
       
   190 
       
   191         /**
       
   192          * Gets plugin settings
       
   193          * @param aInParamList Input param list
       
   194          * @param aOutParamList Output param list
       
   195          */        
       
   196         void GetPluginSettingsL( 
       
   197             const CLiwGenericParamList& aInParamList, 
       
   198             CLiwGenericParamList& aOutParamList );
       
   199 
       
   200         /**
       
   201          * Updates plugin positions
       
   202          * @param aInParamList Input param list
       
   203          * @param aOutParamList Output param list
       
   204          */
       
   205         void MovePluginsL(
       
   206             const CLiwGenericParamList& aInParamList, 
       
   207             CLiwGenericParamList& aOutParamList );
       
   208 
       
   209 
       
   210         /**
       
   211          * Returns list of installed application configurations
       
   212          * @param aInParamList Input param list
       
   213          * @param aOutParamList Output param list
       
   214          */   
       
   215         void GetAppConfsL( 
       
   216             const CLiwGenericParamList& aInParamList, 
       
   217             CLiwGenericParamList& aOutParamList );
       
   218 
       
   219         /**
       
   220          * Sets active application configuration
       
   221          * @param aInParamList Input param list
       
   222          * @param aOutParamList Output param list
       
   223          */   
       
   224         void SetActiveAppConfL( 
       
   225             const CLiwGenericParamList& aInParamList, 
       
   226             CLiwGenericParamList& aOutParamList );
       
   227 
       
   228         /**
       
   229           * Change Notification request
       
   230           * @param aInParamList Input param list
       
   231           * @param aCallback Callback object pointer
       
   232           * @param aTransactionId Output param for async request to store transaction id
       
   233           */
       
   234         void RequestNotificationL( const CLiwGenericParamList& aInParamList, 
       
   235                                          MLiwNotifyCallback* aCallback,
       
   236                                          TInt32& aTransactionId );
       
   237 
       
   238         /**
       
   239          * Updates the configuration's state
       
   240          * @param aInParamList Input param list
       
   241          * @param aOutParamList Output param list
       
   242          */   
       
   243         void SetConfStateL( 
       
   244             const CLiwGenericParamList& aInParamList, 
       
   245             CLiwGenericParamList& aOutParamList );
       
   246 
       
   247         /**
       
   248          * Activates a plugin in plugin list
       
   249          * @param aInParamList Input param list
       
   250          * @param aOutParamList Output param list
       
   251          */   
       
   252         void SetActivePluginL( 
       
   253             const CLiwGenericParamList& aInParamList, 
       
   254             CLiwGenericParamList& aOutParamList );
       
   255 
       
   256         /**
       
   257          * Sets an error value to output parameter.
       
   258          * @param aOutParamList Output param list
       
   259          * @param aErr an error
       
   260          * @return void
       
   261         */
       
   262         void SetErrorL( 
       
   263             CLiwGenericParamList& aOutParamList, 
       
   264             TInt32 aErr );
       
   265         
       
   266     private: // Data
       
   267 
       
   268         /**
       
   269          * CHspsConfigurationService class pointer
       
   270          */        
       
   271         CHspsConfigurationService* iHspsConfigurationService;
       
   272 
       
   273         /**
       
   274          * CHspsPersonalisationService class pointer
       
   275          */        
       
   276         CHspsPersonalisationService* iHspsPersonalisationService;
       
   277 
       
   278         /**
       
   279          * LIW handler
       
   280          */        
       
   281         CHspsLiwUtilities* iHspsLiwUtilities;
       
   282         /**
       
   283          * CHspsReqNotifCallback class pointer
       
   284          */        
       
   285                 
       
   286 
       
   287 
       
   288 #ifdef HSPS_LOG_ACTIVE        
       
   289         /**
       
   290          * Log bus.
       
   291          */        
       
   292         ChspsLogBus* iLogBus;
       
   293         
       
   294         /**
       
   295          * Liw dump object.
       
   296          */        
       
   297         ChspsLiwDump* iLiwDump;
       
   298 #endif        
       
   299     };
       
   300 
       
   301 
       
   302 #endif // C_CHSPSCONFIGURATIONIF_H