home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d540 / browser.lha / Browser / BrowserII_Src.LZH / FileList.h < prev    next >
C/C++ Source or Header  |  1991-06-18  |  2KB  |  88 lines

  1. /*
  2.  *    FileList.h - Copyright © 1991 by S.R. & P.C.
  3.  *
  4.  *    Created:    07 Apr 1991  15:32:15
  5.  *    Modified:    18 Jun 1991  23:24:32
  6.  *
  7.  *    Make>> make
  8.  */
  9.  
  10.  
  11. struct BufferList {
  12.     struct BufferList *Next;
  13.     short Size;
  14.     BYTE Memory[1];        /* the buffer is here */
  15. };
  16.  
  17.  
  18. struct Directory {
  19.     BPTR SrcDir;
  20.     BPTR DestDir;
  21.     struct MinList SuperFileList;
  22. };
  23.  
  24.  
  25. struct File {
  26.     struct BufferList *BufferList;    /* list of file buffers */
  27.     BPTR FH_S;
  28.     BPTR FH_D;
  29.     ULONG ToBeRead;
  30. };
  31.  
  32.  
  33. struct SuperFileInfo {
  34.     struct MinNode Node;
  35.     struct FileInfo FileInfo;    /* info on file/dir */
  36.     union {
  37.         struct File File;
  38.         struct Directory Dir;
  39.     } FileDir;
  40.     char OldName[32];            /* old name after rename/duplicate */
  41.     short Flags;                /* see below */
  42.     short ActionBack;            /* browser actions to do after the Action */
  43. };
  44.  
  45. #define    SFI_READING            0x01    /* file is being read */
  46. #define    SFI_READ_FINISHED    0x02    /* Tell if this entry is totaly read, so it can be released */
  47. #define SFI_REMOVE            0x04    /* this entry has to be removed */
  48. #define SFI_NOSELECT        0x08    /* don't reselect this entry (remove asked not for an error) */
  49. #define SFI_DIREMPTY        0x10    /* Tell if dir is empty ! */
  50.  
  51.  
  52. struct BrowserDir {
  53.     struct MinNode Node;
  54.     BPTR DirLock;
  55.     BPTR RootLock;
  56.     struct MinList SuperFileList;
  57. };
  58.  
  59.  
  60. union ActionArgs {
  61.     char NewName[32];                /* for rename/duplicate */
  62.     char Comment[82];                /* for Set Comment */
  63.     struct DateStamp DateStamp;        /* Actual date for touch */
  64.     struct {    
  65.         long Pos;
  66.         long Neg;
  67.     } Protection;                    /* Positve and negative protection bits for protect */
  68. };    
  69.  
  70.  
  71. struct HeadFileList {
  72.     struct MinList DirList;        /* List of browser directories containing selected entries */
  73.     struct SelectInfo Select;    /* affect subdirs handle */
  74.     BPTR DestDir;                /* Lock on the destination dir for copy/move/rename */
  75.     BPTR DestRoot;                /* Lock on the root of dest dir for copy/move */
  76.     UBYTE CopyMode;                /* No comment ! */
  77.     UBYTE CopyFlags;            /* No comment ! */
  78.     SHORT NumEntries;            /* Number of entries in list */
  79.     BOOL Dirs;                    /* Tell if dirs are selected */
  80.     BOOL Vols;                    /* Tell if volumes, devices, or assigns are selected */
  81.     BOOL CopySuccessfull;        /* Used to request user if sources files should be deleted even after an error during copy (with option ALLWAYS_MOVE) */
  82.     union ActionArgs ActionArgs;/* Args given to actions */
  83.     long MaxBuffer;                /* Maximum memory used for files buffers */
  84.     long StartMem;                /* Memory available before reading files */
  85.     long ActualUse;                /* Memory used by buffers */
  86. };
  87.  
  88.