1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2  *
3  * Copyright (C) 2014 Red Hat, Inc.
4  * Copyright (C) 2015 Richard Hughes <richard@hughsie.com>
5  *
6  * Licensed under the GNU Lesser General Public License Version 2.1
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
21  */
22 
23 #ifndef __DNF_ADVISORYREF_H
24 #define __DNF_ADVISORYREF_H
25 
26 #ifdef __cplusplus
27 namespace libdnf {
28     struct AdvisoryRef;
29 }
30 typedef struct libdnf::AdvisoryRef DnfAdvisoryRef;
31 #else
32 typedef struct AdvisoryRef DnfAdvisoryRef;
33 #endif
34 
35 
36 typedef enum {
37         DNF_REFERENCE_KIND_UNKNOWN    = 0,
38         DNF_REFERENCE_KIND_BUGZILLA   = 1,
39         DNF_REFERENCE_KIND_CVE        = 2,
40         DNF_REFERENCE_KIND_VENDOR     = 3
41 } DnfAdvisoryRefKind;
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 void dnf_advisoryref_free(DnfAdvisoryRef *advisoryref);
48 DnfAdvisoryRefKind       dnf_advisoryref_get_kind       (DnfAdvisoryRef *advisoryref);
49 const char              *dnf_advisoryref_get_id         (DnfAdvisoryRef *advisoryref);
50 const char              *dnf_advisoryref_get_title      (DnfAdvisoryRef *advisoryref);
51 const char              *dnf_advisoryref_get_url        (DnfAdvisoryRef *advisoryref);
52 int                      dnf_advisoryref_compare        (DnfAdvisoryRef *left,
53                                                          DnfAdvisoryRef *right);
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif /* __DNF_ADVISORYREF_H */
60