home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextDeveloper / Examples / DistributedObjects / RemoteVote / VoteTally.h < prev    next >
Encoding:
Text File  |  1995-02-10  |  1.7 KB  |  74 lines

  1. /* 
  2.  *    VoteTally.m    Written by Joe Freeman 5/27/92
  3.  *
  4.  *    A Remote Object demonstration
  5.  *
  6.  *    3.0V1
  7.  *    
  8.  */
  9.  
  10. #import <appkit/appkit.h>
  11. #import <remote/NXProxy.h>    /* setProtocolForProxy */
  12.  
  13. @protocol VoteTallyClientMethods
  14.  
  15. /* ============================================================
  16.  *    who is part of this conference anyway?
  17.  *
  18.  *    updateStats does not need any return address, so make it async
  19.  *
  20.  * ============================================================ */
  21. -  (void)updateStats;
  22.  
  23.  
  24. /* ============================================================
  25.  *    Target/Action messages
  26.  *    
  27.  *    Some of these messages are recieved from both buttons/xxxx
  28.  *    and from the server
  29.  * ============================================================ */
  30. - resetLocal:sender;
  31.  
  32. @end
  33.  
  34. @protocol VoteTallyServerMethods
  35.  
  36. -  addClient:sender;
  37. -  removeClient:sender;
  38.  
  39. - resetAll:sender;
  40.  
  41. - getNumAttend:(int *)anInt;
  42. - getValue:(int *)aVal at:(int)index;
  43. - getMean:(float *)aFloat at:(int)index;
  44.  
  45. @end
  46.  
  47. /* we support the NXSenderIsInvalid protocol for error trapping */
  48. @interface VoteTally:Object <NXSenderIsInvalid, VoteTallyClientMethods, VoteTallyServerMethods> 
  49.  
  50. {
  51.     id    numVoting;
  52.     id    scrollers;
  53.     id    means;
  54.     
  55.     id    clearAllMenu;    /* so clients can disable */
  56.  
  57.     id  ourServer;    /* the server we created if we are the hub */
  58.                 /* or the NXConnection object if we are a client */
  59.  
  60.     id  remoteHub;    /* NXProxy object that represents the server */
  61.     
  62.     id  clientList;    /* if we are the hub */
  63. }
  64.  
  65. /* ============================================================
  66.  * Methods that are not protocol related
  67.  * ============================================================ */
  68.  
  69. - appDidInit:sender;
  70. - free;
  71. - takeVoteFrom:sender;
  72.  
  73. @end
  74.