Single-character booster types could potentially conflict when
using out-of-tree boosters, and quickly become confusing.
Old types are mapped for compatibility.
This is a compatibility-breaking change with boosters. The socketId
field is now expected to be a socket name, not a path. Sockets are
placed under ${XDG_RUNTIME_DIR}/mapplauncherd/, defaulting to /tmp/.
Invoker currently expects sockets in that path and named 'booster-X'
where X is the single character booster type. That is expected to
change when types are refactored to use full strings.
Having a single applauncherd process with boosters as plugins is a
flawed idea: most notably, it's not possible to have two boosters with
conflicting libraries, like Qt4 and Qt5.
A much cleaner solution is to turn libapplauncherd into a support
library for boosters, and have each booster run as an independent
process.
XDG_RUNTIME_DIR is tmpfs where HOME is just normal filesystem. We can avoid
some write operations to emmc when we do move these to tmpfs. Also
these files are something that should be reset on each boot anyway.
Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
EventHandler is only used by qdeclarativebooster and its derivatives
at the moment. It can't be included in libapplauncherd, because of the
Qt dependency, but it needs to be available for out-of-tree plugins.
Putting it into libmdeclarativecache seems like the most reasonable
option at present.
After receiving a signal, a pipe is written, which is polled by select.
As of ac1ed61, that pipe is never read, causing the select() to
repeatedly trigger and use 100% CPU after receiving any signal that
doesn't cause the process to terminate.
Partial revert of ac1ed61, plus a one-line fix for the select() fd set
Harmattan patched Qt to add support for this magical boosted application stuff,
but we do not have that patch (and I am not sure we want it...), so for the
time being, patch it out.