wim/SwimReader/inc/SwimReaderConsts.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2003 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:  Constans for SwimReader
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SWIMREADERCONSTS_H
       
    20 #define SWIMREADERCONSTS_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 
       
    26 //  CONSTANTS
       
    27 
       
    28 /* APDUs */
       
    29 const TUint8 KSendApdu       = 79;
       
    30 const TUint8 KGetATR         = 80;
       
    31 const TUint8 KList           = 81;
       
    32 const TUint8 KAPDUAppTypeWIM = 1;
       
    33 
       
    34 const TUint8 KApduOK         = 0x3d;
       
    35 
       
    36 // Error byte values
       
    37 const TUint8 KApduTransmissionError = 0x3e;
       
    38 const TUint8 KApduCardMute          = 0x3f;
       
    39 const TUint8 KApduCardDisconnected  = 0x40;
       
    40 const TUint8 KApduError             = 0x41;
       
    41 const TUint8 KApduReaderNotValid    = 0x42;
       
    42 const TUint8 KApduFormatError       = 0x43;
       
    43 const TUint8 KApduTypeNotValid      = 0x44;
       
    44 
       
    45 const TUint8 KSimServNoservice      = 0xFA; 
       
    46 const TUint8 KSimServNotready       = 0xFB; 
       
    47 const TUint8 KSimServError          = 0xFC; 
       
    48 
       
    49 //
       
    50 // Check APDU list chapter to understand these.
       
    51 const TUint8 KMaxReaderAmount       = 8;
       
    52 const TUint8 KListAllReaders        = 0xff;
       
    53 
       
    54 //
       
    55 // Reader status bits.
       
    56 const TUint8 KIdentityMask          = 0x07;
       
    57 const TUint8 KCardReaderRemovable   = 0x08;//0x10;
       
    58 const TUint8 KCardReaderPresent     = 0x10;//0x08;
       
    59 const TUint8 KCardReaderID1Size     = 0x20;
       
    60 const TUint8 KCardPresent           = 0x40;//0x02;
       
    61 const TUint8 KCardPowered           = 0x80;//0x01;
       
    62 
       
    63 const TUint8 KMaxApduHeaderLen      = 16;
       
    64 
       
    65 const TUint8 KSendApduHeaderLen     = 4;
       
    66 const TUint8 KGetListHeaderLen      = 2;
       
    67 
       
    68 const TUint8 KSendApduRespHeaderLen = 14;
       
    69 const TUint8 KListRespHeaderLen     = 13;
       
    70 const TUint8 KGetAtrRespHeaderLen   = 16;
       
    71 
       
    72 const TUint8 KNoPreferredReader     = 254;
       
    73 
       
    74 //APDU request bytes
       
    75 const TInt KIndexServiceType = 0;
       
    76 const TInt KIndexCardReader  = 1;
       
    77 const TInt KIndexAppType     = 2;
       
    78 const TInt KIndexPaddingByte = 3;
       
    79 
       
    80 //APDU response bytes
       
    81 const TInt KIndexRespTransActionID = 8;
       
    82 const TInt KIndexRespMessageID     = 9;
       
    83 const TInt KIndexRespServiceType   = 10;
       
    84 const TInt KIndexRespStatus        = 11;
       
    85 const TInt KIndexRespPaddingByte   = 12;
       
    86 const TInt KIndexRespSDataLength   = 15;
       
    87 
       
    88 #endif      // SWIMREADERCONSTS_H
       
    89 
       
    90 // End of File