File:  [NeXTSTEP 3.3 examples] / Examples / DistributedObjects / RemoteVote / VoteTally.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:49:03 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/* 
 *	VoteTally.m	Written by Joe Freeman 5/27/92
 *
 *	A Remote Object demonstration
 *
 *	3.0V1
 *	
 */

#import <appkit/appkit.h>
#import <remote/NXProxy.h>	/* setProtocolForProxy */

@protocol VoteTallyClientMethods

/* ============================================================
 *	who is part of this conference anyway?
 *
 *	updateStats does not need any return address, so make it async
 *
 * ============================================================ */
-  (void)updateStats;


/* ============================================================
 *	Target/Action messages
 *	
 *	Some of these messages are recieved from both buttons/xxxx
 *	and from the server
 * ============================================================ */
- resetLocal:sender;

@end

@protocol VoteTallyServerMethods

-  addClient:sender;
-  removeClient:sender;

- resetAll:sender;

- getNumAttend:(int *)anInt;
- getValue:(int *)aVal at:(int)index;
- getMean:(float *)aFloat at:(int)index;

@end

/* we support the NXSenderIsInvalid protocol for error trapping */
@interface VoteTally:Object <NXSenderIsInvalid, VoteTallyClientMethods, VoteTallyServerMethods> 

{
    id	numVoting;
    id	scrollers;
    id	means;
    
    id	clearAllMenu;	/* so clients can disable */

    id  ourServer;	/* the server we created if we are the hub */
    			/* or the NXConnection object if we are a client */

    id  remoteHub;	/* NXProxy object that represents the server */
    
    id  clientList;	/* if we are the hub */
}

/* ============================================================
 * Methods that are not protocol related
 * ============================================================ */

- appDidInit:sender;
- free;
- takeVoteFrom:sender;

@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.