usbmgmt/usbmgr/device/classdrivers/ncm/inc/ncminternalsrv.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  @internalTechnology
       
    21 */
       
    22 
       
    23 #ifndef NCMINTERNALSRV_H
       
    24 #define NCMINTERNALSRV_H
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 /**
       
    29 Client-side interface of the NCM internal server for the communication between the NCM Class Controller and the Packet Driver.
       
    30 */
       
    31 NONSHARABLE_CLASS(RNcmInternalSrv) : public RSessionBase
       
    32     {
       
    33 public:
       
    34     IMPORT_C RNcmInternalSrv();
       
    35     IMPORT_C ~RNcmInternalSrv();
       
    36 
       
    37 public:
       
    38     /**
       
    39     Connect the handle to the server.
       
    40     Must be called before all other methods (except Version and Close).
       
    41     @return Symbian error code
       
    42     */
       
    43     IMPORT_C TInt Connect();
       
    44     /**
       
    45     Getter for the version of the server.
       
    46     @return Version of the server
       
    47     */
       
    48     IMPORT_C TVersion Version() const;
       
    49 
       
    50 public:
       
    51     /**
       
    52      Transfer the Ldd's handles from NCM Class Controller to the Packet Driver.
       
    53      @param[in]   aCommHandle, the Communication Interface handle.
       
    54      @param[in]   aCommChunk, the Communication Interface's RChunk handle.
       
    55      @param[in]   aDataHandle, the Data Interface handle.
       
    56      @param[in]   aDataChunk, the Data Interface's RChunk handle.
       
    57      @return      KErrNone, successfully transferred handle to Packet Driver.
       
    58                   others, system-wide error code.
       
    59     */
       
    60     IMPORT_C TInt TransferHandle(RHandleBase& aCommHandle, RHandleBase& aCommChunk, RHandleBase& aDataHandle, RHandleBase& aDataChunk);
       
    61     /**
       
    62     Set this RConnection's IapId to Packet Driver.
       
    63     @param[in]    aIapId, the RConnection's, which loads the Packet Driver, IapId.
       
    64     @return       KErrNone, successfully set IapId.
       
    65                   others, system-wide error code.
       
    66     */
       
    67     IMPORT_C TInt SetIapId(TUint aIapId);
       
    68     /**
       
    69     Set the DHCP Provision result to Packet Driver.
       
    70     @param[in]    aResult, the result of DHCP Provision done by Class Controller.
       
    71     @return       KErrNone, successfully set the result to Packet Driver.
       
    72                   others, system-wide error code.
       
    73     */
       
    74     IMPORT_C TInt SetDhcpResult(TInt aResult);
       
    75     /**
       
    76     Register the notification of doing DHCP Provision.
       
    77     @param[in,out] aStatus, the request status to be registered.
       
    78     */
       
    79     IMPORT_C void DhcpProvisionNotify(TRequestStatus& aStatus);
       
    80     /**
       
    81     Cancel the registration of DHCP Provision.
       
    82     */
       
    83     IMPORT_C void DhcpProvisionNotifyCancel();
       
    84     /**
       
    85     Transfer the buffer size of in endpoint of data interface.
       
    86     */
       
    87     IMPORT_C TInt TransferBufferSize(TUint aSize);
       
    88 
       
    89 private:
       
    90     };
       
    91 
       
    92 #endif // NCMINTERNALSRV_H