usbmgmt/usbmgr/device/classdrivers/ncm/inc/ncmcommon.h
author hgs
Wed, 07 Jul 2010 14:16:40 +0800
changeset 28 f1fd07aa74c9
permissions -rw-r--r--
201025_08
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     1
/*
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     3
* All rights reserved.
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     8
*
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
     9
* Initial Contributors:
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    11
*
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    12
* Contributors:
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    13
*
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    14
* Description:
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    15
*
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    16
*/
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    17
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    18
/**
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    19
@file
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    20
@internalTechnology
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    21
 */
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    22
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    23
#ifndef NCMCOMMON_H
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    24
#define NCMCOMMON_H
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    25
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    26
#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    27
#error "NCM needs the 3-plane comms environment!"
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    28
#endif
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    29
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    30
#include <usb/usbncm.h>
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    31
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    32
#ifndef __OVER_DUMMYUSBSCLDD__
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    33
#include <comms-infras/nifprvar.h>
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    34
#include <d32ethernet.h> //FOR KEthernetAddressLength
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    35
#else
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    36
#include <usb/testncm/ethinter.h>
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    37
#endif
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    38
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    39
//property's category UID.
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    40
//This Property is used to indicate the Packet Driver that it's started by NCM Class Controller.
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    41
#ifdef OVERDUMMY_NCMCC
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    42
static const TUid KUsbmanSvrUid = {0x2002EA88}; //
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    43
#else
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    44
static const TUid KUsbmanSvrUid = {0x101fe1db};
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    45
#endif // OVERDUMMY_NCMCC
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    46
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    47
//property's sub-key.
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    48
static const TUint KKeyNcmSharedState = 0x2002C340;
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    49
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    50
//Platform Security for the property.
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    51
static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    52
static _LIT_SECURITY_POLICY_C1(KNetworkControlPolicy, ECapabilityNetworkControl);
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    53
static _LIT_SECURITY_POLICY_C1(KCommDDPolicy, ECapabilityCommDD);
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    54
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    55
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    56
/**
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    57
NCM network device MAC address.
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    58
*/
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    59
typedef TBuf8<KEthernetAddressLength> TNcmMacAddress;
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    60
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    61
/**
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    62
NCM SharedState between NCM Class Controller and Packet Driver.
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    63
*/
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    64
enum TNcmSharedState
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    65
    {
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    66
    ENcmStateIntial = 0,
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    67
    ENcmStartRequested = 1, // NCM class controller is request NCM packet driver
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    68
    ENcmStateEndMark
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    69
    };
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    70
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    71
/**
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    72
 Packet driver progress to Comms
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    73
 */
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    74
enum TNcmNifProgress
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    75
    {
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    76
    ENcmPktDrvFatalError    = KMinNifProgress   // NCM packet driver fatal error
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    77
    };
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    78
f1fd07aa74c9 201025_08
hgs
parents:
diff changeset
    79
#endif // NCMCOMMON_H