home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / comm / revrdist.sit / RevRdist / headers / rsrc.h < prev   
Encoding:
C/C++ Source or Header  |  1990-08-09  |  6.7 KB  |  211 lines  |  [TEXT/KAHL]

  1. /*
  2.  * rsrc.h - #defines, etc, which need to stay synched with the resource
  3.  * source file (RevRdist.r)
  4.  */
  5.  
  6. #define    RSRC_BASE    12100        /* base for resource numbering */
  7.  
  8. #define CREATOR        'Dist'        /* our creator id */
  9. #define    TYPE_CONT    'TEXT'        /* file type of control file */
  10. #define TYPE_PREF    'RDsp'        /* file type of prefs file */
  11. #define    TYPE_LONG    'Long'        /* rsrc type of misc params */
  12. #define    TYPE_TEXT    'TEXT'        /* rsrc type of extended text */
  13.  
  14. #define    RSRC_MOUNT    2000        /* resid for mount XCMD */
  15. #define    RSRC_INITICON    131        /* resid of INIT's ICN# */
  16. #define    RSRC_ABOUT    (RSRC_BASE)    /* resid of About text */
  17.  
  18. /*
  19.  * Misc parameter resource ids
  20.  */
  21.  
  22. enum
  23. {
  24.      TIME_INTERVAL = RSRC_BASE    /* seconds between runs */
  25.     ,JUNK_PARM                    /* min/max junk residence times & space */
  26.     ,FLAG_PARM                    /* initial value for Flags */
  27. };
  28.  
  29. /*
  30.  * Window refCons, add RSRC_BASE to get WIND resource id
  31.  */
  32.  
  33. enum
  34. {
  35.      WIND_STATUS = 1            /* pause/continue/cancel dialog */
  36.     ,WIND_ACTIVITY                /* window for listing of actions as they
  37.                                  * occur */
  38.     ,WIND_ERRORS                /* error message window */
  39.     ,WIND_PREF                    /* preferences dialog */
  40.     ,ALERT_WARN                    /* warning which can be ignored */
  41.     ,ALERT_PANIC                /* warning which cannot be ignored */
  42.     ,WIND_DFLAGS                /* dialog for setting debug flags */
  43.     ,WIND_ABOUT                    /* about dialog */
  44.     ,ALERT_SAVE                    /* save file before closing */
  45. };
  46.  
  47. /*
  48.  * Item numbers
  49.  */
  50.  
  51. enum
  52. {                                /* in File menu */
  53.      FILE_OPEN = 1                /* Open ... */
  54.     ,FILE_SAVE                    /* Save preferences */
  55.     ,FILE_SAVEAS                /* Save preferences as ... */
  56.     ,FILE_QUIT                    /* Quit */
  57.     ,FILE_CLOSE                    /* dummy */
  58. };
  59.  
  60. enum
  61. {                                /* in Edit menu */
  62.      EDT_UNDO = 1
  63.     ,EDT_CUT = 3
  64.     ,EDT_COPY
  65.     ,EDT_PASTE
  66.     ,EDT_CLEAR
  67. };
  68.  
  69. enum                            /* in status dialog */
  70. {
  71.      STS_PAUSE = 1                /* pause button */
  72.     ,STS_CANCEL                    /* cancel button */
  73.     ,STS_CONT                    /* continue button */
  74.     ,STS_STATUS                    /* current status text */
  75.     ,STS_WAIT                    /* please wait text */
  76.     ,STS_REBOOT                    /* reboot text */
  77.     ,STS_PICT                    /* our picture */
  78. };
  79.  
  80. enum                            /* in preferences dialog */
  81. {
  82.      PRF_GO = 1                    /* go to it button */
  83.     ,PRF_CANCEL                    /* cancel button */
  84.     ,PRF_ZONE = 4                /* AppleShare zone name */
  85.     ,PRF_SRVR = 6                /* AppleShare server name */
  86.     ,PRF_USER = 8                /* AppleShare user login name */
  87.     ,PRF_PASS = 10                /* User's password */
  88.     ,PRF_DISTF = 12                /* distribution control file editText */
  89.     ,PRF_MASTF = 14                /* master folder on server editText */
  90.     ,PRF_JUNKF = 16                /* junk folder name editText */
  91.     ,PRF_INTERVAL = 18            /* update interval editText */
  92.     ,PRF_JMIN = 20                /* minimum junk lifetime editText */
  93.     ,PRF_JMAX = 22                /* maximum junk lifetime editText */
  94.     ,PRF_DMIN = 24                /* free space threshold editText */
  95.     ,PRF_LAST = 24                /* highest editText item */
  96. };
  97.  
  98. /*
  99.  * alert items
  100.  */
  101. enum
  102. {
  103.      ALRT_OKAY = 1                /* okay button */
  104.     ,ALRT_CANCEL                /* cancel button */
  105.     ,ALRT_TEXT                    /* alert text */
  106. };
  107.  
  108. enum
  109. {
  110.      SAVE_YES = 1                /* yes (save) button */
  111.     ,SAVE_NO                    /* no (don't save) button */
  112.     ,SAVE_CANCEL                /* cancel close or quit */
  113.     ,SAVE_TEXT                    /* alert text */
  114. };
  115.  
  116.  
  117. /*
  118.  * Messages in STR# RSRC_BASE+0 - most error messages
  119.  */
  120. #define    ERR_STR        (RSRC_BASE)
  121. enum
  122. {
  123.      E_SYS = 1    /* When ^0 called ^1, the system returned error ^2 */
  124.     ,E_FILE        /* Problems with ^0.  Error ^1 */
  125.     ,E_QUIT        /* Quitting per user request */
  126.     ,E_NOMEM    /* Out of memory in ^0 (hint: ^1) */
  127.     ,E_REQUEST    /* Internal error: bad dispatcher request/result ^1 in ^0 */
  128.     ,E_STATE    /* Internal error: bad dispatcher state in ^0: ^1 */
  129.     ,E_DISTF    /* Cannot locate distribution control file: ^0 */
  130.     ,E_DISTL    /* Syntax error(s) in directives file */
  131.     ,E_PREFIX    /* Bad prefix character in line  */
  132.     ,E_NOFNAME    /* Missing file/folder name in line  */
  133.     ,E_BADNAME    /* Illegal file/folder name in line  */
  134.     ,E_NOACTION    /* Missing action list in line  */
  135.     ,E_BADACTION/* Unrecognized action option in line  */
  136.     ,E_BADTYPE    /* Bad file TYPE(CREATOR) specification */
  137.     ,E_ALTNAME    /* Garbage at end of line  */
  138.     ,E_ENDFERR    /* Internal error: corrupt dist_node at end of folder mark ^0: ^1 */
  139.     ,E_DISTBAD    /* Internal error: corrupt dist_node tree ^0: ^1 */
  140.     ,E_FIRST    /* First entry in directives file must be root folder */
  141.     ,E_LAST        /* Directives file has unmatched folder entries */
  142.     ,E_PREFS    /* Preferences file (^0) missing or corrupt */
  143.     ,E_NOPREF    /* No preferences file found - should defaults be used? */
  144.     ,E_NOVOL    /* Cannot determine which volume to update */
  145.     ,E_NOPRINT    /* Printing of control files not supported - open instead? */
  146.     ,E_HFS        /* Sorry, ^0 requires the Hierarchical File System */
  147.     ,E_MFS        /* Sorry, ^0 requires HFS volumes.  ^1 is MFS. */
  148.     ,E_LISTONLY    /* Updates disabled.  Continue, but only list actions? */
  149.     ,E_NOSERVER    /* Cannot find master folder (^0) */
  150.     ,E_NOACCESS    /* Must have "See files" and "See folders" access to master folder (^0) */
  151.     ,E_NOJUNK    /* Cannot open "junk" folder (^0) */
  152.     ,E_ACCESS    /* No access to folder (^0) */
  153.     ,E_NAMELEN    /* Internal error: name too long in ^0 (^1) */
  154.     ,E_BADJUNKF    /* Bad or missing "junk" folder STR resource */
  155.     ,E_TYPE        /* Cannot save preferences to ^0: wrong file type */
  156.     ,E_BLESSED    /* Volume ^0 missing ^1.  It might not boot. */
  157. };
  158.  
  159. /*
  160.  * Messages for the activity listing window
  161.  */
  162. #define    LST_STR        (RSRC_BASE+1)
  163. enum {
  164.      L_SYS = 1    /* When ^0 called ^1, the system returned error ^2 */
  165.     ,L_FILE        /* Problems with ^0.  Error ^1 */
  166.     ,L_SKIP        /* Skipping emptying of junk folder (^0) */
  167.     ,L_DOJUNK    /* Emptying junk folder (^0) */
  168.     ,L_STARTF    /* Working on ^0 */
  169.     ,L_ENDF        /* Done with ^0 */
  170.     ,L_WCREATE    /* Would create folder ^0 */
  171.     ,L_IGNORE    /* Ignoring ^0 */
  172.     ,L_MISSING    /* Missing from server: ^0 */
  173.     ,L_SKPJUNK    /* Skipping junking of ^0 */
  174.     ,L_JUNKING    /* Moving ^0 to junk folder */
  175.     ,L_COPYING    /* Copying ^0 byte file ^1 to ^2 */
  176.     ,L_DOEMPTY    /* Discarding contents of folder ^0 */
  177.     ,L_DISCARD    /* Discarding ^0 */
  178.     ,L_NOWHAT    /* Don't know what to do with ^0 */
  179.     ,L_ACCESS    /* No access to folder (^0) */
  180.     ,L_FINFO    /* Updating Finder info for ^0 */
  181.     ,L_TOOMANYJ    /* Too many copies of "^0" in junk folder */
  182.     ,L_BLESSED    /* Setting Blessed folder */
  183.     ,L_DONE        /* RevRdist complete */
  184. };
  185.  
  186. /*
  187.  * STR  resource id's
  188.  */
  189. enum {
  190.      STR_PREFS = RSRC_BASE        /* name of preferences file */
  191.     ,STR_DISTF                    /* name of distribution control file */
  192.     ,STR_ZONE                    /* name of server zone */
  193.     ,STR_SRVR                    /* name of server node */
  194.     ,STR_USER                    /* user name on server */
  195.     ,STR_PASS                    /* password of user on server */
  196.     ,STR_MASTF                    /* name of server master folder */
  197.     ,STR_JUNKF                    /* name of junk folder */
  198.     ,STR_JUNKSUF                /* suffix to uniquify junk files */
  199.     ,STR_UNTITLED                /* name for document with no file */
  200.     ,STR_PSAVE                    /* text for prefs SFPutFile */
  201. };
  202.  
  203. /*
  204.  * Numbers for NAME_STR strings
  205.  */
  206. #define    NAME_STR    (RSRC_BASE+2)
  207. enum {
  208.      NAME_FOLDER = 1            /* name of system folder */
  209.     ,NAME_SYSTEM                /* name of system file */
  210.     ,NAME_FINDER                /* name of shell file */
  211. };