(01-05-2021, 11:51 AM)Lousy Fisherman Wrote:(01-05-2021, 11:02 AM)kop316 Wrote: So it seems that in order for an mmsd plugin to talk to modem manager, all of the dbus interfaces from within that plugin have to be rewritten to target dbus-2.0 vs dbus 1.0. I made a "wip branch" with the hopes of updating the dbus interfaces from within simple.c to dbus-2.0:I've been hacking on DBus on the PPhone for a month or 2 (or 100 it seems) now. What do you need?
https://source.puri.sm/kop316/mmsd/-/tree/wip
If there is anyone with experience in dbus, I would really appreciate help from them!
I'm using python and shell
LF
You are amazing!
Here is the original plugin code: https://source.puri.sm/kop316/mmsd/-/blo...s/simple.c
And the WIP code: https://source.puri.sm/kop316/mmsd/-/blo...s/simple.c
All I have done so far is comment out the old code and add in the dbus2.0 libraries at the top. However, everything that is commented needs to be changed to support dbus-2.0 instead of dbus-1.0.
I am working from this code as a reference: https://gitlab.gnome.org/GNOME/glib/-/blob/master/gio/tests/gdbus-example-server.c
Right now I cannot get the reference code to compile as a stand alone, so I am working on that so I can understand how it is run.
EDIT: I am finally able to compile the example-server with
Code:
gcc -Wall -o gdbus-example-server gdbus-example-server.c $(pkg-config --cflags --libs glib-2.0 gio-2.0)
I added those guts to simple.c in the "wip" branch, but to get it to compile and run, you must manually add "-lgio-2.0 -lglib-2.0 -lgobject-2.0" to LDFLAGS in the makefile.