5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Include for server class.
13 extern ULONG __OOPI_Server
;
15 #define IID_Server "Server"
16 #define CLID_Server "serverclass"
19 moServer_AddObject
= 0,
20 moServer_RemoveObject
,
27 #define ServerBase (__OOPI_Server)
29 #define M_Server_AddObject (ServerBase + moServer_AddObject)
30 #define M_Server_RemoveObject (ServerBase + moServer_RemoveObject)
31 #define M_Server_FindObject (ServerBase + moServer_FindObject)
32 #define M_Server_Run (ServerBase + moServer_Run)
34 /* Message parameter structs */
36 struct P_Server_AddObject
43 struct P_Server_RemoveObject
49 struct P_Server_FindObject
55 #define Server_AddObject(o, object, id) \
57 struct P_Server_AddObject msg; \
58 msg.MethodID = OOP_GetMethodID(IID_Server, moServer_AddObject); \
59 msg.Object = object; \
61 ((BOOL)OOP_DoMethod(o, (OOP_Msg)&msg)); \
64 #define Server_RemoveObject(o, id) \
66 struct P_Server_RemoveObject msg; \
67 msg.MethodID = OOP_GetMethodID(IID_Server, moServer_RemoveObject); \
69 OOP_DoMethod(o, (OOP_Msg)&msg); \
72 #define Server_FindObject(o, id) \
74 struct P_Server_FindObject msg; \
75 msg.MethodID = OOP_GetMethodID(IID_Server, moServer_FindObject); \
77 ((OOP_Object *)OOP_DoMethod(o, (OOP_Msg)&msg)); \
80 #define Server_Run(o) \
82 ULONG mid = OOP_GetMethodID(IID_Server, moServer_Run); \
83 OOP_DoMethod(o, (OOP_Msg)&mid); \
86 #endif /* OOP_SERVER_H */