javaextensions/satsa/apdu/src.s60/cstsselectfile.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 CSTSSELECTFILE_H
       
    20 #define CSTSSELECTFILE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "cstscmdapdu.h"
       
    24 
       
    25 namespace java
       
    26 {
       
    27 namespace satsa
       
    28 {
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32  *  Detailed command APDU class for Select File apdu.
       
    33  *
       
    34  *  @since 3.0
       
    35  */
       
    36 NONSHARABLE_CLASS(CSTSSelectFile): public CSTSCmdApdu
       
    37 {
       
    38 public: // data types
       
    39     enum TSTSSelectFileApduType
       
    40     {
       
    41         ESTSAIDActivation,
       
    42         ESTSAIDTermination,
       
    43         ESTSSelectByFileId,
       
    44         ESTSSelectByPathFromMF,
       
    45         ESTSSelectByPathFromCurrentDF
       
    46     };
       
    47 
       
    48 public: // Constructors and destructor
       
    49     /**
       
    50      * Two-phased constructor.
       
    51      * @param aData File id or path depending on select file apdu type
       
    52      * @param aType Type of Select File apdu
       
    53      * @param aStandard Apdu standard
       
    54      */
       
    55     static CSTSSelectFile* NewLC(const TDesC8& aData,
       
    56                                  TSTSSelectFileApduType aType,
       
    57                                  CSTSApdu::TSTSApduStandard aStandard);
       
    58 
       
    59     static CSTSSelectFile* NewL(const TDesC8& aData,
       
    60                                 TSTSSelectFileApduType aType,
       
    61                                 CSTSApdu::TSTSApduStandard aStandard);
       
    62 
       
    63     /**
       
    64      * Destructor.
       
    65      */
       
    66     virtual ~CSTSSelectFile();
       
    67 
       
    68 public: // New functions
       
    69 
       
    70     /**
       
    71      * Sets type of select file apdu
       
    72      * @since 3.0
       
    73      */
       
    74     void SetApduType(TSTSSelectFileApduType aType);
       
    75 
       
    76 private: // New functions
       
    77 
       
    78     /**
       
    79      * C++ default constructor.
       
    80      */
       
    81     CSTSSelectFile();
       
    82 
       
    83     /**
       
    84      * By default Symbian 2nd phase constructor is private.
       
    85      */
       
    86     void ConstructL(const TDesC8& aData,
       
    87                     TSTSSelectFileApduType aType,
       
    88                     CSTSApdu::TSTSApduStandard aStandard);
       
    89 
       
    90     /**
       
    91      * Generates P1 and P2 values depending of Select File apdu type
       
    92      * @since 3.0
       
    93      * @param aP1 Reference to P1
       
    94      * @param aP2 Reference to P2
       
    95      * @param aType Type of Select File apdu
       
    96      */
       
    97     void GenerateP1P2(TUint8& aP1,
       
    98                       TUint8& aP2,
       
    99                       TSTSSelectFileApduType aType);
       
   100 
       
   101 private: // Data
       
   102 
       
   103     TSTSSelectFileApduType iType;
       
   104 
       
   105 };
       
   106 
       
   107 } // namespace satsa
       
   108 } // namespace java
       
   109 #endif // CSTSSELECTFILE_H
       
   110 // End of File