bluetoothengine/btui/Ecom/inc/BTUIListedDevicesView.h
branchRCL_3
changeset 55 613943a21004
parent 54 0ba996a9b75d
child 56 9386f31cc85b
equal deleted inserted replaced
54:0ba996a9b75d 55:613943a21004
     1 /*
       
     2 * Copyright (c) 2006-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:  The view that handles paired devices.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BTUILISTEDDEVICESVIEW_H
       
    19 #define BTUILISTEDDEVICESVIEW_H
       
    20 
       
    21 #include "BtuiPluginInterface.h"
       
    22 #include "BTUIDeviceContainer.h"
       
    23 #include "btdevmodel.h"
       
    24 #include "BTUIViewsCommonUtils.h"
       
    25 
       
    26 /**
       
    27 * SuperClass of PairedDevicesView and BlockedDevicesview.
       
    28 *
       
    29 * This defines functionality common to PairedDevicesView and BlockedDevicesview.
       
    30 *
       
    31 *@lib BTUIPlugin.dll
       
    32 *@since S60 v3.2
       
    33 */
       
    34 class CBTUIListedDevicesView : public CBtuiPluginInterface,
       
    35 		                     public MBTDeviceObserver,
       
    36 		                     public TBTUIViewsCommonUtils		                      
       
    37 		                      
       
    38     {
       
    39     public:
       
    40 
       
    41 	    /** Checks if there a device change operation
       
    42 	     * ongoing.
       
    43 	     * @return ETrue if there is. EFalse otherwise
       
    44 	     */    	
       
    45     	TBool DeviceChangeInProgress()
       
    46     		{
       
    47    			return iModel && iModel->DeviceChangeInProgress();
       
    48     		}
       
    49     		
       
    50     	/** The index of currently selected item.
       
    51     	 * This function delegates the question to BTUIDevicesContainer.
       
    52     	 * @return the index, or KErrNotFound in the list is empty 
       
    53     	 * or if iContainer is not yet initialized;
       
    54     	 */	
       
    55     	TInt CurrentItemIndex()
       
    56     	{
       
    57     		if(iContainer)
       
    58     			return iContainer->CurrentItemIndex();
       
    59     		else
       
    60     			return KErrNotFound;	
       
    61     	}
       
    62     protected:    
       
    63         CBTUiDeviceContainer* 	iContainer;
       
    64         CBTDevModel* 		  	iModel;
       
    65         TBool					iCoverDisplayEnabled;
       
    66         MBtuiPluginViewActivationObserver*  iActivationObserver;
       
    67     };
       
    68 
       
    69 #endif
       
    70 
       
    71