home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / VirtualFile / VirtualDataForkOnlyFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  2.2 KB  |  70 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        VirtualDataForkOnlyFile.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __VIRTUALDATAFORKONLYFILE__
  15. #define __VIRTUALDATAFORKONLYFILE__
  16.  
  17. #ifndef __VIRTUALMACFILE__
  18. #include "VirtualMacFile.h"
  19. #endif
  20.  
  21. /***********************************|****************************************/
  22.  
  23. class TVirtualDataForkOnlyFile  : public TVirtualMacFile
  24. {
  25. public:
  26.             TVirtualDataForkOnlyFile(const Str31 fileName, OSType creator = 'ttxt', OSType type = 'TEXT');
  27.             TVirtualDataForkOnlyFile(const Str31 fileName, TVirtualFile* dataFile, OSType creator = 'ttxt', OSType type = 'TEXT' );
  28.     virtual ~TVirtualDataForkOnlyFile();
  29.  
  30.     virtual OSErr                     Open ();
  31.     virtual OSErr                     Close ();
  32.  
  33.     virtual OSErr                     ReadData (void* buffer, long& count, ForkType whichFork);
  34.     virtual OSErr                     WriteData (const void* buffer, long& count, ForkType whichFork);
  35.  
  36.     virtual OSErr                     SetEnd (long logEof, ForkType whichFork);
  37.     virtual OSErr                     GetEnd (long& logEof, ForkType whichFork) const;
  38.  
  39.     virtual OSErr                     SetPosition (short posMode, long posOff, ForkType whichFork);
  40.     virtual OSErr                     GetPosition (long& filePos,ForkType whichFork) const;
  41.  
  42.     virtual OSErr                     SetFinderInfo (const FInfo& finderInfo);
  43.     virtual OSErr                     GetFinderInfo (FInfo& finderInfo) const;
  44.  
  45.     virtual OSErr                     GetDate (unsigned long& dateTime,WhichDateType whichDate) const;
  46.     virtual OSErr                     SetDate (unsigned long dateTime,WhichDateType whichDate);
  47.  
  48.     virtual void                     SetUserRef(long ref);
  49.     virtual long                     GetUserRef() const;
  50.  
  51.     virtual    OSErr                     GetSpec ( FSSpec& ) const;
  52.     virtual    OSErr                    SetSpec ( const FSSpec& );
  53.  
  54. private:    TVirtualDataForkOnlyFile ( const TVirtualDataForkOnlyFile& );
  55.             TVirtualDataForkOnlyFile& operator = ( const TVirtualDataForkOnlyFile& );
  56.  
  57.             TVirtualFile*            fDataFile;
  58.             FInfo                     fFinderInfo;
  59.  
  60.             long                     fCreationDate;
  61.             long                    fModificationDate;
  62.  
  63.             FSSpec                    fSpec;
  64.             unsigned long            fOpenCount;
  65. };
  66.  
  67. /***********************************|****************************************/
  68.  
  69. #endif    // __VIRTUALDATAFORKONLYFILE__
  70.