2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
14 #include <aros/debug.h>
17 #include <libraries/commodities.h>
18 #include <proto/commodities.h>
20 AROS_LH2(LONG
, ActivateCxObj
,
24 AROS_LHA(CxObj
*, co
, A0
),
25 AROS_LHA(LONG
, true, D0
),
29 struct Library
*, CxBase
, 7, Commodities
)
33 Activates/deactivates a given commodity object. (An inactive object
34 doesn't perform its function on its input - it just passes it on to
35 the next object.) The activation depends on the value of 'true'; if
36 it's TRUE the object is activated, if it's FALSE it's deactivated.
37 All objects are created in the active state except for brokers;
38 remember to activate your broker when you have linked your other
43 co - a pointer to a commodity object
44 true - boolean telling whether the object should be activated or
49 The activation state of the object prior to the operation. (0 is
50 also returned if 'co' was NULL.)
66 ******************************************************************************/
73 D(bug("Enter ActivateCxObj(cxobj = %p, true = %d)\n", co
, true));
80 temp
= (co
->co_Flags
& COF_ACTIVE
);
84 co
->co_Flags
|= COF_ACTIVE
;
88 co
->co_Flags
&= ~COF_ACTIVE
;
91 if (co
->co_Node
.ln_Type
== CX_BROKER
)
93 BrokerCommand(NULL
, CXCMD_LIST_CHG
);
99 } /* ActivateCxObject */