home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / Gopher_1.12 / StuartSpeaker.h < prev    next >
Encoding:
Text File  |  1992-03-16  |  1.6 KB  |  70 lines

  1.     /*
  2.       Copyright (c) 1990, Scott Hess.  No rights reserved.  No
  3.       warrenty is provided for this software, neither explicit
  4.       nor implied.  The source and object code for this file
  5.       may be used and modified as the user sees fit.
  6.     */
  7.  
  8. #import <appkit/Speaker.h>
  9.  
  10. typedef struct _StuartDefault {
  11.   const char *defName, *defValue;
  12. } StuartDefault;
  13.  
  14. @interface StuartSpeaker : Speaker
  15. {
  16.   int nDefaults;        // The number of defaults.
  17.   StuartDefault *defaults;    // defaults/values for the new Stuart.
  18.   
  19.   BOOL activate;        // activate Stuart when we call?
  20.   char *host;            // host to run on.
  21. }
  22.  
  23.     /*
  24.       These are for setting up the Speaker, initializing the
  25.       local variables.
  26.     */
  27. + new;
  28. - free;
  29.  
  30.     /*
  31.       These are my primitive functions.  Don't use them, I'd
  32.       say.
  33.     */
  34. -(int)_stuartNew:(char *)defs activate:(int)flag;
  35. -(int)_stuartGet:(char **)defs;
  36.  
  37.     /*
  38.       These are for setting and getting the default values from
  39.       the local storage.
  40.     */
  41. -(const char *)default:(const char *)name;
  42. -(int)defaultAsInt:(const char *)name;
  43. -(float)defaultAsFloat:(const char *)name;
  44. -(BOOL)defaultAsBOOL:(const char *)name;
  45. - default:(const char *)name as:(const char *)value;
  46. - default:(const char *)name asInt:(int)value;
  47. - default:(const char *)name asFloat:(float)value;
  48. - default:(const char *)name asBOOL:(BOOL)value;
  49.  
  50.     /*
  51.       These communicate with Stuart.
  52.     */
  53. -(int)stuartNew;
  54. -(int)stuartGet;
  55. -(int)stuartSend:(int)fd;
  56. -(int)stuartConnectAndNew;
  57. -(int)stuartConnectAndGet;
  58. -(int)stuartConnectAndSend:(int)fd;
  59.  
  60.     /*
  61.       misc.
  62.     */
  63. -(BOOL)activate;
  64. - setActivate:(BOOL)flag;
  65. -(const char *)host;
  66. - setHost:(const char *)host;
  67.  
  68. @end
  69.  
  70.