diff options
author | Olliver Schinagl <o.schinagl@ultimaker.com> | 2015-06-19 05:34:04 (GMT) |
---|---|---|
committer | Olliver Schinagl <o.schinagl@ultimaker.com> | 2015-06-19 05:34:04 (GMT) |
commit | 967bb1469d76451e5b60d7d6faa99fa3a6c1f843 (patch) | |
tree | 1de418fc763f2d1c8ef54fba82510e9b708820cd /src | |
parent | 6c82fd8790d8f1f387d92972471dfe243de49285 (diff) | |
download | eulogium-967bb1469d76451e5b60d7d6faa99fa3a6c1f843.zip eulogium-967bb1469d76451e5b60d7d6faa99fa3a6c1f843.tar.gz eulogium-967bb1469d76451e5b60d7d6faa99fa3a6c1f843.tar.bz2 |
add network dbus connection
Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/eulogium.c | 11 | ||||
-rw-r--r-- | src/eulogium.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/eulogium.c b/src/eulogium.c index 48cb1df..d752a76 100644 --- a/src/eulogium.c +++ b/src/eulogium.c @@ -3316,6 +3316,17 @@ static int eulogium_dbus_init(struct eulogium_data *eulogium) EINA_LOG_WARN("Could not get dbus printer proxy."); return -EFAULT; } + + obj = eldbus_object_get(eulogium->dbus.conn, "nl.ultimaker.network", "/nl/ultimaker/network"); + if (!obj) { + EINA_LOG_WARN("Could not get nl.ultimaker.network object."); + return -EFAULT; + } + eulogium->dbus.proxy[NETWORK] = eldbus_proxy_get(obj, "nl.ultimaker"); + if (!eulogium->dbus.proxy[NETWORK]) { + EINA_LOG_WARN("Could not get dbus network proxy."); + return -EFAULT; + } /* First query the status and store it, we don't know the initial status, * and the statusChanged signal may not have been fired yet */ diff --git a/src/eulogium.h b/src/eulogium.h index d6eaf45..c516b27 100644 --- a/src/eulogium.h +++ b/src/eulogium.h @@ -66,6 +66,7 @@ struct printer_data { enum proxy_idx { PRINTER, + NETWORK, LED, LAST /* sentinel */ }; |