supl/locationsuplfw/gateway/inc/epos_csuplecomeventwatcher.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2009 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: Ecom Event watcher..Notifies when plugin uninstalled
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CSuplEComEventWatcher_H__
       
    19 #define __CSuplEComEventWatcher_H__
       
    20 
       
    21 
       
    22 #include "epos_msuplecomeventobserver.h"
       
    23 #include <e32base.h>
       
    24 #include <ecom/ecom.h>
       
    25 
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  Class to listen for Ecom events
       
    31 */
       
    32 
       
    33 class CSuplEcomEventWatcher : public CActive
       
    34 	{
       
    35 	public: // enum
       
    36 
       
    37 		typedef enum
       
    38 			{
       
    39 			EExist,
       
    40 			ENotExist
       
    41 			} TSuplEcomPlugInStatus;
       
    42 
       
    43 	public:
       
    44 	
       
    45 	    /**
       
    46         * Two-phased constructor.
       
    47         * @param aSuplEcomEventObserver is the reference of observer(CSuplServer).
       
    48         */
       
    49         static CSuplEcomEventWatcher* NewL(MSuplEcomEventObserver& aSuplEcomEventObserver, TUid aInterfaceUid, TUid aImplId);
       
    50         /**
       
    51         * Destructor.
       
    52         */        
       
    53 		virtual ~CSuplEcomEventWatcher();
       
    54 		
       
    55 		void NotifyOnPlugInUnInstallation();
       
    56 		
       
    57 	protected:  // From CActive
       
    58 	
       
    59 		void RunL();                
       
    60         TInt RunError(TInt aError);               
       
    61         void DoCancel();
       
    62         
       
    63 	private:
       
    64 		    
       
    65 	    /**
       
    66         * Constructor.
       
    67         */
       
    68         
       
    69 		CSuplEcomEventWatcher(MSuplEcomEventObserver& aSuplEcomEventObserver, TUid aInterfaceUid, TUid aImplId);
       
    70 		
       
    71 		/**
       
    72         * ConstructL.
       
    73         */
       
    74         
       
    75 		void	ConstructL();
       
    76 		
       
    77 		/**
       
    78         * The following method returns version of plug-in.
       
    79         * @param None.
       
    80         */        
       
    81 		TBool	IsImplementationExistL();
       
    82         
       
    83 	private:
       
    84 	
       
    85 		/**
       
    86         * Reference to CSuplServer.
       
    87         */        
       
    88 	    MSuplEcomEventObserver& 	iSuplEcomEventObserver;
       
    89 	    
       
    90 	    /**
       
    91         * Address of REComSession.
       
    92         */        
       
    93 	    REComSession* 				iEComSession;
       
    94 	    
       
    95 	    /**
       
    96 	    * Interface Id of respective Plug-In
       
    97 	    */	    
       
    98 	    TUid                        iPlugInInterfaceUid;
       
    99 	    	     
       
   100 	    /**
       
   101         * Implementation Id of respective Plug-In
       
   102         */        
       
   103 	    TUid 						iPlugInImplUid;
       
   104 	    
       
   105 	    /**
       
   106         * Current status of this plug-in whether plug-in exists or not.
       
   107         */ 
       
   108 	    TSuplEcomPlugInStatus       iSuplEcomPlugInStatus;  
       
   109 	    
       
   110 	};
       
   111 	
       
   112 #endif //__CSuplEComEventWatcher_H__