mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
Revert dbus_bool_t variables to use TRUE/FALSE instead of true/false
This commit is contained in:
parent
408f0ba783
commit
b358aea89b
8 changed files with 42 additions and 42 deletions
|
|
@ -365,7 +365,7 @@ static dbus_bool_t get_is_local(DBusConnection *conn) {
|
|||
pa_assert(conn);
|
||||
|
||||
if (!dbus_connection_get_socket(conn, &conn_fd))
|
||||
return false;
|
||||
return FALSE;
|
||||
|
||||
return pa_socket_is_local(conn_fd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -449,20 +449,20 @@ static void handle_set_volume(DBusConnection *conn, DBusMessage *msg, DBusMessag
|
|||
|
||||
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);
|
||||
|
|
@ -513,7 +513,7 @@ static void handle_get_mute(DBusConnection *conn, DBusMessage *msg, void *userda
|
|||
|
||||
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);
|
||||
|
|
@ -532,7 +532,7 @@ static void handle_set_mute(DBusConnection *conn, DBusMessage *msg, DBusMessageI
|
|||
|
||||
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);
|
||||
|
|
@ -547,7 +547,7 @@ static void handle_get_has_hardware_volume(DBusConnection *conn, DBusMessage *ms
|
|||
|
||||
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);
|
||||
|
|
@ -577,7 +577,7 @@ static void handle_get_configured_latency(DBusConnection *conn, DBusMessage *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);
|
||||
|
|
@ -617,7 +617,7 @@ static void handle_get_latency(DBusConnection *conn, DBusMessage *msg, void *use
|
|||
|
||||
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);
|
||||
|
|
@ -632,7 +632,7 @@ static void handle_get_is_hardware_device(DBusConnection *conn, DBusMessage *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);
|
||||
|
|
@ -796,17 +796,17 @@ static void handle_get_all(DBusConnection *conn, DBusMessage *msg, void *userdat
|
|||
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;
|
||||
|
|
@ -847,7 +847,7 @@ static void handle_get_all(DBusConnection *conn, DBusMessage *msg, void *userdat
|
|||
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;
|
||||
|
|
@ -922,7 +922,7 @@ static void handle_get_all(DBusConnection *conn, DBusMessage *msg, void *userdat
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ static void handle_get_mute(DBusConnection *conn, DBusMessage *msg, void *userda
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ static void client_send_event_cb(pa_client *c, const char *name, pa_proplist *da
|
|||
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) {
|
||||
|
|
@ -198,7 +198,7 @@ static void connection_new_cb(DBusServer *dbus_server, DBusConnection *new_conne
|
|||
/* 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);
|
||||
|
|
@ -302,7 +302,7 @@ static dbus_bool_t watch_add_cb(DBusWatch *watch, void *data) {
|
|||
|
||||
dbus_watch_set_data(watch, ev, NULL);
|
||||
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Called by D-Bus when a D-Bus fd watch event is removed. */
|
||||
|
|
@ -342,7 +342,7 @@ static dbus_bool_t timeout_add_cb(DBusTimeout *timeout, void *data) {
|
|||
pa_assert(s);
|
||||
|
||||
if (!dbus_timeout_get_enabled(timeout))
|
||||
return false;
|
||||
return FALSE;
|
||||
|
||||
mainloop = s->userdata->module->core->mainloop;
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ static dbus_bool_t timeout_add_cb(DBusTimeout *timeout, void *data) {
|
|||
|
||||
dbus_timeout_set_data(timeout, ev, NULL);
|
||||
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Called by D-Bus when a D-Bus timer event is removed. */
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ static void append_sink_or_source_container_properties(
|
|||
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) {
|
||||
|
|
@ -552,7 +552,7 @@ static void append_sink_or_source_container_properties(
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -642,7 +642,7 @@ static DBusHandlerResult root_handler(DBusConnection *c, DBusMessage *m, void *u
|
|||
|
||||
} 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;
|
||||
|
|
@ -654,7 +654,7 @@ static DBusHandlerResult root_handler(DBusConnection *c, DBusMessage *m, void *u
|
|||
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")
|
||||
|
|
@ -803,7 +803,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
|
|||
|
||||
} 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;
|
||||
|
|
@ -819,7 +819,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
|
|||
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));
|
||||
|
||||
|
|
|
|||
|
|
@ -603,8 +603,8 @@ static void handle_add_entry(DBusConnection *conn, DBusMessage *msg, void *userd
|
|||
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;
|
||||
|
||||
|
|
@ -847,7 +847,7 @@ static void handle_entry_get_mute(DBusConnection *conn, DBusMessage *msg, void *
|
|||
|
||||
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);
|
||||
|
||||
|
|
@ -904,7 +904,7 @@ static void handle_entry_get_all(DBusConnection *conn, DBusMessage *msg, void *u
|
|||
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)));
|
||||
|
||||
|
|
|
|||
|
|
@ -723,7 +723,7 @@ static int set_scheduler(int rtprio) {
|
|||
/* 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) {
|
||||
|
|
@ -860,7 +860,7 @@ static int set_nice(int nice_level) {
|
|||
/* 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);
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
|
|||
|
||||
dbus_watch_set_data(watch, ev, NULL);
|
||||
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* DBusRemoveWatchFunction callback for pa mainloop */
|
||||
|
|
@ -208,7 +208,7 @@ static dbus_bool_t add_timeout(DBusTimeout *timeout, void *data) {
|
|||
pa_assert(c);
|
||||
|
||||
if (!dbus_timeout_get_enabled(timeout))
|
||||
return false;
|
||||
return FALSE;
|
||||
|
||||
d = pa_xnew(struct timeout_data, 1);
|
||||
d->connection = c;
|
||||
|
|
@ -218,7 +218,7 @@ static dbus_bool_t add_timeout(DBusTimeout *timeout, void *data) {
|
|||
|
||||
dbus_timeout_set_data(timeout, ev, NULL);
|
||||
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* DBusRemoveTimeoutFunction callback for pa mainloop */
|
||||
|
|
@ -276,7 +276,7 @@ pa_dbus_wrap_connection* pa_dbus_wrap_connection_new(pa_mainloop_api *m, bool us
|
|||
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);
|
||||
|
|
@ -308,7 +308,7 @@ pa_dbus_wrap_connection* pa_dbus_wrap_connection_new_from_existing(
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue