pa_assert(conn);
if (!dbus_connection_get_socket(conn, &conn_fd))
- return false;
+ return FALSE;
return pa_socket_is_local(conn_fd);
}
static void handle_get_has_flat_volume(DBusConnection *conn, DBusMessage *msg, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t has_flat_volume = false;
+ dbus_bool_t has_flat_volume = FALSE;
pa_assert(conn);
pa_assert(msg);
pa_assert(d);
- has_flat_volume = (d->type == PA_DEVICE_TYPE_SINK) ? (d->sink->flags & PA_SINK_FLAT_VOLUME) : false;
+ has_flat_volume = (d->type == PA_DEVICE_TYPE_SINK) ? (d->sink->flags & PA_SINK_FLAT_VOLUME) : FALSE;
pa_dbus_send_basic_variant_reply(conn, msg, DBUS_TYPE_BOOLEAN, &has_flat_volume);
}
static void handle_get_has_convertible_to_decibel_volume(DBusConnection *conn, DBusMessage *msg, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t has_convertible_to_decibel_volume = false;
+ dbus_bool_t has_convertible_to_decibel_volume = FALSE;
pa_assert(conn);
pa_assert(msg);
static void handle_set_mute(DBusConnection *conn, DBusMessage *msg, DBusMessageIter *iter, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t mute = false;
+ dbus_bool_t mute = FALSE;
pa_assert(conn);
pa_assert(msg);
static void handle_get_has_hardware_volume(DBusConnection *conn, DBusMessage *msg, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t has_hardware_volume = false;
+ dbus_bool_t has_hardware_volume = FALSE;
pa_assert(conn);
pa_assert(msg);
static void handle_get_has_hardware_mute(DBusConnection *conn, DBusMessage *msg, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t has_hardware_mute = false;
+ dbus_bool_t has_hardware_mute = FALSE;
pa_assert(conn);
pa_assert(msg);
static void handle_get_has_dynamic_latency(DBusConnection *conn, DBusMessage *msg, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t has_dynamic_latency = false;
+ dbus_bool_t has_dynamic_latency = FALSE;
pa_assert(conn);
pa_assert(msg);
static void handle_get_is_hardware_device(DBusConnection *conn, DBusMessage *msg, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t is_hardware_device = false;
+ dbus_bool_t is_hardware_device = FALSE;
pa_assert(conn);
pa_assert(msg);
static void handle_get_is_network_device(DBusConnection *conn, DBusMessage *msg, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t is_network_device = false;
+ dbus_bool_t is_network_device = FALSE;
pa_assert(conn);
pa_assert(msg);
pa_channel_map *channel_map = NULL;
dbus_uint32_t channels[PA_CHANNELS_MAX];
dbus_uint32_t volume[PA_CHANNELS_MAX];
- dbus_bool_t has_flat_volume = false;
- dbus_bool_t has_convertible_to_decibel_volume = false;
+ dbus_bool_t has_flat_volume = FALSE;
+ dbus_bool_t has_convertible_to_decibel_volume = FALSE;
dbus_uint32_t base_volume = 0;
dbus_uint32_t volume_steps = 0;
- dbus_bool_t has_hardware_volume = false;
- dbus_bool_t has_hardware_mute = false;
+ dbus_bool_t has_hardware_volume = FALSE;
+ dbus_bool_t has_hardware_mute = FALSE;
dbus_uint64_t configured_latency = 0;
- dbus_bool_t has_dynamic_latency = false;
+ dbus_bool_t has_dynamic_latency = FALSE;
dbus_uint64_t latency = 0;
- dbus_bool_t is_hardware_device = false;
- dbus_bool_t is_network_device = false;
+ dbus_bool_t is_hardware_device = FALSE;
+ dbus_bool_t is_network_device = FALSE;
dbus_uint32_t state = 0;
const char **ports = NULL;
unsigned n_ports = 0;
sample_format = d->source->sample_spec.format;
sample_rate = d->source->sample_spec.rate;
channel_map = &d->source->channel_map;
- has_flat_volume = false;
+ has_flat_volume = FALSE;
has_convertible_to_decibel_volume = d->source->flags & PA_SOURCE_DECIBEL_VOLUME;
base_volume = d->source->base_volume;
volume_steps = d->source->n_volume_steps;
static void handle_suspend(DBusConnection *conn, DBusMessage *msg, void *userdata) {
pa_dbusiface_device *d = userdata;
- dbus_bool_t suspend = false;
+ dbus_bool_t suspend = FALSE;
pa_client *client;
pa_assert(conn);
static void handle_set_mute(DBusConnection *conn, DBusMessage *msg, DBusMessageIter *iter, void *userdata) {
pa_dbusiface_stream *s = userdata;
- dbus_bool_t mute = false;
+ dbus_bool_t mute = FALSE;
pa_assert(conn);
pa_assert(msg);
static dbus_bool_t user_check_cb(DBusConnection *connection, unsigned long uid, void *data) {
pa_log_debug("Allowing connection by user %lu.", uid);
- return true;
+ return TRUE;
}
static DBusHandlerResult disconnection_filter_cb(DBusConnection *connection, DBusMessage *message, void *user_data) {
/* FIXME: Here we allow anyone from anywhere to access the server,
* anonymously. Access control should be configurable. */
dbus_connection_set_unix_user_function(new_connection, user_check_cb, NULL, NULL);
- dbus_connection_set_allow_anonymous(new_connection, true);
+ dbus_connection_set_allow_anonymous(new_connection, TRUE);
}
c = pa_xnew(struct connection, 1);
dbus_watch_set_data(watch, ev, NULL);
- return true;
+ return TRUE;
}
/* Called by D-Bus when a D-Bus fd watch event is removed. */
pa_assert(s);
if (!dbus_timeout_get_enabled(timeout))
- return false;
+ return FALSE;
mainloop = s->userdata->module->core->mainloop;
dbus_timeout_set_data(timeout, ev, NULL);
- return true;
+ return TRUE;
}
/* Called by D-Bus when a D-Bus timer event is removed. */
if (filter_len == 1 && (*filter)[0] == '*' && (*filter)[1] == '\0') {
append_sink_or_source_container_mediaobject2_properties(r, &sub, path);
append_property_dict_entry_unsigned(r, &sub, "ChildCount", get_sinks_or_sources_count(path, user_data));
- append_property_dict_entry_boolean(r, &sub, "Searchable", false);
+ append_property_dict_entry_boolean(r, &sub, "Searchable", FALSE);
}
else {
for (int i = 0; i < filter_len; ++i) {
append_property_dict_entry_unsigned(r, &sub, "ChildCount", get_sinks_or_sources_count(path, user_data));
}
else if (pa_streq(property_name, "Searchable")) {
- append_property_dict_entry_boolean(r, &sub, "Searchable", false);
+ append_property_dict_entry_boolean(r, &sub, "Searchable", FALSE);
}
}
}
} else if (message_is_property_get(m, "org.gnome.UPnP.MediaContainer2", "Searchable")) {
pa_assert_se(r = dbus_message_new_method_return(m));
- append_variant_boolean(r, NULL, false);
+ append_variant_boolean(r, NULL, FALSE);
} else if (message_is_property_get_all(m, "org.gnome.UPnP.MediaContainer2")) {
DBusMessageIter iter, sub;
append_property_dict_entry_unsigned(r, &sub, "ChildCount", PA_ELEMENTSOF(array_root_containers));
append_property_dict_entry_unsigned(r, &sub, "ItemCount", PA_ELEMENTSOF(array_no_children));
append_property_dict_entry_unsigned(r, &sub, "ContainerCount", PA_ELEMENTSOF(array_root_containers));
- append_property_dict_entry_boolean(r, &sub, "Searchable", false);
+ append_property_dict_entry_boolean(r, &sub, "Searchable", FALSE);
pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
} else if (dbus_message_is_method_call(m, "org.gnome.UPnP.MediaContainer2", "ListChildren")
} else if (message_is_property_get(m, "org.gnome.UPnP.MediaContainer2", "Searchable")) {
pa_assert_se(r = dbus_message_new_method_return(m));
- append_variant_boolean(r, NULL, false);
+ append_variant_boolean(r, NULL, FALSE);
} else if (message_is_property_get_all(m, "org.gnome.UPnP.MediaContainer2")) {
DBusMessageIter iter, sub;
append_property_dict_entry_unsigned(r, &sub, "ChildCount", item_count);
append_property_dict_entry_unsigned(r, &sub, "ItemCount", item_count);
append_property_dict_entry_unsigned(r, &sub, "ContainerCount", 0);
- append_property_dict_entry_boolean(r, &sub, "Searchable", false);
+ append_property_dict_entry_boolean(r, &sub, "Searchable", FALSE);
pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
const char *device = NULL;
pa_channel_map map;
pa_cvolume vol;
- dbus_bool_t muted = false;
- dbus_bool_t apply_immediately = false;
+ dbus_bool_t muted = FALSE;
+ dbus_bool_t apply_immediately = FALSE;
struct dbus_entry *dbus_entry = NULL;
struct entry *e = NULL;
pa_assert_se(e = entry_read(de->userdata, de->entry_name));
- mute = e->muted_valid ? e->muted : false;
+ mute = e->muted_valid ? e->muted : FALSE;
pa_dbus_send_basic_variant_reply(conn, msg, DBUS_TYPE_BOOLEAN, &mute);
pa_assert_se(e = entry_read(de->userdata, de->entry_name));
device = e->device_valid ? e->device : "";
- mute = e->muted_valid ? e->muted : false;
+ mute = e->muted_valid ? e->muted : FALSE;
pa_assert_se((reply = dbus_message_new_method_return(msg)));
/* We need to disable exit on disconnect because otherwise
* dbus_shutdown will kill us. See
* https://bugs.freedesktop.org/show_bug.cgi?id=16924 */
- dbus_connection_set_exit_on_disconnect(bus, false);
+ dbus_connection_set_exit_on_disconnect(bus, FALSE);
rttime = rtkit_get_rttime_usec_max(bus);
if (rttime >= 0) {
/* We need to disable exit on disconnect because otherwise
* dbus_shutdown will kill us. See
* https://bugs.freedesktop.org/show_bug.cgi?id=16924 */
- dbus_connection_set_exit_on_disconnect(bus, false);
+ dbus_connection_set_exit_on_disconnect(bus, FALSE);
r = rtkit_make_high_priority(bus, 0, nice_level);
dbus_connection_unref(bus);
dbus_watch_set_data(watch, ev, NULL);
- return true;
+ return TRUE;
}
/* DBusRemoveWatchFunction callback for pa mainloop */
pa_assert(c);
if (!dbus_timeout_get_enabled(timeout))
- return false;
+ return FALSE;
d = pa_xnew(struct timeout_data, 1);
d->connection = c;
dbus_timeout_set_data(timeout, ev, NULL);
- return true;
+ return TRUE;
}
/* DBusRemoveTimeoutFunction callback for pa mainloop */
pconn->connection = conn;
pconn->use_rtclock = use_rtclock;
- dbus_connection_set_exit_on_disconnect(conn, false);
+ dbus_connection_set_exit_on_disconnect(conn, FALSE);
dbus_connection_set_dispatch_status_function(conn, dispatch_status, pconn, NULL);
dbus_connection_set_watch_functions(conn, add_watch, remove_watch, toggle_watch, pconn, NULL);
dbus_connection_set_timeout_functions(conn, add_timeout, remove_timeout, toggle_timeout, pconn, NULL);
pconn->connection = dbus_connection_ref(conn);
pconn->use_rtclock = use_rtclock;
- dbus_connection_set_exit_on_disconnect(conn, false);
+ dbus_connection_set_exit_on_disconnect(conn, FALSE);
dbus_connection_set_dispatch_status_function(conn, dispatch_status, pconn, NULL);
dbus_connection_set_watch_functions(conn, add_watch, remove_watch, toggle_watch, pconn, NULL);
dbus_connection_set_timeout_functions(conn, add_timeout, remove_timeout, toggle_timeout, pconn, NULL);