Hi everyone, One of the things that came up during the NM/MM BoF during the Desktop Summit was about the possibility of having a C library (libmm-glib? [1]) which will enable easy access to ModemManager info in GLib-based applications.
I'm looking into preparing a "ModemManager.h" with common types and symbols, so that the daemon, the new libmm-glib library and the additional users of the DBus API can all use it. This approach is already being used in NetworkManager (if I'm not mistaken), which exposes a "NetworkManager.h" header file (not auto-generated), containing symbols and types used by the daemon and libnm-glib. Currently, in ModemManager we auto-generate the header for the C-based DBus clients in "include/mm-modem.h", but the daemon itself doesn't use it. This header is generated applying a XSLT to the DBus XML APIs under introspection/, but for example doesn't define enum types, just #defines for every symbol. For the C-based user of the DBus API, these defines are possibly enough, but it would be great to instead get proper enum types which can be used both internally in the daemon and externally in the libmm-glib API. A common header for all the types will help in avoiding the need for updating internal enums and external enums in different places. Another option would be to get libmm-glib re-define all the types using a library-specific prefix (e.g, "LmmModemState" vs "MMModemState"), but I don't think that rewriting the same types in three different places makes much sense... So, what about having a common "ModemManager.h", and making the daemon use it as well? I have mixed feelings on whether it makes sense to have it auto-generated from the DBus API XMLs, anyway, as we want it to be used also internally; so I would propose to have it manually maintained, just as "NetworkManager.h" Comments? [1] WIP in the 'libmm' branch in the following git repo, right now using gdbus and the stable DBus API: git://gitorious.org/aleksander/modemmanager.git -- Aleksander _______________________________________________ networkmanager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
