示例#1
0
文件: plugin.c 项目: plundstr/ngfd
void
profile_plugin_reconnect (NCore *core, DBusConnection *session_bus)
{
    profile_connection_set (session_bus);

    query_current_profile (core);
    query_current_values (core);
}
示例#2
0
文件: plugin.c 项目: kvahlman/ngfd
static gboolean
setup_session_bus_connection (NCore *core)
{
    /* setup the session bus connection */
    DBusError error;
    dbus_error_init(&error);

    if (!session_bus) {
        session_bus = dbus_bus_get(DBUS_BUS_SESSION, &error);
        if (dbus_error_is_set(&error)) {
            N_DEBUG (LOG_CAT "Could not connect to DBus session bus.");
            return FALSE;
        }
    }

    N_DEBUG (LOG_CAT "Connected to DBus session bus.");
    profile_connection_set (session_bus);

    query_current_profile (core);
    query_current_values (core);

    return TRUE;
}