usbmgmt/usbmgr/device/classdrivers/ncm/classcontroller/inc/ncmconnectionmanagerhelper.h
branchRCL_3
changeset 15 f92a4f87e424
equal deleted inserted replaced
14:d3e8e7d462dd 15:f92a4f87e424
       
     1 /*
       
     2 * Copyright (c) 2010 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 /** @file
       
    19 @internalComponent
       
    20 */
       
    21 
       
    22 #ifndef NCMCONNECTIONMANAGERHELPER_H
       
    23 #define NCMCONNECTIONMANAGERHELPER_H
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 #ifdef OVERDUMMY_NCMCC
       
    28 #include <usb/testncmcc/dummy_essock.h>
       
    29 #include <usb/testncmcc/dummy_insock.h>
       
    30 #else
       
    31 #include <es_sock.h>
       
    32 #include <in_sock.h> 
       
    33 #include <commdbconnpref.h>
       
    34 #endif // OVERDUMMY_NCMCC
       
    35 
       
    36 class MNcmConnectionObserver;
       
    37 
       
    38 /**
       
    39  * CNcmConnectionManHelper is the handler for NCM connection.
       
    40  * 1 Start a NCM connection
       
    41  * 2 Cancel starting attempt
       
    42  * 3 Stop a NCM connection 
       
    43  */
       
    44 NONSHARABLE_CLASS(CNcmConnectionManHelper) : public CActive
       
    45 	{
       
    46 public:
       
    47     /** 
       
    48      * Constructor
       
    49      * @param[in]  aObserver, IAP connection observer
       
    50      * @param[in]  aConnection, the NCM connection
       
    51      */ 
       
    52     CNcmConnectionManHelper(MNcmConnectionObserver& aObserver, RConnection& aConnection);
       
    53 
       
    54 	~CNcmConnectionManHelper();
       
    55 	void Start(TConnPref& aPref);
       
    56 	void Stop();
       
    57 	
       
    58 private:
       
    59 	
       
    60 	// From CActive
       
    61 	void RunL();
       
    62 	void DoCancel();
       
    63 
       
    64 private:
       
    65 	MNcmConnectionObserver&	iObserver; // IAP connection observer
       
    66 	RConnection&			iConnection; // The NCM connection	
       
    67 	};
       
    68 
       
    69 #endif // NCMCONNECTIONMANAGERHELPER_H
       
    70