localconnectivityservice/generichid/inc/hidconnectioninfo.h
branchRCL_3
changeset 19 0aa8cc770c8a
equal deleted inserted replaced
18:453dfc402455 19:0aa8cc770c8a
       
     1 /*
       
     2 * Copyright (c) 2008-2008 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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CONNECTIONINFO_H_
       
    20 #define C_CONNECTIONINFO_H_
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 class CReportRoot;
       
    26 class CHidDriver;
       
    27 
       
    28 /**
       
    29  *  CConnectionInfo
       
    30  *  Connection information
       
    31  * 
       
    32  *
       
    33  *  @lib generichid.lib
       
    34  *  @since S60 v5.0
       
    35  */
       
    36 NONSHARABLE_CLASS ( CConnectionInfo ) : public CBase
       
    37     {
       
    38  
       
    39 public:
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      * @param aConnectionID Connection identifier
       
    43      * @param aReportRoot Connection ReportRoot
       
    44      */
       
    45     static CConnectionInfo* NewL(TInt aConnectionID, CReportRoot* aReportRoot);    
       
    46     static CConnectionInfo* NewLC(TInt aConnectionID, CReportRoot* aReportRoot);
       
    47     
       
    48     /**
       
    49     * Destructor.
       
    50     */
       
    51     virtual ~CConnectionInfo();
       
    52     
       
    53 public:
       
    54     /**
       
    55      * Get Connection id
       
    56      * 
       
    57      * @since S60 v5.0     
       
    58      * @return connection id
       
    59      */
       
    60     TInt            ConnectionID();
       
    61     
       
    62     /**
       
    63      * Get report id
       
    64      * 
       
    65      * @since S60 v5.0      
       
    66      * @return report id 
       
    67      */
       
    68     CReportRoot*    ReportRoot();
       
    69     
       
    70     /**
       
    71      * Set last command handler
       
    72      *
       
    73      * @since S60 v5.0
       
    74      * @param aHidDriverItem hiddriver item     
       
    75      * @return None
       
    76      */
       
    77     void            SetLastCommandHandler(CHidDriver* aHidDriverItem);
       
    78     
       
    79     /**
       
    80      * Set last command handler
       
    81      *
       
    82      * @since S60 v5.0
       
    83      * @param aHidDriverItem hiddriver item     
       
    84      * @return None
       
    85      */
       
    86     CHidDriver*     ReturnLastCommandHandler();
       
    87     
       
    88 private:
       
    89     CConnectionInfo(TInt aConnectionID, CReportRoot* aReportRoot);
       
    90 
       
    91 private:
       
    92 
       
    93     /**
       
    94      * Connection id
       
    95      */
       
    96     TInt  iConnectionID;
       
    97     
       
    98     /**
       
    99      * Connection id
       
   100      * Own.
       
   101      */ 
       
   102     CReportRoot*    iReportRoot;
       
   103     
       
   104     /**
       
   105      * Pointer to last driver which handled last command
       
   106      * Not own.
       
   107      */
       
   108     CHidDriver*     iLastCmdDriver;
       
   109     };
       
   110         
       
   111 #endif /* C_CONNECTIONINFO_H_ */