Lines Matching refs:entry
129 struct entry {
185 static struct entry* entry_new(void) {
186 struct entry *r = pa_xnew0(struct entry, 1);
191 static void entry_free(struct entry* e) {
199 static bool entry_write(struct userdata *u, const char *name, const struct entry *e) {
231 static struct entry* legacy_entry_read(struct userdata *u, pa_datum *data) {
240 struct entry *e;
279 static struct entry* entry_read(struct userdata *u, const char *name) {
281 struct entry *e = NULL;
391 struct entry *e;
399 pa_log_debug(" Got entry: %s", name);
463 static bool entries_equal(const struct entry *a, const struct entry *b) {
490 static inline struct entry *load_or_initialize_entry(struct userdata *u, struct entry *entry, const char *name, const char *prefix) {
491 struct entry *old;
494 pa_assert(entry);
499 *entry = *old;
500 entry->description = pa_xstrdup(old->description);
501 entry->icon = pa_xstrdup(old->icon);
519 struct entry *e;
537 /* Actually initialise our entry now we've calculated it */
539 entry->priority[i] = max_priority[i] + 1;
541 entry->user_set_description = false;
587 struct entry *e;
798 struct entry *entry, *old = NULL;
845 entry = entry_new();
848 old = load_or_initialize_entry(u, entry, name, "sink:");
850 if (!entry->user_set_description) {
851 pa_xfree(entry->description);
852 entry->description = pa_xstrdup(pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_DESCRIPTION));
853 } else if (!pa_streq(entry->description, pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_DESCRIPTION))) {
858 pa_sink_set_description(sink, entry->description);
861 pa_xfree(entry->icon);
862 entry->icon = pa_xstrdup(pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_ICON_NAME));
875 entry = entry_new();
878 old = load_or_initialize_entry(u, entry, name, "source:");
880 if (!entry->user_set_description) {
881 pa_xfree(entry->description);
882 entry->description = pa_xstrdup(pa_proplist_gets(source->proplist, PA_PROP_DEVICE_DESCRIPTION));
883 } else if (!pa_streq(entry->description, pa_proplist_gets(source->proplist, PA_PROP_DEVICE_DESCRIPTION))) {
888 pa_source_set_description(source, entry->description);
891 pa_xfree(entry->icon);
892 entry->icon = pa_xstrdup(pa_proplist_gets(source->proplist, PA_PROP_DEVICE_ICON_NAME));
901 if (entries_equal(old, entry)) {
903 entry_free(entry);
914 if (entry_write(u, name, entry))
919 entry_free(entry);
925 struct entry *e;
949 struct entry *e;
1102 static void apply_entry(struct userdata *u, const char *name, struct entry *e) {
1185 struct entry *e;
1242 struct entry *e;
1268 pa_log_warn("Could not rename device %s, no entry in database", device);
1312 struct entry *e;
1349 /* Ensure this is a valid entry */
1463 /* Go through in order and write the new entry and cleanup our own list */