localconnectivityservice/generichid/inc/hiddriveritem.h
author hgs
Fri, 15 Oct 2010 15:05:57 +0800
changeset 54 4dc88a4ac6f4
parent 29 3ae5cb0b4c02
permissions -rw-r--r--
201041_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     1
/*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     2
* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     3
* All rights reserved.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     8
*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
     9
* Initial Contributors:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    11
*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    12
* Contributors:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    13
*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    14
* Description:  Declares driver list itemapplication class.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    15
*
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    16
*/
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    17
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    18
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    19
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    20
#ifndef C_DRIVERLISTITEM_H
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    21
#define C_DRIVERLISTITEM_H
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    22
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    23
#include "hidreportroot.h"
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    24
#include "hidinterfaces.h"
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    25
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    26
/**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    27
 *  Container class so we can maintain a list of driver instances
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    28
 *
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    29
 *  @lib generichid.lib
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    30
 *  @since S60 v5.0
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    31
 */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    32
class CDriverListItem : public CBase
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    33
    {
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    34
    // Give access to the TSglQueLink offset:
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    35
    friend class CGenericHid;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    36
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    37
public :
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    38
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    39
    explicit CDriverListItem(TInt aConnectionId);
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    40
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    41
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    42
    * Destructor.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    43
    */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    44
    virtual ~CDriverListItem();
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    45
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    46
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    47
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    48
     * Set driver instance
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    49
     *
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    50
     * @since S60 v5.0
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    51
     * @param aDriver Driver instance
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    52
     * @return None
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    53
     */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    54
    void SetDriver(CHidDriver* aDriver);
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    55
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    56
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    57
     * Return connection ID
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    58
     *
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    59
     * @since S60 v5.0
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    60
     * @return Connection id
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    61
     */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    62
    TInt ConnectionId() const;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    63
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    64
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    65
     * Return driver instance
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    66
     *
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    67
     * @since S60 v5.0
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    68
     * @return driver instance
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    69
     */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    70
    CHidDriver* Driver() const;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    71
        
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    72
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    73
private :
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    74
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    75
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    76
     * Queue link
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    77
     */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    78
    TSglQueLink iSlink;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    79
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    80
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    81
     * The transport-layer ID for the connection
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    82
     */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    83
    TInt iConnectionId;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    84
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    85
    /**
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    86
     * The device driver
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    87
     * Own.
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    88
     */
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    89
    CHidDriver* iDriver;
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    90
    
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    91
    };
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    92
#endif
3ae5cb0b4c02 201025_07
hgs
parents:
diff changeset
    93