summaryrefslogtreecommitdiffstats
path: root/src/network.c
diff options
context:
space:
mode:
authorOlliver Schinagl <o.schinagl@ultimaker.com>2015-07-06 05:49:50 (GMT)
committerOlliver Schinagl <o.schinagl@ultimaker.com>2015-07-06 12:07:31 (GMT)
commit0ab6f4f9f4c2af88e4bbd10b0e11b1516577d319 (patch)
treebe0e67637b190e5c930f93a80a343f8e0d5c8b44 /src/network.c
parentf217213dccab10e8af0953f48a7671855326c871 (diff)
downloadeulogium-0ab6f4f9f4c2af88e4bbd10b0e11b1516577d319.zip
eulogium-0ab6f4f9f4c2af88e4bbd10b0e11b1516577d319.tar.gz
eulogium-0ab6f4f9f4c2af88e4bbd10b0e11b1516577d319.tar.bz2
archival commitHEADmaster
Diffstat (limited to 'src/network.c')
-rw-r--r--src/network.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/network.c b/src/network.c
new file mode 100644
index 0000000..20f3aae
--- /dev/null
+++ b/src/network.c
@@ -0,0 +1,38 @@
+/*
+ * functions and data types for networking calls
+ *
+ * Copyright (c) 2015 Ultimaker B.V.
+ * Author: Olliver Schinagl <o.schinagl@ultimaker.com>
+ *
+ * SPDX-License-Identifier: AGPL-3.0+
+ */
+
+#include <Eldbus.h>
+
+#include "dbus_common.h"
+#include "network.h"
+
+#define _TECH_ETHERNET "ethernet"
+#define _TECH_WIFI "wifi"
+
+static Eldbus_Proxy *__proxy;
+
+Eldbus_Pending *network_connect_wifi(const struct network_data *network)
+{
+ if (!network)
+ return NULL;
+ if (!network->obj_path)
+ return NULL;
+
+ return eldbus_proxy_call(__proxy, "connectWifiNetwork", on_method_generic_bool_ret, "connectWifiNetwork", -1, "o", network->obj_path);
+}
+
+void network_init(Eldbus_Proxy *proxy)
+{
+ __proxy = proxy;
+};
+
+void network_shutdown(void)
+{
+ eldbus_proxy_unref(__proxy);
+};