home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga Shareware Floppies / ma64.dms / ma64.adf / FTPMount-1.0 / Source / site.h < prev    next >
C/C++ Source or Header  |  1995-12-10  |  2KB  |  74 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, all_messages, error_messages;
  35.     b16 port_number;
  36.     
  37.     b8 site_state;
  38.     b8 read_buffer[READ_BUFFER_LENGTH];
  39.     
  40.     b8 name[0];
  41. } site;
  42.  
  43. #define V_site 29545
  44.  
  45. struct MsgPort *get_site(b8 *s);
  46. void __saveds site_handler(void);
  47. void remove_site(site *);
  48. void shutdown_sites(void);
  49. void suspend_sites(void);
  50.  
  51. void state_change(site *, b16);
  52.  
  53. #define IDLE_INTERVAL 20    /* 20 second interval */
  54.  
  55. #define NO_LOCK_NO_CONN_IDLE 1
  56. #define NO_LOCK_CONN_IDLE 6
  57. #define LOCK_CONN_IDLE 15
  58.  
  59. #define SS_DISCONNECTED 1
  60. #define SS_CONNECTING 2
  61. #define SS_IDLE 3
  62. #define SS_DISCONNECTING 4
  63. #define SS_LISTING 5
  64. #define SS_CWD 6
  65. #define SS_OPENING 7
  66. #define SS_CLOSING 8
  67. #define SS_READING 9
  68. #define SS_WRITING 10
  69. #define SS_LOGIN 11
  70. #define SS_ABORTING 12
  71. #define SS_DELETING 13
  72. #define SS_MAKEDIR 14
  73. #define SS_RENAMING 15
  74.