I'm fiddling with commodities.library. I'm new to this library I'm still discovering its features.
Now my problem is that I want an independent program to show the GUI of one of my commodity. For this I've understood that I can create another CxBroker with the same internal name and be sure that my running cxBroker has NBU_UNIQUE set and the new one NBU_NOTIFY. That's ok and it works great.
Now my problem is that my running cxBroker can have different names depending on the associated hardware (this way in Exchange it appears with the hardware name, rather than with a generic name). Nothing in the autodocs, but in the interface I spotted a CopyBrokerList() method which is not described in the autodocs. It does exactly what I was looking for (at least it seems to), except that I don't know the node structure it's returning.
So for now I'm just using the node name and then try to create a CxBroker with that name. It works but I'm almost sure CopyBrokerList does not return a plain struct Node but an extended structure in which I would find a way (MsgPort ?) to directly send a CXCMD_APPEAR without trying to recreate a broker with the same name. Would be cool if CopyBrokerList() was documented in the autodocs.
In the end what I was looking for (which does not seem to exist) is a way to find a commodity by it's internal name and then be able to send to this broker some messages through its message port. If this is considered as hazardous a ControlBroker(CONST_STRPTR brokerName, uint32 cxCmd) would do the job keeping internals of commodities.library private and at the same time allowing to send one of CXCMD_XXXXX command to an existing broker identified by its name.
AmigaOne X1000 running AOS 4 beta
Amiga 1200/PPC 603e + BVision PPC