From: Marcel Holtmann Date: Fri, 1 Oct 2010 07:27:44 +0000 (+0200) Subject: build: Remove no longer needed plugins/usbpnmodem.c X-Git-Tag: 0.31~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9e901a5ee340e8083122a14778cc9267e39d387;p=platform%2Fupstream%2Fofono.git build: Remove no longer needed plugins/usbpnmodem.c --- diff --git a/plugins/usbpnmodem.c b/plugins/usbpnmodem.c deleted file mode 100644 index b314dba..0000000 --- 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 -#endif - -#include -#include -#include -#include -#include - -#include -#include - -#define OFONO_API_SUBJECT_TO_CHANGE -#include -#include -#include - -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 */ - 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)