Back to index

lightning-sunbird  0.9+nobinonly
GUSIFSWrappers.h
Go to the documentation of this file.
00001 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
00002 // % Project  :      GUSI                        -      Grand Unified Socket Interface                    
00003 // % File            :      GUSIFSWrappers.nw    -      Pseudo-synchronous file calls             
00004 // % Author   :      Matthias Neeracher                                           
00005 // % Language :      C++                                                        
00006 // %                                                                       
00007 // % $Log: GUSIFSWrappers.h,v $
00008 // % Revision 1.1  2001/03/11 22:35:14  sgehani%netscape.com
00009 // % First Checked In.
00010 // %                                           
00011 // % Revision 1.7  2001/01/17 08:45:49  neeri                              
00012 // % Make open calls synchronous                                           
00013 // %                                                                       
00014 // % Revision 1.6  2000/05/23 06:58:04  neeri                              
00015 // % Improve formatting                                                    
00016 // %                                                                       
00017 // % Revision 1.5  2000/01/17 01:41:52  neeri                              
00018 // % Handle special cases in FSMoveRename                                  
00019 // %                                                                       
00020 // % Revision 1.4  1999/08/26 05:45:01  neeri                              
00021 // % Fixes for literate edition of source code                             
00022 // %                                                                       
00023 // % Revision 1.3  1999/07/19 06:21:02  neeri                              
00024 // % Add mkdir/rmdir, fix various file manager related bugs                
00025 // %                                                                       
00026 // % Revision 1.2  1999/05/30 02:16:54  neeri                              
00027 // % Cleaner definition of GUSICatInfo                                     
00028 // %                                                                       
00029 // % Revision 1.1  1998/10/11 16:45:14  neeri                              
00030 // % Ready to release 2.0a2                                                
00031 // %                                                                       
00032 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
00033 //                                                                         
00034 // \chapter{Pseudo-synchronous File System Calls}                          
00035 //                                                                         
00036 // MacOS offers a wide variety of file system APIs, but the most convenient
00037 // of them--the [[FSpXXX]] calls only works synchronously. The routines defined
00038 // here offer a version of these calls, executed asynchronously and embedded
00039 // into the [[GUSIContext]] switching model.                               
00040 //                                                                         
00041 // <GUSIFSWrappers.h>=                                                     
00042 #ifndef _GUSIFSWrappers_
00043 #define _GUSIFSWrappers_
00044 
00045 #ifdef GUSI_SOURCE
00046 
00047 #include <Files.h>
00048 
00049 #include <sys/cdefs.h>
00050 
00051 #include "GUSIFileSpec.h"
00052 
00053 __BEGIN_DECLS
00054 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00055 OSErr GUSIFSOpenDriver(StringPtr name, short * refNum);
00056 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00057 OSErr GUSIFSGetFInfo(const FSSpec * spec, FInfo * info);
00058 OSErr GUSIFSSetFInfo(const FSSpec * spec, const FInfo * info);
00059 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00060 OSErr GUSIFSOpenDF(const FSSpec * spec, char permission, short * refNum);
00061 OSErr GUSIFSOpenRF(const FSSpec * spec, char permission, short * refNum);
00062 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00063 OSErr GUSIFSGetVolParms(short vRefNum, GetVolParmsInfoBuffer * volParms);
00064 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00065 OSErr GUSIFSCreate(const FSSpec * spec, OSType creator, OSType type, ScriptCode script);
00066 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00067 OSErr GUSIFSDelete(const FSSpec * spec);
00068 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00069 OSErr GUSIFSDirCreate(const FSSpec * spec);
00070 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00071 OSErr GUSIFSSetFLock(const FSSpec * spec);
00072 OSErr GUSIFSRstFLock(const FSSpec * spec);
00073 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00074 OSErr GUSIFSRename(const FSSpec * spec, ConstStr255Param newname);
00075 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00076 OSErr GUSIFSCatMove(const FSSpec * spec, const FSSpec * dest);
00077 // <Declarations of C [[GUSIFSWrappers]]>=                                 
00078 OSErr GUSIFSMoveRename(const FSSpec * spec, const FSSpec * dest);
00079 __END_DECLS
00080 #ifdef __cplusplus
00081 // <Declarations of C++ [[GUSIFSWrappers]]>=                               
00082 OSErr GUSIFSGetCatInfo(GUSIIOPBWrapper<GUSICatInfo> * info);
00083 OSErr GUSIFSSetCatInfo(GUSIIOPBWrapper<GUSICatInfo> * info);
00084 // <Declarations of C++ [[GUSIFSWrappers]]>=                               
00085 OSErr GUSIFSGetFCBInfo(GUSIIOPBWrapper<FCBPBRec> * fcb);
00086 // <Declarations of C++ [[GUSIFSWrappers]]>=                               
00087 OSErr GUSIFSGetVInfo(GUSIIOPBWrapper<ParamBlockRec> * pb);
00088 OSErr GUSIFSHGetVInfo(GUSIIOPBWrapper<HParamBlockRec> * pb);
00089 // According to Andreas Grosam, [[PBOpenAsync]] may cause the file not to be closed properly when the
00090 // process quits, so we call that call synchronously.                      
00091 //                                                                         
00092 // <Declarations of C++ [[GUSIFSWrappers]]>=                               
00093 OSErr GUSIFSOpen(GUSIIOPBWrapper<ParamBlockRec> * pb);
00094 // <Declarations of C++ [[GUSIFSWrappers]]>=                               
00095 OSErr GUSIFSHGetFInfo(GUSIIOPBWrapper<HParamBlockRec> * pb);
00096 OSErr GUSIFSHSetFInfo(GUSIIOPBWrapper<HParamBlockRec> * pb);
00097 // <Declarations of C++ [[GUSIFSWrappers]]>=                               
00098 OSErr GUSIFSHGetVolParms(GUSIIOPBWrapper<HParamBlockRec> * pb);
00099 // <Declarations of C++ [[GUSIFSWrappers]]>=                               
00100 OSErr GUSIFSCreate(const FSSpec * spec);
00101 // <Declarations of C++ [[GUSIFSWrappers]]>=                               
00102 OSErr GUSIFSCatMove(const FSSpec * spec, long dest);
00103 #endif
00104 
00105 #endif /* GUSI_SOURCE */
00106 
00107 #endif /* GUSIFSWrappers */