Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

fs.h

Go to the documentation of this file.
00001 /*
00002     Simple Operating System for Smartcard Education
00003     Copyright (C) 2002  Matthias Bruestle <m@mbsks.franken.de>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 
00052 #ifndef SOSSE_FS_H
00053 #define SOSSE_FS_H
00054 
00055 #include <types.h>
00056 #include <fstream.h>
00057 
00064 typedef struct s_fpath {
00065     iu16 df;    
00066     iu16 ef;    
00067 } S_FPATH;
00068 
00072 typedef struct s_finfo {
00073     iu16 size;  
00074     iu16 fid;       
00075     iu8 type;       
00076     iu8 ac[1];  
00077 #if CONF_WITH_RECORD_FILES==1
00078     iu8 rnum;   
00079     iu8 rsize;  
00080 #endif
00081 } S_FINFO;
00082 
00084 #define FS_TYPE_DF  0x38
00085 
00086 #define FS_TYPE_EF  0x00
00087 
00089 #define FS_TYPE_EF_TRANSP   0x00
00090 
00091 #define FS_TYPE_EF_FIXED    0x01
00092 
00094 #define FS_HEADER_SIZE  sizeof(S_FINFO)
00095 
00102 extern S_FPATH selected;
00103 
00112 bool fs_init( void );
00128 bool fs_seek( iu16 fid, S_FSTREAM *fs, S_FINFO *fi, iu8 type );
00137 bool fs_seekEnd( S_FSTREAM *fs );
00148 bool fs_getData( S_FPATH *fp, S_FSTREAM *fs, S_FINFO *fi );
00164 bool fs_getFPath( iu16 fid, S_FPATH *fp, S_FSTREAM *fs, S_FINFO *fi );
00176 bool fs_delete( iu16 fid );
00189 bool fs_create( S_FINFO *fi );
00190 
00191 #endif /* SOSSE_FS_H */
00192 

Copyright 2002 by Matthias Bruestle. This is licensed under the GNU General Public License.