PipeWire  0.3.66
debug/dict.h
Go to the documentation of this file.
1 /* Simple Plugin API */
2 /* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3 /* SPDX-License-Identifier: MIT */
4 
5 #ifndef SPA_DEBUG_DICT_H
6 #define SPA_DEBUG_DICT_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
17 #include <spa/debug/context.h>
18 #include <spa/utils/dict.h>
19 
20 static inline int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
21 {
22  const struct spa_dict_item *item;
23  spa_debugc(ctx, "%*sflags:%08x n_items:%d", indent, "", dict->flags, dict->n_items);
24  spa_dict_for_each(item, dict) {
25  spa_debugc(ctx, "%*s %s = \"%s\"", indent, "", item->key, item->value);
26  }
27  return 0;
28 }
29 
30 static inline int spa_debug_dict(int indent, const struct spa_dict *dict)
31 {
32  return spa_debugc_dict(NULL, indent, dict);
33 }
38 #ifdef __cplusplus
39 } /* extern "C" */
40 #endif
41 
42 #endif /* SPA_DEBUG_DICT_H */
static int spa_debug_dict(int indent, const struct spa_dict *dict)
Definition: debug/dict.h:35
#define spa_debugc(_c, _fmt,...)
Definition: spa/include/spa/debug/context.h:37
static int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
Definition: debug/dict.h:25
#define spa_dict_for_each(item, dict)
Definition: utils/dict.h:52
spa/debug/context.h
Definition: spa/include/spa/debug/context.h:33
Definition: utils/dict.h:31
const char * key
Definition: utils/dict.h:32
const char * value
Definition: utils/dict.h:33
Definition: utils/dict.h:39
uint32_t n_items
Definition: utils/dict.h:43
uint32_t flags
Definition: utils/dict.h:42
spa/utils/dict.h