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

ctcommand.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 $RCSfile: ctcommand.h,v $ 00003 ------------------- 00004 cvs : $Id: ctcommand.h,v 1.3 2003/01/10 20:02:11 aquamaniac Exp $ 00005 begin : Thu May 30 2002 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 00031 */ 00032 00033 00034 #ifndef CTCOMMAND_H 00035 #define CTCOMMAND_H 00036 00037 class CTCommand; 00038 00039 00040 #include <string> 00041 using namespace std; 00042 00043 00050 class CHIPCARD_API CTCommand { 00051 private: 00052 unsigned char _cla; 00053 unsigned char _ins; 00054 unsigned char _p1; 00055 unsigned char _p2; 00056 string _data; 00057 unsigned short _lr; 00058 unsigned char _sw1; 00059 unsigned char _sw2; 00060 00061 00062 public: 00068 unsigned char cla() const { return _cla;}; 00069 void setCla(unsigned char c) { _cla=c;}; 00070 00074 unsigned char ins() const { return _ins;}; 00075 void setIns(unsigned char c) { _ins=c;}; 00076 00080 unsigned char p1() const { return _p1;}; 00081 void setP1(unsigned char c) { _p1=c;}; 00082 00086 unsigned char p2() const { return _p2;}; 00087 void setP2(unsigned char c) { _p2=c;}; 00088 00095 const string &data() const { return _data;}; 00096 void setData(const string &s) { _data=s;}; 00097 void setData(const char *p, unsigned int s) { _data.assign(p,s);}; 00098 void setData(char c) { _data=c;}; 00099 void setData(unsigned char c) { _data=(char)c;}; 00100 void addData(const string &s) { _data+=s;}; 00101 void addData(char c) { _data+=c;}; 00102 void addData(unsigned char c) { _data+=(char)c;}; 00103 00114 unsigned short lr() const { return _lr;}; 00115 void setLr(unsigned short s) { _lr=s;}; 00116 00122 unsigned char sw1() const { return _sw1;}; 00123 void setSw1(unsigned char c) { _sw1=c;}; 00124 00131 unsigned char sw2() const { return _sw2;}; 00132 void setSw2(unsigned char c) { _sw2=c;}; 00133 00134 CTCommand(); 00135 ~CTCommand(); 00136 00140 string toString(); 00141 00142 }; 00143 00144 00145 00146 00147 #endif 00148 00149

Generated on Wed Jul 28 14:56:49 2004 for libchipcard by doxygen 1.3.7