remotecontrol/remotecontrolfw/targetselectorplugin/public/remcontargetselectorplugin.h
changeset 51 20ac952a623c
equal deleted inserted replaced
48:22de2e391156 51:20ac952a623c
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef TARGETSELECTORPLUGIN_H
       
    23 #define TARGETSELECTORPLUGIN_H
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 class MRemConTargetSelectorPluginObserver;
       
    28 class TRemConAddress;
       
    29 class TClientInfo;
       
    30 class TBearerSecurity;
       
    31 
       
    32 /**
       
    33 The UID of the Target Selector Plugin interface.
       
    34 */
       
    35 const TInt KRemConTargetSelectorInterfaceUid = 0x10204B28;
       
    36 
       
    37 /**
       
    38 Abstract base class for target selector plugins.
       
    39 */
       
    40 class CRemConTargetSelectorPlugin : public CBase
       
    41 	{
       
    42 public:
       
    43 	/** 
       
    44 	Constructor.
       
    45 	@param aImplementationUid The UID of the implementation.
       
    46 	@param aObserver The observer of the TSP.
       
    47 	*/
       
    48 	IMPORT_C static CRemConTargetSelectorPlugin* NewL(TUid aImplementationUid, 
       
    49 		MRemConTargetSelectorPluginObserver& aObserver);
       
    50 
       
    51 	/** Destructor. */
       
    52 	IMPORT_C ~CRemConTargetSelectorPlugin();
       
    53 
       
    54 public:
       
    55 	/**
       
    56 	Called by RemCon server to get a pointer to an object which implements the 
       
    57 	TSP interface with UID aUid. This is a mechanism for allowing future 
       
    58 	change to the TSP API without breaking BC in existing (non-updated) 
       
    59 	TSPs.
       
    60 	*/
       
    61 	virtual TAny* GetInterface(TUid aUid) = 0;
       
    62 
       
    63 protected:
       
    64 	/** 
       
    65 	Constructor.
       
    66 	@param aObserver The observer of the TSP.
       
    67 	*/
       
    68 	IMPORT_C CRemConTargetSelectorPlugin(MRemConTargetSelectorPluginObserver& aObserver);
       
    69 
       
    70 protected:
       
    71 	/**
       
    72 	Accessor for the observer.
       
    73 	@return The observer.
       
    74 	*/
       
    75 	IMPORT_C MRemConTargetSelectorPluginObserver& Observer();
       
    76 
       
    77 private: // owned
       
    78 	/**
       
    79 	UID set by ECOM when the instance is created. Used when the instance is 
       
    80 	destroyed.
       
    81 	*/
       
    82 	TUid iInstanceId;
       
    83 
       
    84 	/** 
       
    85 	Pad for BC-friendly future change.
       
    86 	*/
       
    87 	TAny* iPad;
       
    88 
       
    89 private: // unowned
       
    90 	MRemConTargetSelectorPluginObserver& iObserver;
       
    91 	};
       
    92 
       
    93 #endif // TARGETSELECTORPLUGIN_H