home *** CD-ROM | disk | FTP | other *** search
- /*
- File: VirtualHFSMacFile.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __VIRTUALHFSMACFILE__
- #define __VIRTUALHFSMACFILE__
-
- #ifndef __VIRTUALMACFILE__
- #include "VirtualMacFile.h"
- #endif
-
- #pragma push
- #pragma segment VirtualHFSMacFile
-
- /***********************************|****************************************/
-
- class TVirtualHFSMacFile : public TVirtualMacFile
- {
- public:
- TVirtualHFSMacFile ( const FSSpec& storage, OSType creator = 'MPS ', OSType fileType = 'TEXT' );
- virtual ~TVirtualHFSMacFile();
-
- virtual OSErr Open ();
- virtual OSErr Close ();
-
- virtual Boolean GetDisposeFile();
- virtual void SetDisposeFile(Boolean);
-
- virtual OSErr ReadData (void* buffer,long& count,ForkType whichFork);
- virtual OSErr WriteData (const void* buffer, long& count, ForkType whichFork);
-
- virtual OSErr SetEnd (long logEof, ForkType whichFork);
- virtual OSErr GetEnd (long& logEof, ForkType whichFork) const;
-
- virtual OSErr SetPosition (short posMode, long posOff, ForkType whichFork);
- virtual OSErr GetPosition (long& filePos,ForkType whichFork) const;
-
- virtual OSErr SetFinderInfo (const FInfo& finderInfo);
- virtual OSErr GetFinderInfo (FInfo& finderInfo) const;
-
- virtual OSErr GetDate (unsigned long& dateTime,WhichDateType whichDate) const;
- virtual OSErr SetDate (unsigned long dateTime,WhichDateType whichDate);
-
- virtual OSErr GetSpec ( FSSpec& ) const;
- virtual OSErr SetSpec ( const FSSpec& );
-
- virtual void SetUserRef(long ref);
- virtual long GetUserRef() const;
-
- virtual OSErr WriteToDisk ( const FSSpec& );
- virtual OSErr WriteToDisk ();
-
- protected: short GetRefNum(ForkType whichFork) const { return whichFork == kResource ? fRFRefnum : fDFRefnum; };
-
- FSSpec fSpec;
- short fDFRefnum;
- short fRFRefnum;
- long fUserRef;
- Boolean fDisposeFile;
- };
-
- /***********************************|****************************************/
-
- #pragma pop
-
- #endif // __VIRTUALHFSMACFILE__
-