return d->policy;
}
-static dbus_bool_t
-foreach_active (BusConnections *connections,
- BusConnectionForeachFunction function,
- void *data)
-{
- DBusList *link;
-
- link = _dbus_list_get_first_link (&connections->completed);
- while (link != NULL)
- {
- DBusConnection *connection = link->data;
- DBusList *next = _dbus_list_get_next_link (&connections->completed, link);
-
- if (!(* function) (connection, data))
- return FALSE;
-
- link = next;
- }
-
- return TRUE;
-}
-
-static dbus_bool_t
-foreach_inactive (BusConnections *connections,
- BusConnectionForeachFunction function,
- void *data)
-{
- DBusList *link;
-
- link = _dbus_list_get_first_link (&connections->incomplete);
- while (link != NULL)
- {
- DBusConnection *connection = link->data;
- DBusList *next = _dbus_list_get_next_link (&connections->incomplete, link);
-
- if (!(* function) (connection, data))
- return FALSE;
-
- link = next;
- }
-
- return TRUE;
-}
-
-/**
- * Calls function on each active connection; if the function returns
- * #FALSE, stops iterating. Active connections are authenticated
- * and have sent a Hello message.
- *
- * @param connections the connections object
- * @param function the function
- * @param data data to pass to it as a second arg
- */
-void
-bus_connections_foreach_active (BusConnections *connections,
- BusConnectionForeachFunction function,
- void *data)
-{
- foreach_active (connections, function, data);
-}
-
-/**
- * Calls function on each connection; if the function returns
- * #FALSE, stops iterating.
- *
- * @param connections the connections object
- * @param function the function
- * @param data data to pass to it as a second arg
- */
-void
-bus_connections_foreach (BusConnections *connections,
- BusConnectionForeachFunction function,
- void *data)
-{
- if (!foreach_active (connections, function, data))
- return;
-
- foreach_inactive (connections, function, data);
-}
-
BusContext*
bus_connections_get_context (BusConnections *connections)
{
BUS_EXTRA_HEADERS_NONE = 0
} BusExtraHeaders;
-typedef dbus_bool_t (* BusConnectionForeachFunction) (DBusConnection *connection,
- void *data);
-
-
BusConnections* bus_connections_new (BusContext *context);
BusConnections* bus_connections_ref (BusConnections *connections);
void bus_connections_unref (BusConnections *connections);
dbus_bool_t bus_connections_setup_connection (BusConnections *connections,
DBusConnection *connection);
-void bus_connections_foreach (BusConnections *connections,
- BusConnectionForeachFunction function,
- void *data);
-void bus_connections_foreach_active (BusConnections *connections,
- BusConnectionForeachFunction function,
- void *data);
BusContext* bus_connections_get_context (BusConnections *connections);
void bus_connections_increment_stamp (BusConnections *connections);
dbus_bool_t bus_connections_reload_policy (BusConnections *connections,