src: add ofono-iface

Start work on new ofono interface. So far, this detects ofono on dbus
and complains if both mm and ofono are running.
This commit is contained in:
Oliver Smith
2021-02-08 10:29:56 +05:30
committed by Bhushan Shah
parent 3d076e8bc8
commit dcb1a9a050
6 changed files with 98 additions and 0 deletions

View File

@@ -163,6 +163,12 @@ static void mm_appeared_cb(GDBusConnection *connection,
{
g_message("ModemManager appeared on D-Bus");
if (manager->modem_iface != MODEM_IFACE_NONE) {
g_critical("Modem interface already found! Make sure to only run either of ModemManager or oFono.");
return;
}
manager->modem_iface = MODEM_IFACE_MODEMMANAGER;
mm_manager_new(connection, G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE,
NULL, (GAsyncReadyCallback)mm_manager_new_cb, manager);
}