agent: Keep legacy interfaces for a few more releases
authorSamuel Ortiz <sameo@linux.intel.com>
Sun, 10 Nov 2013 23:17:19 +0000 (00:17 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 10 Nov 2013 23:19:26 +0000 (00:19 +0100)
Give ConnMan and BlueZ a few weeks to transition.

src/agent.c

index 168086b..34d9566 100644 (file)
@@ -810,6 +810,14 @@ int __near_agent_init(void)
                                                manager_methods,
                                                NULL, NULL, NULL, NULL);
 
+       /*
+        * Legacy interface, for backward compatibility only.
+        * To be removed after 0.16.
+        */
+       g_dbus_register_interface(connection, "/", "org.neard.Manager",
+                                               manager_methods,
+                                               NULL, NULL, NULL, NULL);
+
 
        ndef_app_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
                                                g_free, ndef_agent_free);
@@ -832,6 +840,12 @@ void __near_agent_cleanup(void)
        g_hash_table_destroy(ho_agent_hash);
        ho_agent_hash = NULL;
 
+       /*
+        * Legacy interface, for backward compatibility only.
+        * To be removed after 0.16.
+        */
+       g_dbus_unregister_interface(connection, "/", "org.neard.Manager");
+
        g_dbus_unregister_interface(connection, NFC_PATH,
                                                NFC_AGENT_MANAGER_INTERFACE);