usbengines/usbotgwatcher/inc/cusbservicecontrol.h
branchRCL_3
changeset 20 a15c582fbf97
parent 3 47c263f7e521
child 21 ff9df6630274
equal deleted inserted replaced
13:7068aba64af5 20:a15c582fbf97
     1 /*
     1 /*
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     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:  Implementation 
       
    15  *
     8  *
    16 */
     9  * Initial Contributors:
    17 
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  Implementation 
       
    15  *
       
    16  */
    18 
    17 
    19 #ifndef C_USBSERVICECONTROL_H
    18 #ifndef C_USBSERVICECONTROL_H
    20 #define C_USBSERVICECONTROL_H
    19 #define C_USBSERVICECONTROL_H
    21 
    20 
    22 #include <e32base.h>
    21 #include <e32base.h>
    48 NONSHARABLE_CLASS( CUsbServiceControl ) : public CActive
    47 NONSHARABLE_CLASS( CUsbServiceControl ) : public CActive
    49     {
    48     {
    50 
    49 
    51 public:
    50 public:
    52 
    51 
       
    52     enum TUsbServiceRequest
       
    53         {
       
    54         ERequestUndefined,
       
    55         EStartUsbService,
       
    56         EStopUsbService
       
    57         };
       
    58 
    53     /**
    59     /**
    54      * Two-phased constructor.
    60      * Two-phased constructor.
    55      * @param aObserver Observer
    61      * @param aObserver Observer
    56      * @param aUsb RUsb API
    62      * @param aUsb RUsb API
    57      */
    63      */
    58     static CUsbServiceControl* NewL(MUsbServiceControlObserver* aObserver,
    64     static CUsbServiceControl* NewL(MUsbServiceControlObserver& aObserver,
    59             RUsb& aUsb);
    65             RUsb& aUsb);
    60 
    66 
    61     /**
    67     /**
    62      * Destructor.
    68      * Destructor.
    63      */
    69      */
   105     /**
   111     /**
   106      * Default constructor
   112      * Default constructor
   107      * @param aObserver receives call back when service started or stopped
   113      * @param aObserver receives call back when service started or stopped
   108      * @param aUsb usbman API
   114      * @param aUsb usbman API
   109      */
   115      */
   110     CUsbServiceControl(MUsbServiceControlObserver* aObserver, RUsb& aUsb);
   116     CUsbServiceControl(MUsbServiceControlObserver& aObserver, RUsb& aUsb);
   111 
   117 
   112     /**
   118     /**
   113      * 2nd phase construction
   119      * 2nd phase construction
   114      */
   120      */
   115     void ConstructL();
   121     void ConstructL();
   118 
   124 
   119     /**
   125     /**
   120      * Observer
   126      * Observer
   121      * not own
   127      * not own
   122      */
   128      */
   123     MUsbServiceControlObserver* iObserver;
   129     MUsbServiceControlObserver& iObserver;
   124 
   130 
   125     /**
   131     /**
   126      * RUsb API
   132      * RUsb API
   127      */
   133      */
   128     RUsb& iUsb;
   134     RUsb& iUsb;