some fixes to accented characters
[tangerine.git] / rom / oop / unused / removeserver.c
blobb21b128d2c01da5708e9da6ffb43362e29c031e7
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Add a class to the list of puvlic classes
6 Lang: english
7 */
8 #include <exec/lists.h>
9 #include <proto/exec.h>
10 #include "intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/oop.h>
17 AROS_LH1(VOID, OOP_RemoveServer,
19 /* SYNOPSIS */
20 AROS_LHA(STRPTR, serverID, A0),
22 /* LOCATION */
23 struct Library *, OOPBase, 13, OOP)
25 /* FUNCTION
26 Remove a pulic server object that has previously
27 been added to the public server list by AddServer().
29 INPUTS
30 serverID - ID of server object to remove.
32 RESULT
33 None.
35 NOTES
36 Probably not a good API. Implemented
37 just to show how one can call methods
38 across process-borders.
40 EXAMPLE
42 BUGS
44 SEE ALSO
45 OOP_AddServer(), OOP_FindServer()
47 INTERNALS
49 HISTORY
50 29-10-95 digulla automatically created from
51 intuition_lib.fd and clib/intuition_protos.h
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 if (serverID)
59 struct Node *sn;
61 /* This is a public list that must be protected */
62 ObtainSemaphore( &GetOBase(OOPBase)->ob_ServerListLock );
64 /* Try to find the server */
65 sn = FindName((struct List *)&GetOBase(OOPBase)->ob_ServerList
66 ,serverID);
68 if (sn)
70 /* If found, remove the node */
71 Remove(sn);
72 /* Free the copied ID */
73 FreeVec(sn->ln_Name);
74 /* Free the servernode */
75 FreeMem(sn, sizeof (struct ServerNode));
78 ReleaseSemaphore( & GetOBase(OOPBase)->ob_ServerListLock );
81 return;
82 AROS_LIBFUNC_EXIT
83 } /* OOP_RemoveServer */