home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / FTPMOUNT.LZX / FTPMount-0.7 / Source / site.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-06  |  1.6 KB  |  73 lines

  1. /*
  2.  * This source file is Copyright 1995 by Evan Scott.
  3.  * All rights reserved.
  4.  * Permission is granted to distribute this file provided no
  5.  * fees beyond distribution costs are levied.
  6.  */
  7.  
  8. #define READ_BUFFER_LENGTH 200
  9.  
  10. typedef struct site_s {
  11.     struct site_s *next;
  12.     
  13.     magic_verify;
  14.     
  15.     struct my_lock *lock_list;
  16.     struct my_file_info *file_list;
  17.     struct tcpm *control, *intr, *cfile;
  18.     struct StandardPacket *death_packet;
  19.     struct MsgPort *port, *sync, *rank;
  20.     struct info_header *infos;
  21.     b8 *user, *password;
  22.     b8 *cwd, *root;
  23.     b8 *host;
  24.     b32 cfile_type;
  25.     b32 abort_signals, disconnect_signals;
  26.     struct Window *status_window;
  27.     struct Gadget *abort_gadget, *disconnect_gadget;
  28.     
  29.     struct IntuitionBase *IBase;
  30.     struct GfxBase *GBase;
  31.     struct Library *GTBase;
  32.     
  33.     boolean connected, read_banners, unix_paths, open_status, quick;
  34.     boolean needs_user, needs_password, case_sensitive;
  35.     
  36.     b8 site_state;
  37.     b8 read_buffer[READ_BUFFER_LENGTH];
  38.     
  39.     b8 name[0];
  40. } site;
  41.  
  42. #define V_site 29545
  43.  
  44. struct MsgPort *get_site(b8 *s);
  45. void __saveds site_handler(void);
  46. void remove_site(site *);
  47. void shutdown_sites(void);
  48. void suspend_sites(void);
  49.  
  50. void state_change(site *, b16);
  51.  
  52. #define IDLE_INTERVAL 20    /* 20 second interval */
  53.  
  54. #define NO_LOCK_NO_CONN_IDLE 1
  55. #define NO_LOCK_CONN_IDLE 6
  56. #define LOCK_CONN_IDLE 15
  57.  
  58. #define SS_DISCONNECTED 1
  59. #define SS_CONNECTING 2
  60. #define SS_IDLE 3
  61. #define SS_DISCONNECTING 4
  62. #define SS_LISTING 5
  63. #define SS_CWD 6
  64. #define SS_OPENING 7
  65. #define SS_CLOSING 8
  66. #define SS_READING 9
  67. #define SS_WRITING 10
  68. #define SS_LOGIN 11
  69. #define SS_ABORTING 12
  70. #define SS_DELETING 13
  71. #define SS_MAKEDIR 14
  72. #define SS_RENAMING 15
  73.