Ejemplo n.º 1
0
gint
main(gint argc, gchar *argv[])
{
    GMainLoop *loop;
    ObjectSkeleton *newobject;

    newobject = object_skeleton_new(object_name);

    guint id;
    loop = g_main_loop_new(NULL, FALSE);

    id = g_bus_own_name(DBUS_TYPE,
            dbus_name,
            G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT |
            G_BUS_NAME_OWNER_FLAGS_REPLACE,
            on_bus_acquired,
            on_name_acquired,
            on_name_lost,
            newobject,
            NULL);

    g_main_loop_run(loop);

    g_bus_unown_name(id);
    g_object_unref(newobject);
    g_main_loop_unref(loop);
    return 0;
}
Ejemplo n.º 2
0
static void 
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
	ObjectSkeleton *object;
	//g_print ("Acquired a message bus connection: %s\n",name);
 	cmdline *cmd = user_data;
	if (cmd->argc < 2)
	{
		g_print("No objects created.  Put object name(s) on command line\n");
		return;
	}	
  	manager = g_dbus_object_manager_server_new (dbus_object_path);
  	int i=0;
	gchar *s;
	s = g_strdup_printf ("%s/%s",dbus_object_path,cmd->argv[1]);
	object = object_skeleton_new (s);
	g_free (s);

	Button* button = button_skeleton_new ();
	object_skeleton_set_button (object, button);
	g_object_unref (button);

	//define method callbacks
	g_signal_connect (button,
                   "handle-is-on",
                   G_CALLBACK (on_is_on),
                   NULL); /* user_data */
	g_signal_connect (button,
                    "handle-sim-button-press",
                    G_CALLBACK (on_button_press),
                    NULL); /* user_data */

		
	/* Export the object (@manager takes its own reference to @object) */
	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 {
		rc = gpio_init(connection,&gpio_button);
		if (rc != GPIO_OK) { break; }
		rc = gpio_open_interrupt(&gpio_button,on_button_interrupt,object);
		if (rc != GPIO_OK) { break; }
	} while(0);
	if (rc != GPIO_OK)
	{
		printf("ERROR PowerButton: GPIO setup (rc=%d)\n",rc);
	} 

}
Ejemplo n.º 3
0
static void
on_bus_acquired(GDBusConnection *connection,
		const gchar *name,
		gpointer user_data)
{
	cmdline *cmd = user_data;
	if(cmd->argc < 4)
	{
		g_print("flasher [flash name] [filename] [source object]\n");
		g_main_loop_quit(cmd->loop);
		return;
	}
	printf("Starting flasher: %s,%s,%s,\n",cmd->argv[1],cmd->argv[2],cmd->argv[3]);
	ObjectSkeleton *object;
	manager = g_dbus_object_manager_server_new(dbus_object_path);
	gchar *s;
	s = g_strdup_printf("%s/%s",dbus_object_path,cmd->argv[1]);

	object = object_skeleton_new(s);
	g_free(s);

	FlashControl* flash_control = flash_control_skeleton_new();
	object_skeleton_set_flash_control(object, flash_control);
	g_object_unref(flash_control);

	/* Export the object (@manager takes its own reference to @object) */
	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);
	bool bmc_flash = false;
	uint32_t address = 0;
	if(strcmp(cmd->argv[1],"bmc")==0) {
		bmc_flash = true;
	}
	if(strcmp(cmd->argv[1],"bmc_ramdisk")==0) {
		bmc_flash = true;
		address = 0x20300000;
	}
	if(strcmp(cmd->argv[1],"bmc_kernel")==0) {
		bmc_flash = true;
		address = 0x20080000;
	}

	int rc = flash(flash_control,bmc_flash,address,cmd->argv[2],cmd->argv[3]);
	if(rc) {
		flash_message(connection,cmd->argv[3],"error","Flash Error");
	} else {
		flash_message(connection,cmd->argv[3],"done","");
	}

	//Object exits when done flashing
	g_main_loop_quit(cmd->loop);
}
Ejemplo n.º 4
0
static void 
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
	ObjectSkeleton *object;
	//g_print ("Acquired a message bus connection: %s\n",name);
 	cmdline *cmd = user_data;
	if (cmd->argc < 2)
	{
		g_print("No objects created.  Put object name(s) on command line\n");
		return;
	}	
  	manager = g_dbus_object_manager_server_new (dbus_object_path);
  	int i=0;
  	for (i=1;i<cmd->argc;i++)
  	{
		gchar *s;
		s = g_strdup_printf ("%s/%s",dbus_object_path,cmd->argv[i]);
		object = object_skeleton_new (s);
		g_free (s);
		ControlHost* control_host = control_host_skeleton_new ();
		object_skeleton_set_control_host (object, control_host);
		g_object_unref (control_host);

		Control* control = control_skeleton_new ();
		object_skeleton_set_control (object, control);
		g_object_unref (control);

		//define method callbacks here
		g_signal_connect (control_host,
                  "handle-boot",
                  G_CALLBACK (on_boot),
                  object); /* user_data */

		g_signal_connect (control,
                  "handle-init",
                  G_CALLBACK (on_init),
                  NULL); /* user_data */

		/* Export the object (@manager takes its own reference to @object) */
		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);
	
	gpio_init(connection,&fsi_data);
	gpio_init(connection,&fsi_clk);
	gpio_init(connection,&fsi_enable);
	gpio_init(connection,&cronus_sel);

}
Ejemplo n.º 5
0
static void 
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
  	cmdline *cmd = user_data;
  	manager = g_dbus_object_manager_server_new (dbus_object_path);
		gchar *s;
 		s = g_strdup_printf ("%s/%s",dbus_object_path,instance_name);
		ObjectSkeleton *object = object_skeleton_new (s);
		g_free (s);

		Watchdog *wd = watchdog_skeleton_new ();
  		object_skeleton_set_watchdog (object, wd);
  		g_object_unref (wd);

		ObjectMapper* mapper = object_mapper_skeleton_new ();
		object_skeleton_set_object_mapper (object, mapper);
		g_object_unref (mapper);
		
  		// set properties
  		watchdog_set_watchdog(wd,1);
		
		//define method callbacks here
 		g_signal_connect (wd,
                    "handle-start",
                    G_CALLBACK (on_start),
                    object); /* user_data */
 
 		g_signal_connect (wd,
                    "handle-poke",
                    G_CALLBACK (on_poke),
                    object); /* user_data */

        g_signal_connect (wd,
                    "handle-stop",
                    G_CALLBACK (on_stop),
                    object); /* user_data */

        g_signal_connect (wd,
                    "handle-set",
                    G_CALLBACK (set_poll_interval),
                    object); /* user_data */

  		/* Export the object (@manager takes its own reference to @object) */
  		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);
  emit_object_added((GDBusObjectManager*)manager); 
}
Ejemplo n.º 6
0
static void
on_bus_acquired(GDBusConnection *connection,
		const gchar *name,
		gpointer user_data)
{
	ObjectSkeleton *object;
	//g_print ("Acquired a message bus connection: %s\n",name);
	manager = g_dbus_object_manager_server_new(dbus_object_path);

	gchar *s;
	s = g_strdup_printf("%s/%s",dbus_object_path,instance_name);
	object = object_skeleton_new(s);
	g_free(s);

	ControlHost* control_host = control_host_skeleton_new();
	object_skeleton_set_control_host(object, control_host);
	g_object_unref(control_host);

	Control* control = control_skeleton_new();
	object_skeleton_set_control(object, control);
	g_object_unref(control);

	//define method callbacks here
	g_signal_connect(control_host,
			"handle-boot",
			G_CALLBACK(on_boot),
			object); /* user_data */
	g_signal_connect(control,
			"handle-init",
			G_CALLBACK(on_init),
			NULL); /* user_data */

	control_host_set_debug_mode(control_host,0);
	control_host_set_flash_side(control_host,"primary");

	/* 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);

	gpio_init(connection,&fsi_data);
	gpio_init(connection,&fsi_clk);
	gpio_init(connection,&fsi_enable);
	gpio_init(connection,&cronus_sel);
	gpio_init(connection,&Throttle);
	gpio_init(connection,&idbtn);
}
Ejemplo n.º 7
0
static void
on_bus_acquired(GDBusConnection *connection,
		const gchar *name,
		gpointer user_data)
{
	ObjectSkeleton *object;

	cmdline *cmd = user_data;

	manager = g_dbus_object_manager_server_new(dbus_object_path);
	int i = 0;
	for(i=0;i<NUM_HWMONS;i++)
	{
		if(!is_hwmon_valid(&hwmons[i])) { continue; }
		gchar *s;
		s = g_strdup_printf("%s/%s",dbus_object_path,hwmons[i].name);
		object = object_skeleton_new(s);
		g_free(s);

		Hwmon *hwmon = hwmon_skeleton_new();
		object_skeleton_set_hwmon(object, hwmon);
		g_object_unref(hwmon);

		SensorValue *sensor = sensor_value_skeleton_new();
		object_skeleton_set_sensor_value(object, sensor);
		g_object_unref(sensor);

		hwmon_set_sysfs_path(hwmon,hwmons[i].filename);
		hwmon_set_scale(hwmon,hwmons[i].scale);
		sensor_value_set_units(sensor,hwmons[i].units);

		//define method callbacks here
		g_signal_connect(sensor,
				"handle-set-value",
				G_CALLBACK(on_set_value),
				object); /* user_data */


		if(hwmons[i].poll_interval > 0) {
			g_timeout_add(hwmons[i].poll_interval, poll_hwmon, object);
		}
		/* 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);
	}
}
Ejemplo n.º 8
0
static void 
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
  	//g_print ("Acquired a message bus connection: %s\n",name);

  	cmdline *cmd = user_data;
	if (cmd->argc < 2)
	{
		g_print("No objects created.  Put object name(s) on command line\n");
		return;
	}	
  	manager = g_dbus_object_manager_server_new (dbus_object_path);
  	int i=0;
  	for (i=1;i<cmd->argc;i++)
  	{
		gchar *s;
 		s = g_strdup_printf ("%s/%s",dbus_object_path,cmd->argv[i]);
		ObjectSkeleton *object = object_skeleton_new (s);
		g_free (s);

		Fan *fan = fan_skeleton_new ();
  		object_skeleton_set_fan (object, fan);
  		g_object_unref (fan);
		
  		//define method callbacks here
  		g_signal_connect (fan,
                    "handle-get-speed",
                    G_CALLBACK (on_get_speed),
                    NULL); /* user_data */
  		g_signal_connect (fan,
                    "handle-set-speed",
                    G_CALLBACK (on_set_speed),
                    NULL); /* user_data */

		//g_timeout_add(poll_interval, poll_sensor, object);

  		/* Export the object (@manager takes its own reference to @object) */
  		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);
}
Ejemplo n.º 9
0
static void
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
	ObjectSkeleton *object;
 	cmdline *cmd = user_data;
  	manager = g_dbus_object_manager_server_new (dbus_object_path);

	gchar *s;
	s = g_strdup_printf ("%s/%s",dbus_object_path,instance_name);
	object = object_skeleton_new (s);
	g_free (s);

	ControlBmc* control_bmc = control_bmc_skeleton_new ();
	object_skeleton_set_control_bmc (object, control_bmc);
	g_object_unref (control_bmc);

	Control* control = control_skeleton_new ();
	object_skeleton_set_control (object, control);
	g_object_unref (control);

	//define method callbacks here
	g_signal_connect (control,
       	            "handle-init",
               	    G_CALLBACK (on_init),
               	    NULL); /* user_data */


	g_signal_connect (control_bmc,
		"handle-warm-reset",
		G_CALLBACK (on_warm_reset),
		NULL); /* user_data */

	/* Export the object (@manager takes its own reference to @object) */
	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);

	//TODO:  This is a bad hack to wait for object to be on bus
	//sleep(1);
	cmd->user_data = object;
	//g_idle_add(go,cmd);
}
Ejemplo n.º 10
0
/*
** DBus method call: "InstanceReady" -- Called from an instance
**  - Create an instance interface in the manager bus
**  - Watch the instance bus
*/
static gboolean on_handle_instance_ready(WarfacebotMngr *wbm,
                                         GDBusMethodInvocation *invocation,
                                         const gchar *Nickname,
                                         const gchar *Server,
                                         const gchar *BusName)
{
    ObjectSkeleton *skeleton = NULL;
    WarfacebotMngrInstance *wbi = NULL;
    struct watch_instance *watch = NULL;

    if (!g_dbus_is_name(BusName))
    {
        g_dbus_method_invocation_return_dbus_error(
            invocation,
            "org.freedesktop.DBus.Error.ServiceUnknown",
            "Invalid BusName");
        return FALSE;
    }

    g_print("Notification from instance: %s\n", BusName);

    watch = g_new0(struct watch_instance, 1);

    watch->name = g_strdup(BusName);
    watch->path = g_strdup_printf(API_MNGR_PATH "/%03d", ++uniq_id);
    skeleton = object_skeleton_new(watch->path);

    wbi = warfacebot_mngr_instance_skeleton_new();

    warfacebot_mngr_instance_set_nickname(wbi, Nickname);
    warfacebot_mngr_instance_set_server(wbi, Server);
    warfacebot_mngr_instance_set_bus_name(wbi, BusName);
    warfacebot_mngr_instance_set_starttime(wbi, time(NULL));

    object_skeleton_set_warfacebot_mngr_instance(skeleton, wbi);

    g_dbus_object_manager_server_export(
        manager,
        G_DBUS_OBJECT_SKELETON (skeleton));

    g_object_unref(skeleton);

    create_service_file(BusName, Nickname, Server);

    watch->id = g_bus_watch_name(
        G_BUS_TYPE_SESSION,
        BusName,
        G_BUS_NAME_WATCHER_FLAGS_AUTO_START,
        on_instance_name_appeared,
        on_instance_name_vanished,
        watch,
        NULL);

    g_print("Watching instance: %s\n", BusName);

    warfacebot_mngr_complete_instance_ready(
        wbm,
        invocation);

    return TRUE;
}
Ejemplo n.º 11
0
static void
on_bus_acquired(GDBusConnection *connection,
		const gchar *name,
		gpointer user_data)
{
	ObjectSkeleton *object;
	cmdline *cmd = user_data;
	if(cmd->argc < 3)
	{
		g_print("Usage: power_control.exe [poll interval] [timeout]\n");
		return;
	}
	manager = g_dbus_object_manager_server_new(dbus_object_path);
	gchar *s;
	s = g_strdup_printf("%s/%s",dbus_object_path,instance_name);
	object = object_skeleton_new(s);
	g_free(s);

	ControlPower* control_power = control_power_skeleton_new();
	object_skeleton_set_control_power(object, control_power);
	g_object_unref(control_power);

	Control* control = control_skeleton_new();
	object_skeleton_set_control(object, control);
	g_object_unref(control);

	//define method callbacks here
	g_signal_connect(control_power,
			"handle-set-power-state",
			G_CALLBACK(on_set_power_state),
			object); /* user_data */

	g_signal_connect(control_power,
			"handle-get-power-state",
			G_CALLBACK(on_get_power_state),
			NULL); /* user_data */

	g_signal_connect(control,
			"handle-init",
			G_CALLBACK(on_init),
			object); /* user_data */


	/* 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);

	// get gpio device paths
	int rc = GPIO_OK;
	do {
		rc = gpio_init(connection,&power_pin);
		if(rc != GPIO_OK) { break; }
		rc = gpio_init(connection,&pgood);
		if(rc != GPIO_OK) { break; }
		rc = gpio_init(connection,&pcie_reset);
		if(rc != GPIO_OK) { break; }
		rc = gpio_init(connection,&usb_reset);
		if(rc != GPIO_OK) { break; }

		uint8_t gpio;
		rc = gpio_open(&pgood);
		if(rc != GPIO_OK) { break; }
		rc = gpio_read(&pgood,&gpio);
		if(rc != GPIO_OK) { break; }
		gpio_close(&pgood);
		control_power_set_pgood(control_power,gpio);
		control_power_set_state(control_power,gpio);
		printf("Pgood state: %d\n",gpio);

	} while(0);
	if(rc != GPIO_OK)
	{
		printf("ERROR PowerControl: GPIO setup (rc=%d)\n",rc);
	}
	//start poll
	pgood_timeout_start = 0;
	int poll_interval = atoi(cmd->argv[1]);
	int pgood_timeout = atoi(cmd->argv[2]);
	if(poll_interval < 1000 || pgood_timeout <5) {
		printf("ERROR PowerControl: poll_interval < 1000 or pgood_timeout < 5\n");
	} else {
		control_set_poll_interval(control,poll_interval);
		control_power_set_pgood_timeout(control_power,pgood_timeout);
		g_timeout_add(poll_interval, poll_pgood, object);
	}
}
Ejemplo n.º 12
0
static void
on_bus_acquired(GDBusConnection *connection,
		const gchar *name,
		gpointer user_data)
{
	ObjectSkeleton *object;
	cmdline *cmd = user_data;
	manager = g_dbus_object_manager_server_new(dbus_object_path);
	int i=0;

	//TODO: don't use fixed buffer
	char flasher_path[512];
	memset(flasher_path, '\0', sizeof(flasher_path));
	gchar *flasher_file = NULL;
	int c = strlen(cmd->argv[0]);
	while(c>0)
	{
		if(cmd->argv[0][c] == '/')
		{
			strncpy(flasher_path,cmd->argv[0],c);
			flasher_file = g_strdup_printf("%s/%s",flasher_path,FLASHER_BIN);
			break;
		}
		c--;
	}

	const char* inst[] = {"bios"};
	for(i=0;i<1;i++)
	{
		gchar* s;
		s = g_strdup_printf("%s/%s",dbus_object_path,inst[i]);
		object = object_skeleton_new(s);
		g_free(s);

		Flash* flash = flash_skeleton_new();
		object_skeleton_set_flash(object, flash);
		g_object_unref(flash);

		SharedResource* lock = shared_resource_skeleton_new();
		object_skeleton_set_shared_resource(object, lock);
		g_object_unref(lock);

		shared_resource_set_lock(lock,false);
		shared_resource_set_name(lock,"");

		flash_set_flasher_path(flash,flasher_file);
		flash_set_flasher_name(flash,FLASHER_BIN);
		flash_set_flasher_instance(flash,inst[i]);
		//g_free (s);


		//define method callbacks here
		g_signal_connect(lock,
				"handle-lock",
				G_CALLBACK(on_lock),
				NULL); /* user_data */
		g_signal_connect(lock,
				"handle-unlock",
				G_CALLBACK(on_unlock),
				NULL); /* user_data */
		g_signal_connect(lock,
				"handle-is-locked",
				G_CALLBACK(on_is_locked),
				NULL); /* user_data */

		g_signal_connect(flash,
				"handle-update",
				G_CALLBACK(on_update),
				object); /* user_data */

		g_signal_connect(flash,
				"handle-error",
				G_CALLBACK(on_error),
				object); /* user_data */

		g_signal_connect(flash,
				"handle-done",
				G_CALLBACK(on_done),
				object); /* user_data */

		g_signal_connect(flash,
				"handle-update-via-tftp",
				G_CALLBACK(on_update_via_tftp),
				object); /* user_data */

		g_signal_connect(flash,
				"handle-init",
				G_CALLBACK(on_init),
				object); /* user_data */

		s = g_strdup_printf("/org/openbmc/control/%s",inst[i]);
		g_dbus_connection_signal_subscribe(connection,
				NULL,
				"org.openbmc.FlashControl",
				"Progress",
				s,
				NULL,
				G_DBUS_SIGNAL_FLAGS_NONE,
				(GDBusSignalCallback) on_flash_progress,
				object,
				NULL );

		g_free(s);


		flash_set_filename(flash,"");
		/* 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);
	}
	g_free(flasher_file);
}
Ejemplo n.º 13
0
static void 
on_bus_acquired (GDBusConnection *connection,
                 const gchar     *name,
                 gpointer         user_data)
{
  	//g_print ("Acquired a message bus connection: %s\n",name);

  	cmdline *cmd = user_data;
	if (cmd->argc < 2)
	{
		g_print("No objects created.  Put object name(s) on command line\n");
		return;
	}	
  	manager = g_dbus_object_manager_server_new (dbus_object_path);
  	int i=0;
  	for (i=1;i<cmd->argc;i++)
  	{
		gchar *s;
 		s = g_strdup_printf ("%s/%s",dbus_object_path,cmd->argv[i]);
		ObjectSkeleton *object = object_skeleton_new (s);
		g_free (s);

		Occ *occ = occ_skeleton_new ();
  		object_skeleton_set_occ (object, occ);
  		g_object_unref (occ);
		occ_set_instance_name(occ,cmd->argv[i]);

		SensorI2c *i2c = sensor_i2c_skeleton_new ();
  		object_skeleton_set_sensor_i2c (object, i2c);
  		g_object_unref (i2c);

		g_signal_connect (occ,
               	    "handle-init",
               	    G_CALLBACK (on_init),
               	    object); /* user_data */
	
		//g_timeout_add(3000, poll_occ, object);

  		/* Export the object (@manager takes its own reference to @object) */
  		g_dbus_object_manager_server_export (manager, G_DBUS_OBJECT_SKELETON (object));
  		g_object_unref (object);
	
		int c;	
		for (c=0;c<12;c++)
		{
 			s = g_strdup_printf ("%s/Temperature/P8_%s_Core_%d",dbus_object_path,cmd->argv[i],c);
			ObjectSkeleton *object = object_skeleton_new (s);
			g_free (s);

			SensorValue *sensor = sensor_value_skeleton_new ();
  			object_skeleton_set_sensor_value (object, sensor);
  			g_object_unref (sensor);
			GVariant* v_new_value = NEW_VARIANT_U(c);
			sensor_value_set_value(sensor,v_new_value);
			sensor_value_set_units(sensor,"C");

			g_signal_connect (sensor,
        	       	    "handle-init",
               		    G_CALLBACK (on_init_sensor),
               	    	    NULL); /* user_data */

			//emit changed signal so sensor manager sees initial value
			sensor_value_emit_changed(sensor,sensor_value_get_value(sensor),sensor_value_get_units(sensor));
  			/* Export the object (@manager takes its own reference to @object) */
  			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);
}