diff options
-rw-r--r-- | include/usbg/usbg.h | 8 | ||||
-rw-r--r-- | src/usbg.c | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h index ba760f5..31d9862 100644 --- a/include/usbg/usbg.h +++ b/include/usbg/usbg.h @@ -816,6 +816,14 @@ extern int usbg_get_config_strs(usbg_config *c, int lang, struct usbg_config_strs *c_strs); /** + * @brief Get the array of languages available in this config + * @param c Pointer to configuration + * @param langs array of available language codes + * @return 0 on success usbg_error if error occurred + */ +extern int usbg_get_config_strs_langs(usbg_config *c, int **langs); + +/** * @brief Free configuration strings * @details This function releases the memory allocated for strings * not for struct usbg_config_strs itself. @@ -1705,6 +1705,11 @@ int usbg_get_gadget_strs_langs(usbg_gadget *g, int **langs) return usbg_get_strs_langs_by_path(g->path, g->name, langs); } +int usbg_get_config_strs_langs(usbg_config *c, int **langs) +{ + return usbg_get_strs_langs_by_path(c->path, c->name, langs); +} + int usbg_set_gadget_str(usbg_gadget *g, usbg_gadget_str str, int lang, const char *val) { |