Remove custom org.openbmc.Object.ObjectMapper
Use the standard freedesktop ObjectManager interface.
Moved gdbus OM export calls to the correct place so these
signals are emitted as expected by system_manager.py.
Python apps that use pyobmc are already emitting these
correctly.
Change system_manager.py to watch for the freedesktop
signal rather than the custom one.
Added an sd_bus OM to led_controller.
diff --git a/objects/button_power_obj.c b/objects/button_power_obj.c
index 8c5ebb8..e093a00 100644
--- a/objects/button_power_obj.c
+++ b/objects/button_power_obj.c
@@ -2,7 +2,6 @@
#include "interfaces/openbmc_intf.h"
#include "gpio.h"
#include "openbmc.h"
-#include "object_mapper.h"
/* ------------------------------------------------------------------------- */
static const gchar* dbus_object_path = "/org/openbmc/buttons";
@@ -94,10 +93,6 @@
object_skeleton_set_button(object, button);
g_object_unref(button);
- ObjectMapper* mapper = object_mapper_skeleton_new();
- object_skeleton_set_object_mapper(object, mapper);
- g_object_unref(mapper);
-
//define method callbacks
g_signal_connect(button,
"handle-is-on",
@@ -110,12 +105,10 @@
/* Export the object (@manager takes its own reference to @object) */
+ g_dbus_object_manager_server_set_connection(manager, connection);
g_dbus_object_manager_server_export(manager, G_DBUS_OBJECT_SKELETON(object));
g_object_unref(object);
- /* Export all objects */
- g_dbus_object_manager_server_set_connection(manager, connection);
-
// get gpio device paths
int rc = GPIO_OK;
do {
@@ -128,7 +121,6 @@
{
printf("ERROR PowerButton: GPIO setup (rc=%d)\n",rc);
}
- emit_object_added((GDBusObjectManager*)manager);
}
static void