summaryrefslogtreecommitdiff
path: root/osinfo/osinfo_loader.h
Commit message (Collapse)AuthorAgeFilesLines
* osinfo: use consistent include syntax for public headersDaniel P. Berrangé2022-01-181-1/+1
| | | | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* osinfo: switch to '#pragma once'Daniel P. Berrangé2022-01-181-9/+5
| | | | | | | | | | | | | | | | The current include files use the pattern #ifndef __OOSINFO_BLAH_H__ # define __OOSINFO_BLAH_H__ #endif /* __OOSINFO_BLAH_H__ */ Since we already mandated GCC + CLang, we can replace this with a simpler incantation #pragma once Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* Use OSINFO_DECLARE_TYPE* macrosFabiano Fidêncio2020-04-131-37/+8
| | | | Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* Update Copyright yearFabiano Fidêncio2020-04-131-1/+1
| | | | Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* Remove AuthorsFabiano Fidêncio2020-04-131-4/+0
| | | | | | | Authors are not often updated and do not reflect the current state of the code. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* loader: Introduce OsinfoError enumFabiano Fidêncio2020-01-041-0/+11
| | | | | | | | | | Let's create an OsinfoError enum instead of just using 0 as the error type. This solves the following instrospection warning: ``` <unknown>:: Warning: Libosinfo: (ErrorQuarkFunction)error_quark: osinfo_error_quark: Couldn't find corresponding enumeration ``` Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* Indent includes/definesFabiano Fidêncio2019-09-251-8/+8
| | | | | | | | By doing this, we can stop excluding files from sc_preprocessor_indentation check. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* Remove emacs 'Local variables' annotationsCole Robinson2019-03-071-7/+0
| | | | | | | | | No other virt projects have annotations like this, plus IMO .editorconfig handles this in a much nicer way and more flexible way. Ditch them Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
* loader: Introduce OSINFO_ERRORChristophe Fergeau2018-09-211-0/+8
| | | | | | | | | | | | | | | Since glib commit 2.31.10~16 [1], g_set_error() will issue a warning if it's passed a NULL domain. libosinfo is doing this in a few places (try for example 'osinfo-query os winxp'). This commit adds a generic OSINFO_ERROR domain which will be used instead of NULL. It's a bit inconsistent with OSINFO_MEDIA_ERROR and OSINFO_TREE_ERROR in that they both start with "osinfo-*" while OSINFO_ERROR uses "libosinfo". However, since OsinfoLoader already makes use of that quark, changing that would arguably be an (very small) ABI break. [1] https://gitlab.gnome.org/GNOME/glib/commit/6d9f874330 Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
* Remove FSF address from source file headersChristophe Fergeau2013-03-121-2/+2
| | | | | | | The FSF moved a while ago which made the address we use in every source file header invalid. Follow the recommendation from http://www.gnu.org/licenses/gpl-howto.html and don't put any address in these headers, just a link to the fsf website.
* Suppress gtk-doc warnings on missing field descriptionMichal Privoznik2012-12-071-0/+1
| | | | | | | Each public visible struct and enum must have documented items. If it hasn't, gtk-doc produces a lot of warnings. However, things it's complaining about doesn't have any interesting attributes, so mark them as private.
* Add support for loading extra local database filesDaniel P. Berrange2012-03-211-0/+3
| | | | | | | | | In addition to loading the system files from /usr/share/libosinfo/db, it will now also load files in /etc/libosinfo/db/ (if it exists) and $HOME/.local/config/libosinfo/db/ (if it exists) New APIs are also added to allow an application to load a subset of these locations, if they don't like the default behaviour
* Fix Red Hat copyright lineDaniel P. Berrange2012-02-241-1/+1
|
* Update to newer COPYING.LIB file with correct FSF addressDaniel P. Berrange2011-11-241-1/+1
|
* Add osinfo_loader_process_default_path()Zeeshan Ali (Khattak)2011-06-231-0/+1
| | | | | Add a method that enables applications to load the metadata osinfo provides without having to specify any paths.
* Add API docs for all public methodsDaniel P. Berrange2010-09-011-14/+0
| | | | | | | | | | | Add GTK-DOC api docs for all public methods, signals, objects, enums, etc. Include annotations required for GObject Introspection to get reference counting / memory allocation correct when doing automatic language binding generation * osinfo/*.c: Add API docs for all methods / signals / objects / enums * osinfo/*.h: Ensure parameter names match those in the corresponding .c file implementation to avoid confusing gtk-doc
* Add emacs magic for indentation rulesDaniel P. Berrange2010-08-311-0/+7
| | | | | | | | Fix some files where tabs have crept in for indentation and add emacs magic to ensure they don't return. * osinfo/*.h, osinfo/*.c, tests/*c: Add footer setting emacs indentation rules. Re-indent to comply.
* Convert loader to use GIODaniel P. Berrange2010-08-271-1/+2
| | | | | | | | | | | | | Direct use of POSIX/stdc I/O is deprecated in favour of the GIO system. Re-write the OsinfoLoader to use GIO for loading XML from arbitrary paths/uris. * configure.ac: Check for GIO library * osinfo/Makefile.am: Link to GIO * osinfo/osinfo_loader.c, osinfo/osinfo_loader.h: Port to GIO * test/osinfo.suppression: Supress many GIO data types * test/test-loader.c: update for new GIO api.
* Pull XML loader into a separate classDaniel P. Berrange2010-08-271-0/+89
Instead of having a method on the OsinfoDb class for loading XML, introduce a new object that can handle XML loading. This then gives back a DB when loading is finished * osinfo/osinfo_db.c, osinfo/osinfo_db.h: Remove backing-store property and xml loader methods * osinfo/osinfo_loader.c, osinfo/osinfo_loader.h: New class for loading XML files * osinfo/osinfo_dataread.c: Delete old loader * osinfo/libosinfo.syms, osinfo/osinfo.h, osinfo/Makefile.am: New loader class * test/Makefile.am, test/osinfo.suppression, test/test-db.c, test/test-loader.c: Update to use new loader class