home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / database / discindex / Source / H / DiscIndex
Encoding:
Text File  |  1994-08-03  |  1.7 KB  |  115 lines

  1. /* Header file for DiscIndex
  2.  * (c) Neil A Carson 1994 A.D.
  3.  */
  4.  
  5. #ifndef __discindex_h
  6. #define __discindex_h
  7.  
  8. #ifndef __wimp_h
  9. #include "wimp.h"
  10. #endif
  11.  
  12. /* Types for various things
  13.  */
  14.  
  15. typedef struct
  16. {
  17.     int size;
  18.     int type;
  19.     char name[32];
  20.     char desc[32];
  21. } file_type;
  22.  
  23. typedef struct disc_struct
  24. {
  25.     struct disc_struct *next;
  26.     file_type *files;
  27.     int used;
  28.     int no;
  29.     char disc_name[32];
  30.     char disc_desc[32];
  31. } disc_type;
  32.  
  33. typedef struct
  34. {
  35.     int no;
  36.     disc_type discs;
  37. } var_type;
  38.  
  39. extern var_type records;
  40.  
  41. typedef struct
  42. {
  43.     enum
  44.     {
  45.         disc_name = 1,
  46.         disc_desc = 2,
  47.         file_name = 4,
  48.         file_desc = 8
  49.     } fields;
  50.     BOOL case_sensitive;
  51.     char string[32];
  52. } search_win_type;
  53.  
  54. typedef enum
  55. {
  56.     show_fname = 1,
  57.     match_dname = 2,
  58.     match_ddesc = 4,
  59.     match_fname = 8,
  60.     match_fdesc = 16
  61. } match_type;
  62.  
  63. typedef struct
  64. {
  65.     int no;
  66.     int disc_nos[16];
  67.     int file_nos[16];
  68.     match_type matches[16];
  69. } match_win_type;
  70.  
  71. typedef struct
  72. {
  73.     char drive[32];
  74.     enum
  75.     {
  76.         directories = 1,
  77.         applications = 2,
  78.         files_apps = 4,
  79.         files = 8,
  80.         root_only = 16
  81.     } type;
  82.     BOOL dismount;
  83. } scan_win_type;
  84.  
  85. typedef struct
  86. {
  87.     char name[255];
  88. } xfer_send_type;
  89.  
  90. typedef struct
  91. {
  92.     int load;
  93.     int exec;
  94.     int len;
  95.     int attributes;
  96.     int type;
  97.     char name[32];
  98. } os_gbpb_block;
  99.  
  100. typedef void (*recurse_proc) (char *, os_gbpb_block *);
  101.  
  102. /* Globally callable functions
  103.  */
  104. void mem_man_init(void);
  105. disc_type *disc_create(void);
  106. int disc_destroy(int no);
  107. disc_type *disc_locate(int no);
  108. extern void recurse(char *source_dir, recurse_proc);
  109. extern void set_current_disc(int no);
  110. extern void mem_free(void);
  111. extern BOOL disc_insert(int off);
  112.  
  113. #endif
  114.  
  115.