bluetoothengine/btui/devmodel/src/btdevice.cpp
branchRCL_3
changeset 56 9386f31cc85b
parent 0 f63038272f30
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
       
     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:  This is used by BTUI to contain the information on a displaid device.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "btdevmodel.h"
       
    19 // ---------------------------------------------------------------------
       
    20 // Default Constructor
       
    21 // ---------------------------------------------------------------------
       
    22 EXPORT_C TBTDevice::TBTDevice()
       
    23     {
       
    24     iType = EDeviceDefault;
       
    25     iName = KNullDesC;
       
    26     iFriendlyName = KNullDesC;
       
    27     iStatus = 0;
       
    28     iOperation = EOpNone;
       
    29     iAddr = KNullAddress;
       
    30     iIndex = KErrNotFound;    
       
    31     iDeviceClass=TBTDeviceClass(0);
       
    32     iLinkKeyType = ELinkKeyCombination;
       
    33     iNameEntry() = TNameRecord();
       
    34     }
       
    35 // ---------------------------------------------------------------------
       
    36 // Copy Constructor
       
    37 // ---------------------------------------------------------------------    
       
    38 EXPORT_C TBTDevice::TBTDevice(const TBTDevice& aDevice) 
       
    39     {
       
    40     iType = aDevice.iType;
       
    41     iName = aDevice.iName;
       
    42     iFriendlyName = aDevice.iFriendlyName;
       
    43     iStatus = aDevice.iStatus;
       
    44     iOperation = aDevice.iOperation;
       
    45     iAddr = aDevice.iAddr;
       
    46     iIndex = aDevice.iIndex;
       
    47     iDeviceClass= aDevice.iDeviceClass;
       
    48     iLinkKeyType = aDevice.iLinkKeyType;
       
    49     iNameEntry() = TNameRecord();
       
    50     }
       
    51 // ---------------------------------------------------------------------
       
    52 // operator=
       
    53 // ---------------------------------------------------------------------    
       
    54 EXPORT_C TBTDevice& TBTDevice::operator=(const TBTDevice& aDevice)
       
    55     {
       
    56     iType = aDevice.iType;
       
    57     iName = aDevice.iName;
       
    58     iFriendlyName = aDevice.iFriendlyName;
       
    59     iStatus = aDevice.iStatus;
       
    60     iOperation = aDevice.iOperation;
       
    61     iAddr = aDevice.iAddr;
       
    62     iIndex = aDevice.iIndex;
       
    63     iDeviceClass= aDevice.iDeviceClass;    
       
    64     iLinkKeyType = aDevice.iLinkKeyType;
       
    65     iNameEntry = aDevice.iNameEntry;
       
    66 	return *this;
       
    67     } 
       
    68 // End of File