summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-10-01 09:27:44 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-10-01 09:27:44 +0200
commite9e901a5ee340e8083122a14778cc9267e39d387 (patch)
tree008c2f8c3b777ce1e0d9471ecd2a3ca4b1dc1825 /plugins
parent6ce4f462731eedfaee38673e593d7357cf2c7821 (diff)
downloadofono-e9e901a5ee340e8083122a14778cc9267e39d387.tar.bz2
build: Remove no longer needed plugins/usbpnmodem.c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/usbpnmodem.c104
1 files changed, 0 insertions, 104 deletions
diff --git a/plugins/usbpnmodem.c b/plugins/usbpnmodem.c
deleted file mode 100644
index b314dbac..00000000
--- a/plugins/usbpnmodem.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * oFono - Open Source Telephony
- *
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-
-#include <gisi/netlink.h>
-#include <gisi/client.h>
-
-#define OFONO_API_SUBJECT_TO_CHANGE
-#include <ofono/plugin.h>
-#include <ofono/log.h>
-#include <ofono/modem.h>
-
-static GPhonetNetlink *link = NULL;
-
-/*
- * Add or remove isimodems
- * when usbpn* phonet interfaces are added/removed
- */
-static void usbpn_status_cb(GIsiModem *idx,
- GPhonetLinkState st,
- char const ifname[],
- void *data)
-{
- struct ofono_modem *modem;
- int error;
-
- DBG("Phonet link %s (%u) is %s",
- ifname, g_isi_modem_index(idx),
- st == PN_LINK_REMOVED ? "removed" :
- st == PN_LINK_DOWN ? "down" : "up");
-
- /* Expect phonet interface name usbpn<idx> */
- if (strncmp(ifname, "usbpn", 5) ||
- ifname[5 + strspn(ifname + 5, "0123456789")])
- return;
-
- if (st == PN_LINK_REMOVED)
- return;
-
- if (g_pn_netlink_by_modem(idx)) {
- DBG("Modem for interface %s already exists", ifname);
- return;
- }
-
- error = g_pn_netlink_set_address(idx, PN_DEV_PC);
- if (error && error != -EEXIST) {
- DBG("g_pn_netlink_set_address: %s\n", strerror(-error));
- return;
- }
-
- modem = ofono_modem_create(NULL, "isimodem");
- if (!modem)
- return;
-
- ofono_modem_set_string(modem, "Interface", ifname);
-
- if (ofono_modem_register(modem) == 0)
- DBG("Done regging modem %s", ofono_modem_get_path(modem));
- else
- ofono_modem_remove(modem);
-}
-
-static int usbpn_init(void)
-{
- link = g_pn_netlink_start(NULL, usbpn_status_cb, NULL);
- return 0;
-}
-
-static void usbpn_exit(void)
-{
- g_pn_netlink_stop(link);
- link = NULL;
-}
-
-OFONO_PLUGIN_DEFINE(usbpnmodem, "Hotplug driver for USB Phonet modems", VERSION,
- OFONO_PLUGIN_PRIORITY_DEFAULT,
- usbpn_init, usbpn_exit)