PipeWire 1.0.5
Loading...
Searching...
No Matches
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 */
static int spa_debug_dict(int indent, const struct spa_dict *dict)
Definition dict.h:35
#define spa_debugc(_c, _fmt,...)
Definition context.h:37
static int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
Definition dict.h:25
#define spa_dict_for_each(item, dict)
Definition dict.h:52
spa/debug/context.h
Definition context.h:33
Definition dict.h:31
const char * key
Definition dict.h:32
const char * value
Definition dict.h:33
Definition dict.h:39
uint32_t n_items
Definition dict.h:43
uint32_t flags
Definition dict.h:42
spa/utils/dict.h