PipeWire: dict.h Source File

PipeWire 0.3.69

Loading...
Searching...
No Matches
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
9extern "C" {
10#endif
11
17#include <spa/debug/context.h>
18#include <spa/utils/dict.h>
19
20static 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
30static 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 */
spa_debug_dict
static int spa_debug_dict(int indent, const struct spa_dict *dict)
Definition: debug/dict.h:35
spa_debugc
#define spa_debugc(_c, _fmt,...)
Definition: spa/include/spa/debug/context.h:37
spa_debugc_dict
static int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
Definition: debug/dict.h:25
spa_dict_for_each
#define spa_dict_for_each(item, dict)
Definition: utils/dict.h:52
context.h
spa/debug/context.h
spa_debug_context
Definition: spa/include/spa/debug/context.h:33
spa_dict_item
Definition: utils/dict.h:31
spa_dict_item::key
const char * key
Definition: utils/dict.h:32
spa_dict_item::value
const char * value
Definition: utils/dict.h:33
spa_dict
Definition: utils/dict.h:39
spa_dict::n_items
uint32_t n_items
Definition: utils/dict.h:43
spa_dict::flags
uint32_t flags
Definition: utils/dict.h:42
dict.h
spa/utils/dict.h