mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
-a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
-a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
-exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
-e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;
and:
sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
-e '181,194!s/\bTRUE\b/true/' -e \
'181,194!s/\bFALSE\b/false/' pulsecore/macro.h
This commit is contained in:
parent
e9822bfcb0
commit
d806b19714
288 changed files with 3360 additions and 3360 deletions
|
|
@ -51,7 +51,7 @@
|
|||
PA_MODULE_AUTHOR("Lennart Poettering");
|
||||
PA_MODULE_DESCRIPTION("UPnP MediaServer Plugin for Rygel");
|
||||
PA_MODULE_VERSION(PACKAGE_VERSION);
|
||||
PA_MODULE_LOAD_ONCE(TRUE);
|
||||
PA_MODULE_LOAD_ONCE(true);
|
||||
PA_MODULE_USAGE("display_name=<UPnP Media Server name>");
|
||||
|
||||
/* This implements http://live.gnome.org/Rygel/MediaServer2Spec */
|
||||
|
|
@ -170,7 +170,7 @@ struct userdata {
|
|||
pa_module *module;
|
||||
|
||||
pa_dbus_connection *bus;
|
||||
pa_bool_t got_name:1;
|
||||
bool got_name:1;
|
||||
|
||||
char *display_name;
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ static pa_hook_result_t source_new_or_unlink_cb(pa_core *c, pa_source *s, struct
|
|||
return PA_HOOK_OK;
|
||||
}
|
||||
|
||||
static pa_bool_t message_is_property_get(DBusMessage *m, const char *interface, const char *property) {
|
||||
static bool message_is_property_get(DBusMessage *m, const char *interface, const char *property) {
|
||||
const char *i, *p;
|
||||
DBusError error;
|
||||
|
||||
|
|
@ -220,17 +220,17 @@ static pa_bool_t message_is_property_get(DBusMessage *m, const char *interface,
|
|||
pa_assert(m);
|
||||
|
||||
if (!dbus_message_is_method_call(m, "org.freedesktop.DBus.Properties", "Get"))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!dbus_message_get_args(m, &error, DBUS_TYPE_STRING, &i, DBUS_TYPE_STRING, &p, DBUS_TYPE_INVALID) || dbus_error_is_set(&error)) {
|
||||
dbus_error_free(&error);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return pa_streq(i, interface) && pa_streq(p, property);
|
||||
}
|
||||
|
||||
static pa_bool_t message_is_property_get_all(DBusMessage *m, const char *interface) {
|
||||
static bool message_is_property_get_all(DBusMessage *m, const char *interface) {
|
||||
const char *i;
|
||||
DBusError error;
|
||||
|
||||
|
|
@ -239,11 +239,11 @@ static pa_bool_t message_is_property_get_all(DBusMessage *m, const char *interfa
|
|||
pa_assert(m);
|
||||
|
||||
if (!dbus_message_is_method_call(m, "org.freedesktop.DBus.Properties", "GetAll"))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!dbus_message_get_args(m, &error, DBUS_TYPE_STRING, &i, DBUS_TYPE_INVALID) || dbus_error_is_set(&error)) {
|
||||
dbus_error_free(&error);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return pa_streq(i, interface);
|
||||
|
|
@ -473,7 +473,7 @@ static void append_property_dict_entry_item_display_name(DBusMessage *m, DBusMes
|
|||
pa_assert_se(dbus_message_iter_close_container(iter, &sub));
|
||||
}
|
||||
|
||||
static pa_bool_t get_mediacontainer2_list_args(DBusMessage *m, unsigned *offset, unsigned *max_entries, char ***filter, int *filter_len) {
|
||||
static bool get_mediacontainer2_list_args(DBusMessage *m, unsigned *offset, unsigned *max_entries, char ***filter, int *filter_len) {
|
||||
DBusError error;
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
|
@ -485,10 +485,10 @@ static pa_bool_t get_mediacontainer2_list_args(DBusMessage *m, unsigned *offset,
|
|||
|
||||
if (!dbus_message_get_args(m, &error, DBUS_TYPE_UINT32, offset, DBUS_TYPE_UINT32, max_entries, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, filter, filter_len, DBUS_TYPE_INVALID) || dbus_error_is_set(&error)) {
|
||||
dbus_error_free(&error);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static unsigned get_sinks_or_sources_count(const char *path, const struct userdata *u) {
|
||||
|
|
@ -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));
|
||||
|
||||
|
|
@ -1081,7 +1081,7 @@ int pa__init(pa_module *m) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
u->got_name = TRUE;
|
||||
u->got_name = true;
|
||||
|
||||
pa_modargs_free(ma);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue