diff options
author | Burt P <pburt0@gmail.com> | 2018-05-29 17:38:04 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-06-02 18:52:31 -0700 |
commit | 41b2c29a6c516ea6027c7ca6b14351d51cdf7643 (patch) | |
tree | 58e348ecbfdd0d60a2180765fbad10f77ce03133 /includes/vendor.h | |
parent | 65dc5d0c8b3fc8adc16efdc5250b26b182297b27 (diff) |
vendor.c: add some data fields and cleanup
* Initialize strings to empty in `read_from_vendor_ids()`
* vendor.ids format reader clears all fields at `name`
* Added `name_short`, and `url_support` fields
* `vendor_cleanup()` function that frees `vendor_list`
* `vendor_match()` returns the whole `Vendor` data structure
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'includes/vendor.h')
-rw-r--r-- | includes/vendor.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/vendor.h b/includes/vendor.h index 021f4e78..9fe1f995 100644 --- a/includes/vendor.h +++ b/includes/vendor.h @@ -24,11 +24,16 @@ struct _Vendor { char *match_string; int match_case; /* 0 = ignore case, 1 = match case */ char *name; + char *name_short; char *url; + char *url_support; }; -void vendor_init(void); +void vendor_init(void); +void vendor_cleanup(void); +const Vendor *vendor_match(const gchar *id_str, ...); /* end list of strings with NULL */ const gchar *vendor_get_name(const gchar *id_str); const gchar *vendor_get_url(const gchar *id_str); +void vendor_free(Vendor *v); #endif /* __VENDOR_H__ */ |