2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Add a class to the list of puvlic classes
8 #include <exec/lists.h>
9 #include <proto/exec.h>
12 #include <aros/debug.h>
14 /*****************************************************************************
17 #include <proto/oop.h>
19 AROS_LH1(OOP_Object
*, OOP_FindServer
,
22 AROS_LHA(STRPTR
, serverID
, A0
),
25 struct Library
*, OOPBase
, 14, OOP
)
28 Find a public server object previously installed with
29 AddServer(). You can use the obtained object to
30 access objects that server is responsible for.
33 serverID - The servers public identifier.
36 Pointer to the server object.
39 Probably not a good API. Implemented
40 just to show how one can call methods
41 across process-borders.
48 OOP_AddServer(), OOP_RemoveServer()
53 29-10-95 digulla automatically created from
54 intuition_lib.fd and clib/intuition_protos.h
56 *****************************************************************************/
60 OOP_Object
*server
= NULL
;
62 EnterFunc(bug("OOP_FindServer(serverID=%s)\n", serverID
));
66 struct ServerNode
*sn
;
68 D(bug("Obtaining semahore\n"));
70 ObtainSemaphoreShared( &GetOBase(OOPBase
)->ob_ServerListLock
);
72 D(bug("Finding ID\n"));
74 sn
= (struct ServerNode
*)FindName(
75 (struct List
*)&GetOBase(OOPBase
)->ob_ServerList
,
80 D(bug("Found node: %p\n", sn
));
81 server
= sn
->sn_Server
;
84 D(bug("Releasing semaphore\n"));
87 ReleaseSemaphore( &GetOBase(OOPBase
)->ob_ServerListLock
);
90 ReturnPtr ("OOP_FindServer", Object
*, server
);
93 } /* OOP_FindServer */