javaextensions/satsa/apdu/src.s60/cstsefacifile.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 CSTSEFACIFILE_H
       
    20 #define CSTSEFACIFILE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "cstsfile.h"
       
    24 
       
    25 namespace java
       
    26 {
       
    27 namespace satsa
       
    28 {
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CSTSAcie;
       
    32 class CSTSFileDataManager;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36  *  ACIF card file class for handling file selection, reading and data
       
    37  *  decoding.
       
    38  *
       
    39  *  @since 3.0
       
    40  */
       
    41 NONSHARABLE_CLASS(CSTSEFACIFile): public CSTSFile
       
    42 {
       
    43 public: // Constructors and destructor
       
    44 
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      */
       
    48     static CSTSEFACIFile* NewLC(CSTSFileDataManager* aFileDataManager);
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     virtual ~CSTSEFACIFile();
       
    54 
       
    55 public: // New functions
       
    56 
       
    57     /**
       
    58      * Sets records array. This method MUST be called
       
    59      * before read method is used.
       
    60      * @since 3.0
       
    61      * @param aRecordsArr Pointer to array where records will be added.
       
    62      */
       
    63     void SetArray(CArrayPtr< CSTSAcie>* aRecordsArr);
       
    64 
       
    65     /**
       
    66      * Setter for AID which will be used to find correct record
       
    67      * This method MUST be called before derived ReadL method is called
       
    68      * @since 3.0
       
    69      * @param aAID Application Identifier of the card application
       
    70      */
       
    71     void SetAIDL(const TDesC8& aAID);
       
    72 
       
    73 protected: //New fuctions
       
    74 
       
    75     /**
       
    76      * C++ default constructor.
       
    77      */
       
    78     CSTSEFACIFile(CSTSFileDataManager* aFileDataManager);
       
    79 
       
    80     /**
       
    81      * Protected construction to allow derivation
       
    82      */
       
    83     void ConstructL();
       
    84 
       
    85 protected: // Functions from base classes
       
    86 
       
    87     TBool DecodeAndAppendRowL(const TDesC8& aRowData,
       
    88                               TInt aMaxValidDataAmount);
       
    89 
       
    90     void ResetData();
       
    91 
       
    92     const TDesC8& RetrieveContentL();
       
    93 
       
    94 private: // Data
       
    95 
       
    96     //array of Acie type of records
       
    97     CArrayPtr< CSTSAcie>* iRecordsArr; //not owned
       
    98 
       
    99     //card application aid
       
   100     HBufC8* iAID; //owned
       
   101 };
       
   102 
       
   103 } // namespace satsa
       
   104 } // namespace java
       
   105 #endif // CSTSEFACIFILE_H
       
   106 // End of File
       
   107