5 * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 #define CONNMAN_API_SUBJECT_TO_CHANGE
33 #include <connman/plugin.h>
34 #include <connman/device.h>
35 #include <connman/log.h>
41 static int hso_probe(struct connman_device *device)
43 struct hso_data *data;
45 DBG("device %p", device);
47 data = g_try_new0(struct hso_data, 1);
51 data->index = connman_device_get_index(device);
53 connman_device_set_data(device, data);
58 static void hso_remove(struct connman_device *device)
60 struct hso_data *data = connman_device_get_data(device);
62 DBG("device %p", device);
64 connman_device_set_data(device, NULL);
69 static int hso_enable(struct connman_device *device)
71 DBG("device %p", device);
73 connman_device_set_powered(device, TRUE);
78 static int hso_disable(struct connman_device *device)
80 DBG("device %p", device);
82 connman_device_set_powered(device, FALSE);
87 static struct connman_device_driver hso_driver = {
89 .type = CONNMAN_DEVICE_TYPE_HSO,
93 .disable = hso_disable,
96 static int hso_init(void)
98 return connman_device_driver_register(&hso_driver);
101 static void hso_exit(void)
103 connman_device_driver_unregister(&hso_driver);
106 CONNMAN_PLUGIN_DEFINE(hso, "Option HSO device plugin", VERSION,
107 CONNMAN_PLUGIN_PRIORITY_DEFAULT, hso_init, hso_exit)