Hey,

On Thu, Jul 26, 2018 at 6:08 PM, Colin Helliwell
<colin.helliw...@ln-systems.com> wrote:
> Apologies for hijacking the thread, but I also have a need to write a C++ app 
> to access certain MM 'status' info (IMIE, signal strength, etc).
> I can shell out to mmcli and awk/parse the response, but lib-based coding 
> would probably be more 'correct'. I was struggling though to get to grips 
> with how to use the MM/Glib APIs - are there any examples anywhere which will 
> show me how to get started in connecting and then drilling down through the 
> objects...?

Oh, please, don't do the mmcli path, that is extremely ugly and may
get broken at any time. The DBus API is stable, and so that is what
should be used; either via libmm-glib or with raw DBus operations.
The best example on how to use libmm-glib is mmcli itself; it provides
implementation of both async and sync operations, and it relies on
GLib's main loop logic.

-- 
Aleksander
https://aleksander.es
_______________________________________________
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Reply via email to