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/notifier.h>
29 #include <connman/log.h>
31 static void iospm_device_enabled(enum connman_device_type type,
32 connman_bool_t enabled)
34 DBG("type %d enabled %d", type, enabled);
37 static void iospm_offline_mode(connman_bool_t enabled)
39 DBG("enabled %d", enabled);
42 static struct connman_notifier iospm_notifier = {
44 .priority = CONNMAN_NOTIFIER_PRIORITY_DEFAULT,
45 .device_enabled = iospm_device_enabled,
46 .offline_mode = iospm_offline_mode,
49 static int iospm_init(void)
51 return connman_notifier_register(&iospm_notifier);
54 static void iospm_exit(void)
56 connman_notifier_unregister(&iospm_notifier);
59 CONNMAN_PLUGIN_DEFINE(ospm, "Intel OSPM notification plugin", VERSION,
60 CONNMAN_PLUGIN_PRIORITY_DEFAULT, iospm_init, iospm_exit)