mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 15:22:20 +02:00
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:
committed by
Bhushan Shah
parent
3d076e8bc8
commit
dcb1a9a050
@@ -8,6 +8,7 @@
|
||||
#include "gpio.h"
|
||||
#include "manager.h"
|
||||
#include "mm-iface.h"
|
||||
#include "ofono-iface.h"
|
||||
#include "suspend.h"
|
||||
#include "udev.h"
|
||||
|
||||
@@ -35,6 +36,7 @@ static gboolean quit_app(struct EG25Manager *manager)
|
||||
|
||||
at_destroy(manager);
|
||||
mm_iface_destroy(manager);
|
||||
ofono_iface_destroy(manager);
|
||||
suspend_destroy(manager);
|
||||
udev_destroy(manager);
|
||||
|
||||
@@ -131,6 +133,14 @@ void modem_reset(struct EG25Manager *manager)
|
||||
if (manager->reset_timer)
|
||||
return;
|
||||
|
||||
/*
|
||||
* If we are managing the modem through lets say ofono, we should not
|
||||
* reset the modem based on the availability of USB ID
|
||||
* TODO: Improve ofono plugin and add support for fetching USB ID
|
||||
*/
|
||||
if (manager->modem_iface != MODEM_IFACE_MODEMMANAGER)
|
||||
return;
|
||||
|
||||
if (manager->modem_recovery_timer) {
|
||||
g_source_remove(manager->modem_recovery_timer);
|
||||
manager->modem_recovery_timer = 0;
|
||||
@@ -305,6 +315,7 @@ int main(int argc, char *argv[])
|
||||
at_init(&manager, toml_table_in(toml_config, "at"));
|
||||
gpio_init(&manager, toml_table_in(toml_config, "gpio"));
|
||||
mm_iface_init(&manager, toml_table_in(toml_config, "mm-iface"));
|
||||
ofono_iface_init(&manager);
|
||||
suspend_init(&manager, toml_table_in(toml_config, "suspend"));
|
||||
udev_init(&manager, toml_table_in(toml_config, "udev"));
|
||||
|
||||
|
Reference in New Issue
Block a user