wim/SwimReader/inc/SwimApduReqHeader.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:  SWIM APDU Request header
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SWIMAPDUREQHEADER_H
       
    20 #define SWIMAPDUREQHEADER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "SwimReaderConsts.h"
       
    24 
       
    25 
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 *  Services for creating Request APDU header
       
    30 *  Used by class CSwimReader
       
    31 *
       
    32 *  @lib SwimReader.lib
       
    33 *  @since Series60 2.1
       
    34 */
       
    35 class TSwimApduReqHeader  
       
    36     {
       
    37     
       
    38     public:  // Constructors and destructor
       
    39 
       
    40         /**
       
    41         * C++ default constructor.
       
    42         */
       
    43         TSwimApduReqHeader();
       
    44 
       
    45     public: // New functions
       
    46 
       
    47         /**
       
    48         * Return APDU data
       
    49         * @return Data
       
    50         */
       
    51         TDes8* Data();
       
    52 
       
    53         /**
       
    54         * Set Application type byte
       
    55         * @param aApp Application type
       
    56         * @return void
       
    57         */
       
    58         void SetAppType( TUint8 aApp );
       
    59         
       
    60         /**
       
    61         * Set CardReader byte
       
    62         * @param aCardReader Card reader byte
       
    63         * @return void
       
    64         */
       
    65         void SetCardReader( TUint8 aCardReader );
       
    66         
       
    67         /**
       
    68         * Set header
       
    69         * @param aServiceType Service type
       
    70         * @param aCardReader Card reader
       
    71         * @param aAppType Applicatin type
       
    72         * @param aPaddingByte Padding type
       
    73         * @return void
       
    74         */
       
    75         void SetHeader( TUint8 aServiceType = KSendApdu,
       
    76                         TUint8 aCardReader = KNoPreferredReader,
       
    77                         TUint8 aAppType = KAPDUAppTypeWIM,
       
    78                         TUint8 aPaddingByte = 0 );
       
    79 
       
    80         /**
       
    81         * operator=
       
    82         * @param aData
       
    83         * @return void
       
    84         */
       
    85         void operator=( const TDesC8& aData );
       
    86         
       
    87         /**
       
    88         * Return Padding Byte
       
    89         * @return Padding Byte
       
    90         */
       
    91         TUint8 PaddingByte();
       
    92         
       
    93         /**
       
    94         * Return ServiceType byte
       
    95         * @return Service Type
       
    96         */
       
    97         TUint8 ServiceType();
       
    98         
       
    99         /**
       
   100         * Set PaddingByte
       
   101         * @param aPaddingByte Padding type
       
   102         * @return void
       
   103         */
       
   104         void SetPaddingByte( TUint8 aPaddingByte );
       
   105         
       
   106         /**
       
   107         * Set ServiceType
       
   108         * @param aServiceType Service type
       
   109         * @return void
       
   110         */
       
   111         void SetServiceType( TUint8 aServiceType );
       
   112         
       
   113     private:  // Data
       
   114         // APDU data
       
   115         TBuf8<KMaxApduHeaderLen> iData;
       
   116     };
       
   117 
       
   118 #endif      // SWIMAPDUREQHEADER_H
       
   119 
       
   120 // End of File