Allow pre-processor pasting of plugin name
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 6 Dec 2008 17:13:04 +0000 (18:13 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 6 Dec 2008 17:13:04 +0000 (18:13 +0100)
14 files changed:
doc/plugin-api.txt
include/plugin.h
plugins/bluetooth.c
plugins/dhclient.c
plugins/ethernet.c
plugins/fake.c
plugins/ipv4.c
plugins/loopback.c
plugins/netdev.c
plugins/polkit.c
plugins/resolvconf.c
plugins/resolvfile.c
plugins/rtnllink.c
plugins/wifi.c

index baaea30..e329ced 100644 (file)
@@ -4,6 +4,7 @@ Plugin programming interface
 
 Plugin basics
 =============
+
 The Connection Manager supports plugins for various actions. The basic plugin
 contains of plugin description via CONNMAN_PLUGIN_DEFINE and also init/exit
 callbacks definied through that description.
@@ -19,5 +20,5 @@ static void example_exit(void)
 {
 }
 
-CONNMAN_PLUGIN_DEFINE("example", "Example plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(example, "Example plugin", VERSION,
                                                example_init, example_exit)
index 427ceed..587e9d7 100644 (file)
@@ -52,7 +52,7 @@ struct connman_plugin_desc {
  */
 #define CONNMAN_PLUGIN_DEFINE(name, description, version, init, exit) \
                struct connman_plugin_desc connman_plugin_desc = { \
-                       name, description, version, init, exit \
+                       #name, description, version, init, exit \
                };
 
 #ifdef __cplusplus
index 978f257..c09e4a5 100644 (file)
@@ -181,5 +181,5 @@ static void bluetooth_exit(void)
        dbus_connection_unref(connection);
 }
 
-CONNMAN_PLUGIN_DEFINE("bluetooth", "Bluetooth technology plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(bluetooth, "Bluetooth technology plugin", VERSION,
                                                bluetooth_init, bluetooth_exit)
index 7249773..3d6f189 100644 (file)
@@ -356,5 +356,5 @@ static void dhclient_exit(void)
        dbus_connection_unref(connection);
 }
 
-CONNMAN_PLUGIN_DEFINE("dhclient", "ISC DHCP client plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(dhclient, "ISC DHCP client plugin", VERSION,
                                                dhclient_init, dhclient_exit)
index bd2ddc2..28c1742 100644 (file)
@@ -267,5 +267,5 @@ static void ethernet_exit(void)
        connman_rtnl_unregister(&ethernet_rtnl);
 }
 
-CONNMAN_PLUGIN_DEFINE("ethernet", "Ethernet interface plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(ethernet, "Ethernet interface plugin", VERSION,
                                                ethernet_init, ethernet_exit)
index 74b32bc..33165da 100644 (file)
@@ -120,4 +120,4 @@ static void fake_exit(void)
        connman_driver_unregister(&fake_device_driver);
 }
 
-CONNMAN_PLUGIN_DEFINE("fake", "Tesing plugin", VERSION, fake_init, fake_exit)
+CONNMAN_PLUGIN_DEFINE(fake, "Tesing plugin", VERSION, fake_init, fake_exit)
index 0e38612..173c691 100644 (file)
@@ -236,5 +236,5 @@ static void ipv4_exit(void)
        connman_driver_unregister(&ipv4_driver);
 }
 
-CONNMAN_PLUGIN_DEFINE("ipv4", "IPv4 configuration plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(ipv4, "IPv4 configuration plugin", VERSION,
                                                        ipv4_init, ipv4_exit)
index 184ea73..29e6547 100644 (file)
@@ -104,5 +104,5 @@ static void loopback_exit(void)
 {
 }
 
-CONNMAN_PLUGIN_DEFINE("loopback", "Loopback device plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(loopback, "Loopback device plugin", VERSION,
                                                loopback_init, loopback_exit)
index d8733b7..226d633 100644 (file)
@@ -77,5 +77,5 @@ static void netdev_exit(void)
        connman_driver_unregister(&netdev_driver);
 }
 
-CONNMAN_PLUGIN_DEFINE("netdev", "Network device plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(netdev, "Network device plugin", VERSION,
                                                netdev_init, netdev_exit)
index 7bed0b1..a2e15a9 100644 (file)
@@ -159,5 +159,5 @@ static void polkit_exit(void)
        dbus_connection_unref(connection);
 }
 
-CONNMAN_PLUGIN_DEFINE("polkit", "PolicyKit authorization plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(polkit, "PolicyKit authorization plugin", VERSION,
                                                polkit_init, polkit_exit)
index f81d106..e1d5337 100644 (file)
@@ -114,5 +114,5 @@ static void resolvconf_exit(void)
        connman_driver_unregister(&resolvconf_driver);
 }
 
-CONNMAN_PLUGIN_DEFINE("resolvconf", "Name resolver plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(resolvconf, "Name resolver plugin", VERSION,
                                        resolvconf_init, resolvconf_exit)
index 54ad41b..deb39c9 100644 (file)
@@ -95,5 +95,5 @@ static void resolvfile_exit(void)
        connman_driver_unregister(&resolvfile_driver);
 }
 
-CONNMAN_PLUGIN_DEFINE("resolvfile", "Name resolver plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(resolvfile, "Name resolver plugin", VERSION,
                                        resolvfile_init, resolvfile_exit)
index 094547d..da5a588 100644 (file)
@@ -167,5 +167,5 @@ static void rtnllink_exit(void)
        device_list = NULL;
 }
 
-CONNMAN_PLUGIN_DEFINE("rtnllink", "RTNL link detection plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(rtnllink, "RTNL link detection plugin", VERSION,
                                                rtnllink_init, rtnllink_exit)
index 0ae20f5..7d17ae2 100644 (file)
@@ -507,5 +507,5 @@ static void wifi_exit(void)
        dbus_connection_unref(connection);
 }
 
-CONNMAN_PLUGIN_DEFINE("wifi", "WiFi interface plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(wifi, "WiFi interface plugin", VERSION,
                                                        wifi_init, wifi_exit)