diff options
author | cbdev <cb@cbcdn.com> | 2020-01-05 23:26:04 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-01-05 23:26:04 +0100 |
commit | e08b473d0eeb467ad358ba5314157753b4f37c18 (patch) | |
tree | d847784ab3a926054b586877e6d77865af574be1 /config.h | |
parent | f8ed6c26683c041ec61dac46d740b4b87df811ad (diff) | |
download | midimonster-e08b473d0eeb467ad358ba5314157753b4f37c18.tar.gz midimonster-e08b473d0eeb467ad358ba5314157753b4f37c18.tar.bz2 midimonster-e08b473d0eeb467ad358ba5314157753b4f37c18.zip |
Implement commandline config override (Fixes #26)
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -1 +1,45 @@ +/* + * Channel specification glob + */ +typedef struct /*_mm_channel_glob*/ { + size_t offset[2]; + union { + void* impl; + uint64_t u64[2]; + } limits; + uint64_t values; +} channel_glob; + +/* + * (Multi-)Channel specification + */ +typedef struct /*_mm_channel_spec*/ { + char* spec; + uint8_t internal; + size_t channels; + size_t globs; + channel_glob* glob; +} channel_spec; + +/* + * Command-line override types + */ +typedef enum { + override_backend, + override_instance +} override_type; + +/* + * Command-line override data + */ +typedef struct /*_mm_config_override*/ { + override_type type; + uint8_t handled; + char* target; + char* option; + char* value; +} config_override; + int config_read(char* file); +int config_add_override(override_type type, char* data); +void config_free(); |