serviceproviders/sapi_location/inc/locationservicehandler.h
changeset 5 989d2f495d90
child 23 50974a8b132e
equal deleted inserted replaced
1:a36b1e19a461 5:989d2f495d90
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  Header file for location SAPI core implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef LOCATIONSERVICEHANDLER_H
       
    19 #define LOCATIONSERVICEHANDLER_H
       
    20 
       
    21 
       
    22 #include <liwserviceifbase.h>
       
    23 #include <LiwCommon.h>
       
    24 
       
    25 /**
       
    26  * InerfaceName ILocation
       
    27  * Contenttypes Service.Location
       
    28  */
       
    29  
       
    30  
       
    31 _LIT8(KLsInterfaceName , "ILocation") ;
       
    32 _LIT8(KLocationContents , "Service.Location") ;
       
    33 
       
    34 /**
       
    35  * A const member which holds max supported to be stored as part of 
       
    36  * iPositionGeneric  member of class CLocServiceHandler
       
    37  */
       
    38 const TUint KMaxFields = 25 ;
       
    39 
       
    40 /**
       
    41  * This is the  service interface to access location base service provider
       
    42  * this class is inherited from CLiwServiceIfBase class
       
    43  *
       
    44  * @lib ServiceHandler.lib depenedncy
       
    45  * @see CLiwServiceIfBase in liwserviceifbase.h file
       
    46  * 
       
    47  */
       
    48 class CLocServiceHandler  : public CLiwServiceIfBase
       
    49     {
       
    50     public: 
       
    51       /**
       
    52        * Method to create 
       
    53        */
       
    54        
       
    55         static CLocServiceHandler* NewL();
       
    56       
       
    57         /**
       
    58          * Default destruct 
       
    59          */ 
       
    60        virtual ~CLocServiceHandler();
       
    61 
       
    62     public: 
       
    63         /**
       
    64          * Called by the LIW framework to initialise provider with necessary information 
       
    65          * from the Service Handler. This method is called when the consumer makes 
       
    66          * the attach operation.         
       
    67          *
       
    68          * @param aFrameworkCallback callback handle function
       
    69          * @param aInterest consumer application's intrest
       
    70          */
       
    71         virtual void InitialiseL(
       
    72             MLiwNotifyCallback& aFrameworkCallback,
       
    73             const RCriteriaArray& aInterest);
       
    74          
       
    75       /**
       
    76        * Executes generic service commands included in criteria, derived from CLiwServiceIfBase
       
    77        * 
       
    78        * @param aCmdId Command to be executed.
       
    79        * @param aInParamList Input parameters, can be an empty list.
       
    80        * @param aOutParamList Output parameters, can be an empty list.
       
    81        * @param aCmdOptions Options for the command, see KLiwOpt* in LiwCommon.hrh.
       
    82        * @param aCallback Callback for asynchronous command handling, parameter checking, etc.
       
    83        * 
       
    84        */
       
    85 
       
    86         virtual void HandleServiceCmdL(
       
    87             const TInt& aCmdId,
       
    88             const CLiwGenericParamList& aInParamList,
       
    89             CLiwGenericParamList& aOutParamList,
       
    90             TUint aCmdOptions = 0,
       
    91             const MLiwNotifyCallback* aCallback = NULL);
       
    92          
       
    93             
       
    94 
       
    95     private:
       
    96         /**
       
    97          * Private default constructor
       
    98          */ 
       
    99           
       
   100         CLocServiceHandler();
       
   101         
       
   102         /**
       
   103          * Internal CmdExecute function which parses  the input parameters
       
   104          * this function is called by HandleCmdL() function 
       
   105          *
       
   106          * @param aCmdId Command to be executed.
       
   107          * @param aInParamList Input parameters, can be an empty list.
       
   108          * @param aOutParamList Output parameters, can be an empty list.
       
   109          * @param aCmdOptions Options for the command, see KLiwOpt* in LiwCommon.hrh.
       
   110          * @param aCallback Callback for asynchronous command handling, parameter checking, etc.
       
   111          * @leave KErrArgument Callback is missing when required.
       
   112          * @leave KErrNotSupported No provider supports service.
       
   113          *
       
   114          */
       
   115            
       
   116          
       
   117          void CmdExecuteL(
       
   118          		const TInt& aCmdId,
       
   119             	const CLiwGenericParamList& aInParamList,
       
   120             	CLiwGenericParamList& aOutParamList,
       
   121             	TUint aCmdOptions ,
       
   122             	const MLiwNotifyCallback* aCallback);
       
   123             	
       
   124          
       
   125 
       
   126     private:
       
   127          
       
   128         TBuf8<KMaxFields> iContentType;
       
   129     };
       
   130 
       
   131 
       
   132 
       
   133 #endif //LOCATIONSERVICEHANDLER_H