start service tasks separately in-case platforms need to perform additional set-up...
[AROS.git] / rom / oop / setattrs.c
blob831de2f66d95c4a1c504deb274f58c679896f247
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Set attributes of an object.
6 Lang: english
7 */
8 #include <exec/lists.h>
9 #include <proto/exec.h>
10 #include <aros/debug.h>
11 #include "intern.h"
12 #include <oop/static_mid.h>
14 /*****************************************************************************
16 NAME */
17 #include <proto/oop.h>
19 AROS_LH2(IPTR, OOP_SetAttrs,
21 /* SYNOPSIS */
22 AROS_LHA(OOP_Object *, object, A0),
23 AROS_LHA(struct TagItem *, attrList, A1),
25 /* LOCATION */
26 struct Library *, OOPBase, 17, OOP)
28 /* FUNCTION
29 Sets the object's attributes as specified in the
30 supplied taglist.
32 INPUTS
33 object - pointer to a object in whih we
34 want to set attributes.
36 tagList - List of attributes and their new values.
38 RESULT
39 Undefined.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 OOP_DisposeObject()
50 INTERNALS
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
56 struct pRoot_Set p;
57 struct IntOOPBase *iOOPBase = (struct IntOOPBase *)OOPBase;
59 EnterFunc(bug("OOP_SetAttrs())\n"));
60 ASSERT_VALID_PTR(object);
61 ASSERT_VALID_PTR_OR_NULL(attrList);
63 if (!iOOPBase->ob_mRoot_Set)
64 iOOPBase->ob_mRoot_Set = OOP_GetMethodID(IID_Root, moRoot_Set);
66 p.mID = iOOPBase->ob_mRoot_Set;
67 p.attrList = attrList;
69 /* Call the Set() method on the object */
70 ReturnPtr ("OOP_SetAttrs", IPTR, OOP_DoMethod(object, (OOP_Msg)&p));
72 AROS_LIBFUNC_EXIT
73 } /* OOP_SetAttrs */