| 1 |
/* WirePlumber |
| 2 |
* |
| 3 |
* Copyright © 2023 Collabora Ltd. |
| 4 |
* @author George Kiagiadakis <[email protected]> |
| 5 |
* |
| 6 |
* SPDX-License-Identifier: MIT |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef __WIREPLUMBER_JSON_UTILS_H__ |
| 10 |
#define __WIREPLUMBER_JSON_UTILS_H__ |
| 11 |
|
| 12 |
#include "spa-json.h" |
| 13 |
#include "properties.h" |
| 14 |
|
| 15 |
G_BEGIN_DECLS |
| 16 |
|
| 17 |
/*! |
| 18 |
* \brief A function to be called by wp_json_utils_match_rules() when a match is found. |
| 19 |
* \param data (closure): the user data passed to wp_json_utils_match_rules() |
| 20 |
* \param action the rule's action string |
| 21 |
* \param value the value associated with this action |
| 22 |
* \param error (out): return location for a GError |
| 23 |
* \returns FALSE if an error occurred and the match process should stop, TRUE otherwise |
| 24 |
* \ingroup wpjsonutils |
| 25 |
*/ |
| 26 |
typedef gboolean (*WpRuleMatchCallback) (gpointer data, const gchar * action, |
| 27 |
WpSpaJson * value, GError ** error); |
| 28 |
|
| 29 |
WP_API |
| 30 |
gboolean wp_json_utils_match_rules (WpSpaJson * json, WpProperties * match_props, |
| 31 |
WpRuleMatchCallback callback, gpointer data, GError ** error); |
| 32 |
|
| 33 |
WP_API |
| 34 |
gint wp_json_utils_match_rules_update_properties (WpSpaJson *json, WpProperties *props); |
| 35 |
|
| 36 |
WP_API |
| 37 |
WpSpaJson * wp_json_utils_merge_containers (WpSpaJson * a, WpSpaJson * b); |
| 38 |
|
| 39 |
G_END_DECLS |
| 40 |
|
| 41 |
#endif |