home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / Ph 1.1.1 / Lib / scn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-27  |  1.5 KB  |  44 lines  |  [TEXT/MPS ]

  1. /*______________________________________________________________________
  2.  
  3.     scn.h - Volume Scanning Module Interface.
  4.     
  5.     Copyright © 1988-1991 Northwestern University.
  6. _____________________________________________________________________*/
  7.  
  8. #ifndef __scn__
  9. #define __scn__
  10.  
  11. /* The following structure is used to maintain a list of folder names.  
  12.     
  13.     When the caller-supplied doFile routine is called, it is passed a
  14.     handle to the head of the list.  The list contains all the 
  15.     folder names in the current path, in reverse order (lowest-level 
  16.     folder name to highest-level folder name).  The list is maintained as 
  17.     a push-down stack:  When a new folder is encountered it is added to the 
  18.     head of the list, and it is removed when the scan of that folder is 
  19.     complete. */
  20.  
  21. typedef struct scn_FListEl {
  22.     struct scn_FListEl    **next;            /* handle to next folder name */
  23.     Str255                    name;                /* folder name */
  24.     char                        accessRights;    /* access rights - see IM V-391 */
  25. } scn_FListEl, *scn_FListElPtr, **scn_FListElHandle;
  26.  
  27. typedef Boolean (*scn_DoFilePtr)(CInfoPBRec *pBlock,
  28.     scn_FListElHandle folderList, long RefCon, Boolean mfs);
  29.  
  30. typedef Boolean (*scn_CheckCancelPtr)(void);
  31.  
  32. typedef enum scn_Kind {
  33.     scn_Volume,
  34.     scn_Folder,
  35.     scn_File
  36. } scn_Kind;
  37.  
  38. extern Boolean scn_Scan (FSSpec *fSpec, scn_Kind kind, 
  39.     scn_DoFilePtr doFile, long refCon, scn_CheckCancelPtr checkCancel, 
  40.     Rect *fldNameRect, Rect *fleNameRect, Rect *thrmRect, 
  41.     short nameFont, short nameSize);
  42. extern void scn_Update (Rect *thrmRect);
  43.  
  44. #endif