localconnectivityservice/generichid/src/hiddriveritem.cpp
branchRCL_3
changeset 39 4096754ee773
parent 38 3dcb815346df
child 40 52a167391590
equal deleted inserted replaced
38:3dcb815346df 39:4096754ee773
     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:  Driver list item implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <e32base.h>
       
    21 #include <e32uid.h>
       
    22 
       
    23 #include "hiddriveritem.h"
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // Constructor
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 CDriverListItem::CDriverListItem(TInt aConnectionId)
       
    32     : iConnectionId(aConnectionId)
       
    33     {
       
    34     }
       
    35 // ---------------------------------------------------------------------------
       
    36 // Destructor
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 CDriverListItem::~CDriverListItem()
       
    40     {
       
    41     delete iDriver;    
       
    42     }
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 // ConnectionId()
       
    46 // ---------------------------------------------------------------------------
       
    47 //
       
    48 TInt CDriverListItem::ConnectionId() const
       
    49     {
       
    50     return iConnectionId;
       
    51     }
       
    52 
       
    53 // ---------------------------------------------------------------------------
       
    54 // Driver()
       
    55 // ---------------------------------------------------------------------------
       
    56 //
       
    57 CHidDriver* CDriverListItem::Driver() const
       
    58     {
       
    59     return iDriver;
       
    60     }
       
    61 
       
    62 // ---------------------------------------------------------------------------
       
    63 // SetDriver()
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 void CDriverListItem::SetDriver(CHidDriver* aDriver)
       
    67     {
       
    68     delete iDriver;
       
    69     iDriver = aDriver;
       
    70     }
       
    71