int main (int argc, char *argv[])
{
	DBusGConnection *bus;
	DBusGProxy *props_proxy;

	/* Initialize GType system */
	g_type_init ();

	/* Get system bus */
	bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);

	/* Create a D-Bus proxy to get the object properties from the NM Manager
	 * object.  NM_DBUS_* defines are from NetworkManager.h.
	 */
	props_proxy = dbus_g_proxy_new_for_name (bus,
	                                         NM_DBUS_SERVICE,
	                                         NM_DBUS_PATH,
	                                         DBUS_INTERFACE_PROPERTIES);
	g_assert (props_proxy);

	/* Get active connections */
	get_active_connections (bus, props_proxy);

	g_object_unref (props_proxy);
	dbus_g_connection_unref (bus);

	return 0;
}
int
main (int argc, char *argv[])
{
	GDBusProxy *props_proxy;

#if !GLIB_CHECK_VERSION (2, 35, 0)
	/* Initialize GType system */
	g_type_init ();
#endif

	/* Create a D-Bus proxy to get the object properties from the NM Manager
	 * object.  NM_DBUS_* defines are from nm-dbus-interface.h.
	 */
	props_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
	                                             G_DBUS_PROXY_FLAGS_NONE,
	                                             NULL,
	                                             NM_DBUS_SERVICE,
	                                             NM_DBUS_PATH,
	                                             "org.freedesktop.DBus.Properties",
	                                             NULL, NULL);
	g_assert (props_proxy);

	/* Get active connections */
	get_active_connections (props_proxy);

	g_object_unref (props_proxy);

	return 0;
}