home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / UNIX / ARCHIE / CLIENTS / NEXTARCH.TAR / NeXTArchie / ArchieServer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-26  |  4.1 KB  |  115 lines

  1. /* An Objective-C class that provides the functionality of the archie.c program
  2.     distributed in the beta.4.2 propspero release.
  3.     See the the ArchieServer.m file for the original UW copyright
  4.     info include and archie authors.
  5.     Scott Stark Wed Jan 15 1992 <stark@superc.che.udel.edu>
  6. */
  7. #import <objc/Object.h>
  8. #include <pfs.h>        // Defines the VLINK typedef
  9. #import <cthreads.h>
  10. #import <dpsclient/dpsclient.h>
  11.  
  12. @interface ArchieServer : Object
  13. {
  14.     /* Command line flags of the archie program set through the
  15.         preferences panel */
  16.     char queryType;        // The type of pattern matching request.  Corresponds to
  17.                         //    the archie -cers flags
  18.     int maxReplies;        // The maximum number of query matches to be returned.  Corresponds
  19.                         //    to the archie -m flag
  20.     int offset;            // Return only 1 out of (1+offset) matches. Not used now.
  21.     int sortType;        // Sort by hostname/filename, by modification date or not at all
  22.     BOOL exactFlag;    // Exact match flag
  23.     int (*cmpProc)(VLINK p,VLINK q);    // The sort comparison procedure
  24.     int niceLevel;        // The query niceness level
  25.     int hostTag;
  26.     const char *hostname;    // The Archie hostname
  27.     int    debugLevel;        // The Prospero debugging level
  28.  
  29.     /* Preference Panel outlets */
  30.     id prefPanelID;        // Peferences Panel
  31.     id hostMatrixID;        // Hostname object
  32.     id customHostID;    // TextField for the custom hostname
  33.     id sortMatrixID;        // Sort method object
  34.     id patternMatrixID;    // Pattern matching object
  35.     id exactBtnID;        // Exact match flag object
  36.     id niceMatrixID;        // Niceness object
  37.     id hitsFormID;        // Max hits object
  38.     id debugMatrixID;    // Debug level object
  39.  
  40.     /* Outlets to the main nib file */
  41.     id fileBrowserID;    // The Browser which display the server responses
  42.     id fileInfoID;            // File info Form
  43.     id readMatrixID;        // Permission matrices
  44.     id writeMatrixID;
  45.     id execMatrixID;
  46.     id calendarID;        // The CalendarView object
  47.     id clockID;            // The ClockView object
  48.  
  49.     /* Query Panel outlets */
  50.     id queryPanelID;        // A Panel used to display the status of server queries
  51.     id hostnameID;        // Hostname TextFieldCell
  52.     id statusID;            // Status TextFieldCell
  53.     id queryTimerID;    // A ClockView object to display query status
  54.     
  55.     /* Ping Panel outlets & stuff */
  56.     id pingPanelID;        // The Panel displayed in response to ``Ping Servers...''
  57.     id pingHostsID;        // The ping panels host Matrix object
  58.     id pingOutputID;        // The TextField used to display the ping commdand output
  59.     const char *pingHost;    // The selected host
  60.     DPSTimedEntry readPing;    // The timed entry which display pings output
  61.  
  62.     /* Ftp stuff */
  63.     id ftpObject;            // The FTPManager object which handles ftp transfer
  64.     id modeMatrixID;    // The file transfer mode Matrix
  65.     id retrieveBtnID;        // The Retrieve Button in the main window
  66.     id selectedFile;        // The ProsperoVLINK object of the file selected in the browser
  67.  
  68.     /* Other variables */
  69.     cthread_t queryThread;    // The thread that performs the archie query
  70.     VLINK archieRslt;        // The list of virtual links returned by archie_query()
  71.     id hostHashTable;        // A HashTable that uses hostnames as entry keys
  72.     id hostList;                // A List which stores the host files
  73.     id errStringTable;        // An NXStringTable of the program error messages
  74.     id infoPanelID;            // The application info Panel
  75. }
  76.  
  77. /* Bring up the info panel */
  78. - infoPanel: sender;
  79.  
  80. /* Display the query options panel */
  81. - preferences : sender;
  82.  
  83. /* Methods which set the query options */
  84. - setQueryType : sender;
  85. - setExactMode : sender;
  86. - setMaxReplies : sender;
  87. - setOffset : sender;
  88. - setSortType : sender;
  89. - setNiceLevel : sender;
  90. - setHostname : sender;
  91. - setCustomHost: sender;
  92. - setDebugLevel : sender;
  93.  
  94. /* Archie server request method */
  95. - archieRequest : sender;        // Query the archive server
  96. - interruptRequest : sender;    // Abort a query
  97.  
  98. /* Parsing and displaying the Archie server response */
  99. - parseResponse : (VLINK) response;
  100. - fileAttributes : sender;
  101. - clearFields;
  102.  
  103. /* Ftp methods */
  104. - retrieveFile : sender;    // Retrieve the file selected in the browser via anonymous ftp
  105. - setTransferDir : sender;    // Set the local host's receipt directory
  106.  
  107. /* Read/Restore default preferences */
  108. - saveDefaults : sender;
  109. - restoreDefaults : sender;
  110.  
  111. /* Error handling */
  112. - error:(int) severity key:(const char *) keyString;
  113.  
  114. @end
  115.