[Automotive] native apps & IPC

Jereme Lamothe jlamothe at docboxinc.com
Thu Oct 13 20:15:28 CEST 2016


I've continued investigating, and believe I have identified the cause.
Given two apps, one C++ / native and the other a QML file (still native,
using the launcher), different code paths are taken in nativeruntime.cpp in
the application manager. In NativeRuntime::onDBusPeerConnection, if
m_needsLauncher and m_launchWhenReady are true then
NativeRuntime::onLauncherFinishedInitialization() is called and all
extension interfaces are registered. My native C++ application doesn't
require a launcher, therefore those booleans are false, and the extension
interfaces are never registered.

Is this behavior intentional? The documentation for ApplicationInterface
led me to believe it would be possible to re-implement the client side,
such that I could continue to use ApplicationIPCInterface in my SystemUI.
Modifying NativeRuntime::onDBusPeerConnection() to, in the case of a native
C++ app, register all extension interfaces results in successful
communication on the peer DBus between my client and the system ui.

On Tue, Oct 11, 2016 at 5:58 PM Jereme Lamothe <jlamothe at docboxinc.com>
wrote:

> I'm attempting to get IPC working between the application manager and a
> native app. Per the documentation, I must re-implement the client side.
> I've written a C++ class to encapsulate the QDBusConnection /
> QDBusInterface I need and have deployed it as a plugin, allowing me to test
> the code in a QML app (launched by the application manager). This test
> worked, and I've confirmed that a dbus message from the QML app is received
> by the system UI / app manager. However, using this same code in a native
> app results in a "No such object path" error (sent by the appman process,
> in response to ). Seeing the documentation note about "remote interfaces
> are not available immediately after connecting", I've added a 5 second
> timer between connection and constructing the QDBusInterface, but to no
> effect.
>
> My question is, have I missed a step in re-implementing the client? I'm
> only creating a single QDBusInterface for my "com.DocBoxInc.Example" (path:
> "/ExtensionInterface/com_DocBoxInc_Example"), do I also need to connect to
> the ApplicationInterface & RuntimeInterface(s) for the /ExtensionInterface
> path to work?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/automotive/attachments/20161013/1f522189/attachment.html>


More information about the Automotive mailing list