meetingrequest/mrgui/inc/cesmrlocationplugin.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     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:  Interface definition for Location integration plug-in
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRLOCATIONPLUGIN_H
       
    20 #define CESMRLOCATIONPLUGIN_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <ecom/ecom.h>
       
    24 #include "esmrinternaluid.h"
       
    25 #include "mesmrlocationplugin.h"
       
    26 
       
    27 class MESMRLocationPluginObserver;
       
    28 
       
    29 /**
       
    30  *  CESMRLocationPlugin defines the interface for accessing location service provider
       
    31  *  from ESMR GUI.
       
    32  *
       
    33  */
       
    34 class CESMRLocationPlugin : public CActive,
       
    35 							public MESMRLocationPlugin
       
    36 	{
       
    37 
       
    38 public:
       
    39 
       
    40 	/**
       
    41 	 * Two-phased constructor
       
    42 	 * 
       
    43 	 * @param aObserver Observer for location plugin asynchronous events.
       
    44 	 */
       
    45 	inline static CESMRLocationPlugin* NewL();
       
    46 	
       
    47 	inline virtual ~CESMRLocationPlugin();
       
    48 
       
    49 	virtual void SetObserver ( MESMRLocationPluginObserver* aObserver ) = 0;
       
    50 
       
    51 protected:
       
    52 	
       
    53 	inline CESMRLocationPlugin( TInt aPriority );
       
    54 	
       
    55 private:	// data
       
    56 
       
    57 	TUid iDtorIDKey;
       
    58     };
       
    59 
       
    60 // INLINE FUNCTIONS
       
    61 
       
    62 inline CESMRLocationPlugin* CESMRLocationPlugin::NewL()
       
    63 	{
       
    64 	TAny* impl = NULL;
       
    65 	impl = REComSession::CreateImplementationL(
       
    66 			TUid::Uid( KESMRLocationPluginImplementationUid ),
       
    67 			_FOFF( CESMRLocationPlugin, iDtorIDKey ) );
       
    68 	return reinterpret_cast< CESMRLocationPlugin* >( impl );
       
    69 	}
       
    70 
       
    71 inline CESMRLocationPlugin::CESMRLocationPlugin( TInt aPriority )
       
    72 	: CActive( aPriority )
       
    73 	{	
       
    74 	}
       
    75 
       
    76 inline CESMRLocationPlugin::~CESMRLocationPlugin()
       
    77 	{
       
    78 	REComSession::DestroyedImplementation( iDtorIDKey );
       
    79 	}
       
    80 
       
    81 #endif // CESMRLOCATIONPLUGIN_H