javaextensions/satsa/apdu/src.s60/cstspinapduresp.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 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 #ifndef CSTSPINAPDURESP_H
       
    20 #define CSTSPINAPDURESP_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "cstsrespapdu.h"
       
    24 
       
    25 namespace java
       
    26 {
       
    27 namespace satsa
       
    28 {
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32  *  Detailed response APDU class for PIN related command APDUs
       
    33  *
       
    34  *  @since 3.0
       
    35  */
       
    36 NONSHARABLE_CLASS(CSTSPinApduResp): public CSTSRespApdu
       
    37 {
       
    38 
       
    39 public: // Constructors and destructor
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      */
       
    43     static CSTSPinApduResp* NewLC(
       
    44         TInt aMaxLength = 2,//maximum length is minimum at 2
       
    45         CSTSApdu::TSTSApduStandard aStandard = CSTSApdu::ESTSUICC);
       
    46 
       
    47     static CSTSPinApduResp* NewL(
       
    48         TInt aMaxLength = 2,//maximum length is minimum at 2
       
    49         CSTSApdu::TSTSApduStandard aStandard = CSTSApdu::ESTSUICC);
       
    50 
       
    51     /**
       
    52      * Destructor.
       
    53      */
       
    54     virtual ~CSTSPinApduResp();
       
    55 
       
    56 public: // New functions
       
    57 
       
    58     /**
       
    59      * Checks from response bytes, is PIN blocked or not
       
    60      * @since 3.0
       
    61      * @return ETrue, if PIN is blocked. Otherwise EFalse.
       
    62      */
       
    63     TBool IsBlocked();
       
    64 
       
    65     /**
       
    66      * Gets retries left counter value from response apdu.
       
    67      * @since 3.0
       
    68      * @return Retries left counter value
       
    69      */
       
    70     TInt RetriesLeft() const;
       
    71 
       
    72 private: // New functions
       
    73 
       
    74     /**
       
    75      * C++ default constructor.
       
    76      */
       
    77     CSTSPinApduResp();
       
    78 
       
    79     /**
       
    80      * Gets retries left counter value from response apdu.
       
    81      * @since 3.0
       
    82      * @param aSW1 SW1 value of response bytes
       
    83      * @param aSW2 SW2 value of response bytes
       
    84      * @return Retries left counter value
       
    85      */
       
    86     TInt CountRetriesLeft(TUint8 aSW1, TUint8 aSW2) const;
       
    87 
       
    88 };
       
    89 
       
    90 } // namespace satsa
       
    91 } // namespace java
       
    92 #endif // CSTSPINAPDURESP_H
       
    93 // End of File