usbmgmt/usbmgr/device/classdrivers/ncm/classimplementation/ncmpktdrv/pktdrv/inc/ncmcoexistbearerwatcher.h
branchRCL_3
changeset 16 012cc2ee6408
parent 15 f92a4f87e424
equal deleted inserted replaced
15:f92a4f87e424 16:012cc2ee6408
     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 /**
       
    19 @file
       
    20 @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef NCMCOEXISTBEARERWATCHER_H
       
    24 #define NCMCOEXISTBEARERWATCHER_H
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <e32property.h>
       
    28 
       
    29 #include "ncmpktdrvcommon.h"
       
    30 
       
    31 
       
    32 /**
       
    33 The IPBearerCoexistence P&S key watcher.
       
    34 */
       
    35 NONSHARABLE_CLASS(CNcmCoexistBearerWatcher) : public CActive
       
    36     {
       
    37 public:
       
    38     static CNcmCoexistBearerWatcher* NewL();
       
    39     ~CNcmCoexistBearerWatcher();
       
    40 
       
    41     /**
       
    42     Set the IP Over USB active if none is actived, or wait
       
    43     @param[in]   aStatus, asychronous request status.
       
    44     @return      KErrCompletion, successfully active IP Over USB.
       
    45                  KErrNone, asychronous call, the result will be returned by aStatus later.
       
    46                  other, system-wide error code.
       
    47     */
       
    48     TInt SetIpOverUsbActive(TRequestStatus& aStatus);
       
    49     /** Deactive IP Over USB */
       
    50     TInt SetIpOverUsbDeactive();
       
    51     /** Check whether IP Over USB Bearer is actived or not. */
       
    52     inline TBool IsIpOverUsbActived() const;
       
    53 
       
    54 private:
       
    55     //From CActive
       
    56     void RunL();
       
    57     void DoCancel();
       
    58 
       
    59     CNcmCoexistBearerWatcher();
       
    60     void ConstructL();
       
    61     TInt DoActive();
       
    62 
       
    63 private:
       
    64     enum TIPBearerCoexistenceStatus
       
    65         {
       
    66         EIPBearerNoneActive  = 0,
       
    67         EIPBearerIPOverUSB   = 1,
       
    68         EIPBearerBTPan       = 2
       
    69         };
       
    70 
       
    71 private:
       
    72     RProperty                   iProperty;
       
    73     TRequestStatus*             iReportStatus;
       
    74     TIPBearerCoexistenceStatus  iBearerState;
       
    75     };
       
    76 
       
    77 // Inline functions
       
    78 #include "ncmcoexistbearerwatcher.inl"
       
    79 
       
    80 #endif /* NCMCOEXISTBEARERWATCHER_H */