mtpdataproviders/mtppictbridgedp/pictbridgeengine/inc/dpsconnectnotifier.h
branchRCL_3
changeset 19 0aa8cc770c8a
equal deleted inserted replaced
18:453dfc402455 19:0aa8cc770c8a
       
     1 /*
       
     2 * Copyright (c) 2006, 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:  This class defines functions of the notification of the 
       
    15 *                PTP printer connction and disconnection. 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef DPSCONNECTNOTIFIER_H
       
    21 #define DPSCONNECTNOTIFIER_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <usbstates.h>
       
    25 
       
    26 class CDpsUsbNotifier;
       
    27 
       
    28 /**
       
    29 *   Class for monitoring usb cable connection/disconnection 
       
    30 */
       
    31 NONSHARABLE_CLASS(CDpsConnectNotifier) : public CActive
       
    32     {
       
    33     public:
       
    34         /**
       
    35         *   Two phase constructor
       
    36         *   @param aParent the pointer to UsbNotifier object
       
    37         *   @return a new created ConnectNotifier object
       
    38         */
       
    39         static CDpsConnectNotifier* NewL(CDpsUsbNotifier* aParent);
       
    40         
       
    41         /**
       
    42         *   Destructor
       
    43         */
       
    44         ~CDpsConnectNotifier();
       
    45         
       
    46         /**
       
    47         *   Called by UsbNotifier to subscribe connection notification
       
    48         */
       
    49         void ConnectNotify();
       
    50         
       
    51     private: // Functions derived from CActive.
       
    52 	    /**
       
    53 	    *   @see CActive
       
    54 	    */
       
    55     	void RunL();
       
    56     	
       
    57     	/**
       
    58     	*   @see CActive
       
    59     	*/
       
    60 	    void DoCancel();
       
    61 	    
       
    62 	    /**
       
    63 	    *   @see CActive
       
    64 	    */
       
    65 	    TInt RunError(TInt aError);
       
    66 	    
       
    67 	private:
       
    68 	    /**
       
    69 	    *   Second phase constructor
       
    70 	    */
       
    71 		void ConstructL();
       
    72 	    
       
    73 	    /**
       
    74 	    *   Default constructor
       
    75 	    */
       
    76 	    CDpsConnectNotifier(CDpsUsbNotifier* aParent);
       
    77 	    
       
    78 	private:
       
    79 	    // not owned by this class
       
    80 	    CDpsUsbNotifier* iNotifier;    
       
    81     };
       
    82     
       
    83 #endif