summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/usbg/usbg.h8
-rw-r--r--src/usbg.c5
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.
diff --git a/src/usbg.c b/src/usbg.c
index 5bd1090..fb6ee4b 100644
--- a/src/usbg.c
+++ b/src/usbg.c
@@ -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)
{