home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ncftp-2.3.0-src.tgz / tar.out / contrib / ncftp / RCmd.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  2KB  |  67 lines

  1. /* RCmd.h */
  2.  
  3. #ifndef _rcmd_h_
  4. #define _rcmd_h_ 1
  5.  
  6. #ifndef _linelist_h_
  7. #include "LineList.h"
  8. #endif
  9.  
  10. typedef struct Response {
  11.     int codeType;
  12.     int code;
  13.     int printMode;
  14.     int eofOkay;
  15.     int hadEof;
  16.     LineList msg;
  17. } Response, *ResponsePtr;
  18.  
  19. /* Optional field entry 'printMode' can be filled in with one of these.
  20.  * PrintResponse looks at this to see if we will really print it.
  21.  */
  22. #define kDontPrint -1
  23. #define kDoPrint 1
  24. #define kDefaultPrint 0        /* We'll decide based on the response code then. */
  25.  
  26. #define kQuiet 0
  27. #define kErrorsOnly 1
  28. #define kTerse 2
  29. #define kVerbose 3
  30.  
  31. /* Used for selective screening of certain responses. */
  32. #define kAllRmtMsgs                    0
  33. #define kNoChdirMsgs                00001
  34. #define kNoConnectMsg                00002
  35.  
  36. #define kDefaultResponse ((ResponsePtr) 0)
  37. #define kIgnoreResponse ((ResponsePtr) -1)
  38.  
  39. #define CLEARRESPONSE(R)    PTRZERO(R, sizeof(Response))
  40.  
  41. #define kDefaultNetworkTimeout 30
  42.  
  43. /* Declared in xfer.h */
  44. typedef struct XferSpec *XferSpecPtr;
  45.  
  46. #include "Open.h"
  47.  
  48. int SetVerbose(int newVerbose);
  49. ResponsePtr InitResponse(void);
  50. void PrintResponseIfNeeded(ResponsePtr rp);
  51. void PrintResponse(ResponsePtr rp);
  52. int GetTelnetString(char *str, size_t siz, FILE *cin, FILE *cout);
  53. void DoneWithResponse(ResponsePtr rp);
  54. void ReInitResponse(ResponsePtr rp);
  55. int GetResponse(ResponsePtr rp);
  56. void TraceResponse(ResponsePtr rp);
  57.  
  58. #ifdef HAVE_STDARG_H
  59. int RCmd(ResponsePtr rp0, char *cmdspec0, ...);
  60. int RDataCmd(XferSpecPtr xp0, char *cmdspec0, ...);
  61. #else
  62. int RCmd();
  63. int RDataCmd();
  64. #endif
  65.  
  66. #endif    /* _rcmd_h_ */
  67.