usbservices_plat/usb_personality_plugin_api/inc/tusbpersonalityparams.h
changeset 35 9d8b04ca6939
parent 0 1e05558e2206
equal deleted inserted replaced
34:7858bc6ead78 35:9d8b04ca6939
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Container class for USB personalities
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TUSBPERSONALITYPARAMS_H
       
    20 #define TUSBPERSONALITYPARAMS_H
       
    21 
       
    22 class RUsb;
       
    23 class CUsbPersonalityNotifier;
       
    24 
       
    25 /**
       
    26  *  Container class for USB personalities
       
    27  *
       
    28  *  Personality id, handle for Usb Manager and personality notifier
       
    29  *  is given with this class to USB personalities.
       
    30  *
       
    31  *  @lib euser.lib, usbman.lib
       
    32  *  @since S60 3.2
       
    33  */
       
    34 class TUsbPersonalityParams
       
    35     {
       
    36 public:    
       
    37     IMPORT_C TUsbPersonalityParams(RUsb& aUsbMan, CUsbPersonalityNotifier& aPersonalityNotifier);
       
    38     IMPORT_C ~TUsbPersonalityParams();
       
    39     
       
    40     /**
       
    41      * Method to get handle to USB Manager
       
    42      *
       
    43      * @since S60 3.2
       
    44      * @return Handle to USB Manager
       
    45      */
       
    46     IMPORT_C RUsb& UsbMan() const;
       
    47     
       
    48     /**
       
    49      * Method to get handle to personality notifier
       
    50      *
       
    51      * @since S60 3.2
       
    52      * @return Handle to personality notifier
       
    53      */    
       
    54     IMPORT_C CUsbPersonalityNotifier& PersonalityNotifier() const;
       
    55     
       
    56     /**
       
    57      * Set personality id.
       
    58      *
       
    59      * @since S60 3.2
       
    60      * @param Personality id
       
    61      */    
       
    62     IMPORT_C void SetPersonalityId(TInt aPersonalityId);
       
    63     
       
    64     /**
       
    65      * Method to get current personality id
       
    66      *
       
    67      * @since S60 3.2
       
    68      * @return Personality id
       
    69      */        
       
    70     IMPORT_C TInt PersonalityId() const;
       
    71     
       
    72 private:
       
    73     /**
       
    74      * Handle to USB Manager
       
    75      */
       
    76     RUsb& iUsbMan;
       
    77 
       
    78     /**
       
    79      * Handle to personality notifier
       
    80      */    
       
    81     CUsbPersonalityNotifier& iPersonalityNotifier;
       
    82 
       
    83     /**
       
    84      * Current personality id
       
    85      */    
       
    86     TInt iPersonalityId;
       
    87     };
       
    88 
       
    89 #endif