Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

ctprocessorcard.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: ctprocessorcard.h,v $
00003                              -------------------
00004     cvs         : $Id: ctprocessorcard.h,v 1.7 2003/04/24 01:43:30 aquamaniac Exp $
00005     begin       : Wed Aug 29 2001
00006     copyright   : (C) 2001 by Martin Preuss
00007     email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 /*
00029  Changes
00030  2002/06/03: Martin Preuss<martin@libchipcard.de>
00031  - added fallback mechanism to selectXX methods. They now first try to
00032    execute the command intended, and if that fails they call selectFile()
00033 
00034  */
00035 
00036 
00037 #ifndef CTPROCESSORCARD_H
00038 #define CTPROCESSORCARD_H
00039 
00040 class CTProcessorCard;
00041 
00042 
00043 #include <string>
00044 #include <chipcard/ctcard.h>
00045 #include <chipcard/cterror.h>
00046 
00047 
00055 class CHIPCARD_API CTProcessorCard : public CTCard {
00056 private:
00057   string _cmdSelectMF;
00058   string _cmdSelectParent;
00059   string _cmdSelectDF;
00060   string _cmdSelectEF;
00061   string _cmdSelectId;
00062   string _cmdReadRecord;
00063   string _cmdUpdateRecord;
00064 
00065   CTError _selectMF(string &fcp);
00066   CTError _selectDF(string &fcp, unsigned short fid);
00067   CTError _selectEF(string &fcp, unsigned short fid);
00068   CTError _selectById(string &fcp, string id);
00069 
00070 public:
00079   CTProcessorCard(const CTCard &c);
00080 
00081   virtual ~CTProcessorCard();
00083 
00102   virtual CTError reopenCard();
00104 
00115   virtual string cardType();
00116 
00125   virtual string cardTypes();
00127 
00148   CTError selectMF(string &fcp);
00149 
00161   CTError selectDF(string &fcp, unsigned short fid);
00162 
00174   CTError selectEF(string &fcp, unsigned short fid);
00175 
00186   CTError selectParent(string &fcp);
00187 
00199   CTError selectById(string &fcp, string id);
00200 
00211   CTError readRecord(string &data,
00212                      unsigned char num,
00213                      unsigned char size=0);
00214 
00224   CTError updateRecord(string &data,
00225                        unsigned char num);
00227 
00228 
00229 };
00230 
00231 
00232 
00233 
00234 
00235 
00236 
00237 #endif
00238 
00239 
00240 
00241 
00242 
00243 
00244 
00245 
00246 
00247 
00248 
00249 
00250 

Generated on Fri Dec 3 23:10:24 2004 for libchipcard by  doxygen 1.3.9.1