1
/* Test/example program for the base library
3
Copyright (C) 2005 Free Software Foundation, Inc.
5
Copying and distribution of this file, with or without modification,
6
are permitted in any medium without royalty provided the copyright
7
notice and this notice are preserved.
9
This file is part of the GNUstep Base Library.
14
#include <GNUstepBase/preface.h>
15
#include <Foundation/NSConnection.h>
17
typedef struct _small_struct {
35
@protocol ClientProtocol
39
@protocol ServerProtocol
40
- (void) addObject: (id)o;
41
- (BOOL) sendBoolean: (BOOL)b;
42
- (void) getBoolean: (BOOL*)bp;
43
- (unsigned char) sendUChar: (unsigned char)uc;
44
- (void) getUChar: (unsigned char *)ucp;
45
- (char) sendChar: (char)uc;
46
- (void) getChar: (char *)ucp;
47
- (short) sendShort: (short)num;
48
- (void) getShort: (short *)num;
49
- (int) sendInt: (int)num;
50
- (void) getInt: (int *)num;
51
- (long) sendLong: (long)num;
52
- (void) getLong: (long *)num;
53
- (float) sendFloat: (float)num;
54
- (void) getFloat: (float *)num;
55
- (double) sendDouble: (double)num;
56
- (void) getDouble: (double *)num;
57
- sendDouble: (double)dbl andFloat: (float)flt;
59
- (small_struct) sendSmallStruct: (small_struct)str;
60
- (void) getSmallStruct: (small_struct *)str;
61
- (foo) sendStruct: (foo)str;
62
- (void) getStruct: (foo *)str;
63
- (id) sendObject: (id)str;
64
- (void) getObject: (id *)str;
65
- (char *) sendString: (char *)str;
66
- (void) getString: (char **)str;
68
- print: (const char *)str;
70
- objectAt: (unsigned)i;
74
- (oneway void) shout;
75
- bounce: sender count: (int)c;
76
- (oneway void) outputStats:obj;
78
- sendArray: (int[3])a;
79
- sendStructArray: (struct myarray)ma;
81
- sendBycopy: (bycopy id)o;
83
- sendByref: (byref id)o;
84
- modifyByref: (byref NSMutableString *)o;
86
- manyArgs: (int)i1 : (int)i2 : (int)i3 : (int)i4 : (int)i5 : (int)i6
87
: (int)i7 : (int)i8 : (int)i9 : (int)i10 : (int)i11 : (int)i12;
88
- (int) exceptionTest1;
89
- (void) exceptionTest2;
90
- (oneway void) exceptionTest3;
92
- (oneway void) registerClient: (id<ClientProtocol>)client;
93
- (oneway void) unregisterClient: (id<ClientProtocol>)client;
94
- (BOOL) tryClientCallback;
99
* We don't want the client to know about some methods, so we can
100
* check that they work when it doesn't know them.
102
@protocol privateServer
103
- quietBycopy: (bycopy id)o;
105
@interface Server : NSObject <ServerProtocol,privateServer>
108
id<ClientProtocol> registered_client;
112
@interface Server : NSObject <ServerProtocol>
115
id<ClientProtocol> registered_client;
120
#endif /* _server_h */