homescreensrv_plat/sapi_homescreenplugin/inc/hspscallback.h
branchRCL_3
changeset 114 a5a39a295112
equal deleted inserted replaced
113:0efa10d348c0 114:a5a39a295112
       
     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 CHspsCallback
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __HSPSCALLBACK_H
       
    20 #define __HSPSCALLBACK_H
       
    21 
       
    22 #include <liwcommon.h>
       
    23 #include <liwserviceifbase.h>
       
    24 #include <liwbufferextension.h>
       
    25 
       
    26 #include "hspsconfigurationservice.h"
       
    27 
       
    28 
       
    29 /**
       
    30  *  @ingroup group_hsps_sapi
       
    31  *  HSPS callback interface, its pure interface class, application need to 
       
    32  *  Write there own callback derriving from this class.
       
    33  */
       
    34  
       
    35  class MHspsCallback 
       
    36     {
       
    37     /**
       
    38      * Handles notifications caused by an asynchronous calls.
       
    39      *
       
    40      * @return Success/Error code for the callback.
       
    41      */
       
    42     public:
       
    43         
       
    44     virtual void NotifyResultL( TInt aErrCode, ChspsRequestNotificationParams& aParams, RArray<TInt>& aIds ) = 0;
       
    45     };
       
    46 
       
    47 /**
       
    48 * @ingroup group_hsps_sapi 
       
    49 * This class provides asynchronous notifications to HSPS SAPI user
       
    50 */
       
    51 class CHspsReqNotifCallback : public CBase, public MHspsCallback
       
    52 	{
       
    53 	  
       
    54 	public:
       
    55 
       
    56 	  	/**
       
    57 	     * Two-phase Constructor
       
    58 	     * @return   CHspsReqNotifCallback* 
       
    59 	    */		
       
    60 		static CHspsReqNotifCallback* NewL( MLiwNotifyCallback *aPtrNotifyCallback, 
       
    61 		        const CLiwGenericParamList &aPtrInParamList, TInt32 aTransactionId,
       
    62 		        CHspsConfigurationService& aHspsService );
       
    63         
       
    64 		
       
    65 		/**
       
    66 		 * Destructor.
       
    67 		 */
       
    68        virtual ~CHspsReqNotifCallback();
       
    69 
       
    70 	  	/**
       
    71 	     * Gives the result of asynchronous SAPI command Request Notification 
       
    72 	     * @param aErrCode errcode
       
    73 	     * @param aResult Result
       
    74 	     * @return   void
       
    75 	    */		
       
    76 		void NotifyResultL( TInt aErrCode, ChspsRequestNotificationParams& aParams, RArray<TInt>& aIds );
       
    77 	private:
       
    78 
       
    79 	  	/**
       
    80 	     * Constructor
       
    81 	    */		
       
    82 		CHspsReqNotifCallback( MLiwNotifyCallback *aPtrNotifyCallback, 
       
    83 		        const CLiwGenericParamList &aPtrInParamList, TInt32 aTransactionId,
       
    84 		        CHspsConfigurationService& aMcsService );
       
    85        
       
    86 		const TDesC8& ConvertEvent2LiwData( TInt aEvent );
       
    87 	private:
       
    88 	
       
    89 	    MLiwNotifyCallback* iPtrNotifyCallback;
       
    90         const CLiwGenericParamList* iPtrInParamList;
       
    91         TInt iTransactionId;
       
    92         CHspsConfigurationService* iHspsConfigurationService;
       
    93 	};
       
    94 
       
    95 
       
    96 #endif __HSPSCALLBACK_H