serviceproviders/sapi_serviceregistry/inc/serviceregistryservicehandler.h
changeset 5 989d2f495d90
equal deleted inserted replaced
1:a36b1e19a461 5:989d2f495d90
       
     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 the License "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 SERVICEREGISTRYSERVICEHANDLER_H
       
    20 #define SERVICEREGISTRYSERVICEHANDLER_H
       
    21 
       
    22 #include <liwserviceifbase.h>
       
    23 
       
    24 /**
       
    25  *  Service handler class for ServiceRegistry SAPI.
       
    26  *
       
    27  *  Delegates requests to the correct interface implementation.
       
    28  * 
       
    29  */
       
    30 class CServiceRegistryServiceHandler : public CLiwServiceIfBase
       
    31     {
       
    32 public:
       
    33     /**
       
    34      * Two-phased constructor
       
    35      * @return CServiceRegistryServiceHandler*  Returns the instance of
       
    36      *                                                 CServiceRegistryServiceHandler
       
    37      */
       
    38     static CServiceRegistryServiceHandler* NewL();
       
    39     
       
    40      /**
       
    41       * Destructor.
       
    42       */
       
    43     ~CServiceRegistryServiceHandler();
       
    44 
       
    45 public:
       
    46  	
       
    47     /**
       
    48      * Called by the LIW framework to initialize provider with necessary information
       
    49      * from the Service Handler. This method is called when the consumer makes
       
    50      * the attach operation.
       
    51      *
       
    52      * @param aFrameworkCallback Framework provided callback for provider to send
       
    53      *                           events to framework.
       
    54      * @param aInterest List of criteria items which invoked the provider.
       
    55      */
       
    56     void InitialiseL(
       
    57             MLiwNotifyCallback& aFrameworkCallback,
       
    58             const RCriteriaArray& aInterest);
       
    59 
       
    60     /**
       
    61      * Executes generic service commands included in criteria.
       
    62      *
       
    63      * @param aCmdId Command to be executed.
       
    64      * @param aInParamList Input parameters, can be an empty list.
       
    65      * @param aOutParamList Output parameters, can be an empty list.
       
    66      * @param aCmdOptions Options for the command, see KLiwOpt* in LiwCommon.hrh.
       
    67      * @param aCallback Callback for asynchronous command handling, parameter checking, etc.
       
    68      */
       
    69     void HandleServiceCmdL(const TInt& aCmdId,
       
    70                                    const CLiwGenericParamList& aInParamList,
       
    71                                    CLiwGenericParamList& aOutParamList,
       
    72                                    TUint aCmdOptions = 0,
       
    73                                    const MLiwNotifyCallback* aCallback = NULL);
       
    74 
       
    75 private:
       
    76  	
       
    77     /**
       
    78      * Constructor.
       
    79      */
       
    80     CServiceRegistryServiceHandler(){};
       
    81 
       
    82     };
       
    83 
       
    84 #endif // SERVICEREGISTRYSERVICEHANDLER_H