5 * Copyright (C) 2007-2009 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
26 #define CONNMAN_API_SUBJECT_TO_CHANGE
27 #include <connman/plugin.h>
28 #include <connman/device.h>
29 #include <connman/log.h>
33 static int huawei_probe(struct connman_device *device)
35 DBG("device %p", device);
40 static void huawei_remove(struct connman_device *device)
42 DBG("device %p", device);
45 static int huawei_enable(struct connman_device *device)
47 DBG("device %p", device);
49 connman_device_set_powered(device, TRUE);
54 static int huawei_disable(struct connman_device *device)
56 DBG("device %p", device);
58 connman_device_set_powered(device, FALSE);
63 static struct connman_device_driver huawei_driver = {
64 .name = "huawei-device",
65 .type = CONNMAN_DEVICE_TYPE_HUAWEI,
66 .probe = huawei_probe,
67 .remove = huawei_remove,
68 .enable = huawei_enable,
69 .disable = huawei_disable,
72 static int huawei_init(void)
74 return connman_device_driver_register(&huawei_driver);
77 static void huawei_exit(void)
79 connman_device_driver_unregister(&huawei_driver);
82 CONNMAN_PLUGIN_DEFINE(huawei, "HUAWEI Mobile device plugin", VERSION,
83 huawei_init, huawei_exit)