mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-30 13:14:16 -04:00
pulse-server: improve module argument checking
Make the module valid_args a structure that includes the argument key, description and some flags. Use this to enforce mandatory properties in a more central place. We should be able to generate the module usage from this as wel later to have things a bit more structured.
This commit is contained in:
parent
a5a3eaf2cb
commit
e5ff44910e
9 changed files with 122 additions and 68 deletions
|
|
@ -17,6 +17,13 @@ struct client;
|
|||
struct message;
|
||||
struct extension;
|
||||
|
||||
struct module_args {
|
||||
const char *key;
|
||||
const char *description;
|
||||
#define MODULE_ARG_MANDATORY (1u<<0)
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
struct module_info {
|
||||
const char *name;
|
||||
|
||||
|
|
@ -27,7 +34,7 @@ struct module_info {
|
|||
int (*unload) (struct module *module);
|
||||
|
||||
const struct extension *extension;
|
||||
const char* const *valid_args;
|
||||
const struct module_args *valid_args;
|
||||
const struct spa_dict *properties;
|
||||
size_t data_size;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue