scripts: add crosstools packages for i386 and armhf
[AROS.git] / rom / oop / unused / server.h
blob391f0bd74c60df92a162b00dff320649ffc54d4e
1 #ifndef OOP_SERVER_H
2 #define OOP_SERVER_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Include for server class.
9 Lang: english
13 extern ULONG __OOPI_Server;
15 #define IID_Server "Server"
16 #define CLID_Server "serverclass"
18 enum {
19 moServer_AddObject = 0,
20 moServer_RemoveObject,
21 moServer_FindObject,
22 moServer_Run,
24 num_Server_Methods
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
38 ULONG MethodID;
39 OOP_Object *Object;
40 STRPTR ObjectID;
43 struct P_Server_RemoveObject
45 ULONG MethodID;
46 STRPTR ObjectID;
49 struct P_Server_FindObject
51 ULONG MethodID;
52 STRPTR ObjectID;
55 #define Server_AddObject(o, object, id) \
56 ({ \
57 struct P_Server_AddObject msg; \
58 msg.MethodID = OOP_GetMethodID(IID_Server, moServer_AddObject); \
59 msg.Object = object; \
60 msg.ObjectID = id; \
61 ((BOOL)OOP_DoMethod(o, (OOP_Msg)&msg)); \
64 #define Server_RemoveObject(o, id) \
65 ({ \
66 struct P_Server_RemoveObject msg; \
67 msg.MethodID = OOP_GetMethodID(IID_Server, moServer_RemoveObject); \
68 msg.ObjectID = id; \
69 OOP_DoMethod(o, (OOP_Msg)&msg); \
72 #define Server_FindObject(o, id) \
73 ({ \
74 struct P_Server_FindObject msg; \
75 msg.MethodID = OOP_GetMethodID(IID_Server, moServer_FindObject); \
76 msg.ObjectID = id; \
77 ((OOP_Object *)OOP_DoMethod(o, (OOP_Msg)&msg)); \
80 #define Server_Run(o) \
81 ({ \
82 ULONG mid = OOP_GetMethodID(IID_Server, moServer_Run); \
83 OOP_DoMethod(o, (OOP_Msg)&mid); \
86 #endif /* OOP_SERVER_H */