bluetoothengine/btui/inc/BtuiPluginInterface.h
branchRCL_3
changeset 23 9386f31cc85b
parent 0 f63038272f30
equal deleted inserted replaced
22:613943a21004 23:9386f31cc85b
       
     1 /*
       
     2 * Copyright (c) 2002-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 "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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BTUIPLUGININTERFACE_H
       
    19 #define BTUIPLUGININTERFACE_H
       
    20 
       
    21 #include <aknview.h>
       
    22 #include <gsbaseview.h>
       
    23 #include <btdevice.h>
       
    24 
       
    25 const TUid KCBtuiPluginInterfaceUid    = { 0x1020745F }; 
       
    26 
       
    27 
       
    28 enum TPluginViewId 
       
    29 {
       
    30     EMainViewId =1,
       
    31     EPairedDevicesViewId=2,
       
    32     EBlockedDevicesViewId=3
       
    33 };
       
    34 
       
    35 
       
    36 
       
    37 /**
       
    38 * Callback interface for plugins view activation observer
       
    39 */
       
    40 class MBtuiPluginViewActivationObserver
       
    41 {
       
    42 public: 
       
    43     /**
       
    44      *  Called when view is activated
       
    45      *
       
    46      *  @param aView Activated view id
       
    47      */
       
    48     virtual void PluginViewActivated(TPluginViewId aViewId)=0;    
       
    49 };
       
    50 
       
    51 
       
    52 /** This class implements the CGSPluginInterface which is used 
       
    53 * to implement the main view as general settings plugin.
       
    54 *
       
    55 *@lib BTUIPlugin.dll
       
    56 *@since S60 v3.1
       
    57 */
       
    58 class CBtuiPluginInterface	: public CGSBaseView
       
    59     {    
       
    60     public: // Constructors & destructors
       
    61 
       
    62         /**
       
    63         * Creates new BTUI View plugin having the given UID.
       
    64         * Uses Leave code KErrNotFound if implementation is not found.
       
    65         *
       
    66         * @param aImplementationUid Implementation UID of the plugin to be 
       
    67         *        created.
       
    68         * @param aModel Pointer to the BTUI Model of BTUI Application.
       
    69         */                                                 
       
    70         static CBtuiPluginInterface* NewL(
       
    71             const TUid aImplementationUid, MBtuiPluginViewActivationObserver* aObserver = NULL);
       
    72 
       
    73         /**
       
    74         * From CGSPluginInterface
       
    75         */            
       
    76 		void GetCaptionL( TDes& aCaption ) const;
       
    77 
       
    78         /**
       
    79         * Destructor
       
    80         */
       
    81         inline ~CBtuiPluginInterface();
       
    82         
       
    83         /**
       
    84          * One ECom plugin of a type of HID device has its unique DeviceClass.
       
    85          * The HID plugin has to implement this function to report the plug-in loader of its COD.
       
    86          * Otherwise, it won't be added to enable setting view.
       
    87          * @return TBTDeviceClass Class of Device defined in btdevice.h
       
    88          */        
       
    89         inline void SetCOD(TBTDeviceClass& aCOD);
       
    90         inline TBTDeviceClass GetCOD() const;
       
    91             
       
    92     protected: 
       
    93     	/** Non leaving constructor
       
    94     	*/
       
    95         inline CBtuiPluginInterface();
       
    96 
       
    97 		inline void NewContainerL();
       
    98 
       
    99 		inline void HandleListBoxSelectionL();
       
   100 
       
   101 			
       
   102     private: // Data
       
   103 
       
   104         /**
       
   105         * ECOM plugin instance UID.
       
   106         */
       
   107         TUid iDtor_ID_Key;
       
   108         TBTDeviceClass iCOD;
       
   109     };
       
   110 
       
   111 #include "BtuiPluginInterface.inl"
       
   112 
       
   113 #endif //BTUIPLUGININTERFACE_H