diff options
author | Dan Williams <dan@ioncontrol.co> | 2024-09-12 12:28:10 -0500 |
---|---|---|
committer | Dan Williams <dan@ioncontrol.co> | 2024-09-17 12:20:46 -0500 |
commit | f19f20c00824a2436e7f6536f0ff278d4b83a4e4 (patch) | |
tree | f9be96e8884235dc155f9ba40d9837ebad1a156e /src/mm-modem-helpers.h | |
parent | 0b5f2adb4b078b305604b1f9b785289e279c5164 (diff) |
helpers: consolidate some uses of mm_kernel_device_get_subsystem()
Signed-off-by: Dan Williams <dan@ioncontrol.co>
Diffstat (limited to 'src/mm-modem-helpers.h')
-rw-r--r-- | src/mm-modem-helpers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h index eb285c1b..ddcff724 100644 --- a/src/mm-modem-helpers.h +++ b/src/mm-modem-helpers.h @@ -593,4 +593,15 @@ gboolean mm_sim_parse_cpol_test_response (const gchar *response, /* Helper function to decode eid read from esim */ gchar *mm_decode_eid (const gchar *eid, gsize eid_len); +typedef struct { + const gchar *str; + const guint val; +} MMStringUintMap; + +/* Helper to look up string value in a map and return corresponding guint */ +guint mm_string_uint_map_lookup (const MMStringUintMap *map, + const gsize map_size, + const gchar *str, + const guint default_value); + #endif /* MM_MODEM_HELPERS_H */ |