aboutsummaryrefslogtreecommitdiff
path: root/deps/sysobj_early/include/util_ids.h
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-11-01 12:15:13 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-11-13 14:11:23 -0800
commit0830d5ca73ee0e198a4efdc18336fd8afb508f02 (patch)
treedb60f72f1135790e8e2c62df6d52f0da3148b17b /deps/sysobj_early/include/util_ids.h
parentc6073b029a271eb623d156d834d24781ae636f31 (diff)
util_ids: fix, update
Fixes https://github.com/lpereira/hardinfo/issues/476 Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'deps/sysobj_early/include/util_ids.h')
-rw-r--r--deps/sysobj_early/include/util_ids.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/deps/sysobj_early/include/util_ids.h b/deps/sysobj_early/include/util_ids.h
index 53656443..e9d495ea 100644
--- a/deps/sysobj_early/include/util_ids.h
+++ b/deps/sysobj_early/include/util_ids.h
@@ -33,6 +33,7 @@ typedef struct {
} ids_query_result;
#define ids_query_result_new() g_new0(ids_query_result, 1)
#define ids_query_result_free(s) g_free(s);
+void ids_query_result_cpy(ids_query_result *dest, ids_query_result *src);
/* Given a qpath "/X/Y/Z", find names as:
* X <name> ->result[0]
@@ -46,6 +47,7 @@ typedef struct {
* - sdio.ids "<vendor>/<device>", "C <class>"
* - sdcard.ids "OEMID <code>", "MANFID <code>"
* - usb.ids "<vendor>/<device>", "C <class>" etc.
+ * - edid.ids "<3letter_vendor>"
*/
long scan_ids_file(const gchar *file, const gchar *qpath, ids_query_result *result, long start_offset);
@@ -54,6 +56,8 @@ typedef struct {
ids_query_result result;
} ids_query;
+void ids_query_result_cpy(ids_query_result *dest, ids_query_result *src);
+
ids_query *ids_query_new(const gchar *qpath);
void ids_query_free(ids_query *s);
typedef GSList* ids_query_list;
@@ -63,4 +67,12 @@ long scan_ids_file_list(const gchar *file, ids_query_list query_list, long start
/* after scan_ids_file_list(), count hits */
int query_list_count_found(ids_query_list query_list);
+/* returns GSList of ids_query* */
+typedef gchar* (*split_loc_function)(const char *line);
+ids_query_list ids_file_all_get_all(const gchar *file, split_loc_function split_loc_func);
+
+/* debugging */
+void ids_trace_start();
+void ids_trace_stop();
+
#endif