This patch adds some nicely weighty code for connecting to X displays
and managing those connections. Attaching devices will automatically
connect to their required X display. Removing all devices dependent
on a given X display connection will also disconnect from that
Xdisplay.
We decided to get rid of the C FFI for libs. It was becoming too intricate
and complicated. It was becoming a technical burden and expanding into
too much extra code. It's unfortunate, but we'll have to give up on getting
out-of-tree hot-loadable libraries the easy way.
It's possible to still do it with cross compilation or by keeping track
of the libstdc++ version that the running harikoff binary was compiled
against. Then we can ensure that our loadable lib code is linked against
that same libstdc++ code and this should ensure ABI stability.
We also had to write conversion constructors and so on to CSenseDeviceDesc.
The technical debt that's being piled up from this C FFI is excessive.
I think we'll end it here. API Libs will have to be written in C++
from now on. API Lib interfaces will be in C++.
We'll use cross compilers to ensure stability for out-of-tree lib
development.
* Renamed some of the Sense API lib classes
(CSensorDeviceDesc=>CSenseDeviceDesc,
SensorDeviceDesc=>SenseDeviceDesc).
* Moved SenseApiDesc into /include/user/senseApiDesc.
* Add conversion constructor to convert from SenseDeviceDesc
to
* Wireframe mlo_initializeInd to call xcb_connect().
* Add $(XCB_LIBS) to libxcbXorg_LDFLAGS.
* Wireframe mlo_attachDeviceReq().
Also, SenseApiDesc: initializeInd() now takes void. We no longer
try to pass a struct of marionette-role ops into the libs. We'll
be using message queueing for the handshake side of async calls now.
SenseApiDesc:
* Use a number count for num exported implexor APIs instead of
NULL-terminated list.
* Add sanity checker functions for structs.
SenseApiLib:
* Invoke the new sanity checkers on new Lib objects.
* SenseApiDesc is now a member object instead of being
pointed to.
SenseApiManager:
* loadSenseApiLib now calls the SenseApiDesc getter function.
* loadSenseApiLib now fills out the SenseApiLib class object.
New Sense API Mgmt Sub-API:
This sub-api (metalanguage, some might call it) is used to initialize
the lib's connection to the provider. After this call, the lib should
be ready to attach new devices to its provider on behalf of Hk.
* OptionsParser now has a singleton.
* We now use the cmdline opt -p <senseApiLibPath>, and search for
the specified library in:
* senseApiLibPath, then CWD, then the place where our executable
is running from, and then finally we let the hosting OS do
its own search.
* We now call dlsym() on dlopen()'d libs to to get the senseApiDescFn
pointer.