Greenbone Vulnerability Manager  22.4.0~dev1
manage_sql_report_formats.h
1 /* Copyright (C) 2020-2022 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: AGPL-3.0-or-later
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as
7  * published by the Free Software Foundation, either version 3 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef _GVMD_MANAGE_SQL_REPORT_FORMATS_H
20 #define _GVMD_MANAGE_SQL_REPORT_FORMATS_H
21 
22 #include "manage.h"
23 #include "manage_sql.h"
24 
25 #include <glib.h>
26 
27 gboolean
28 lookup_report_format (const char*, report_format_t*);
29 
30 gboolean
31 find_report_format_no_acl (const char *, report_format_t *);
32 
33 gboolean
34 find_trash_report_format_no_acl (const char *, report_format_t *);
35 
36 int
37 create_report_format_no_acl (const char *, const char *, const char *,
38  const char *, const char *, const char *,
39  array_t *, array_t *, array_t *, const char *,
40  int, report_format_t *);
41 
42 const char**
43 report_format_filter_columns ();
44 
45 column_t*
46 report_format_select_columns ();
47 
48 int
49 restore_report_format (const char *);
50 
51 gchar *
52 apply_report_format (gchar *, gchar *, gchar *, gchar *,
53  GList **);
54 
55 gboolean
56 delete_report_formats_user (user_t, iterator_t *);
57 
58 void
59 delete_report_format_dirs_user (const gchar *, iterator_t *);
60 
61 int
62 empty_trashcan_report_formats ();
63 
64 gboolean
65 inherit_report_formats (user_t, user_t, iterator_t *);
66 
67 void
68 inherit_report_format_dir (const gchar *, const gchar *, user_t);
69 
70 void
71 update_report_format (report_format_t, const gchar *, const gchar *,
72  const gchar *, const gchar *, const gchar *,
73  const gchar *, const gchar *, array_t *, array_t *,
74  array_t *);
75 
76 int
77 report_format_updated_in_feed (report_format_t, const gchar *);
78 
79 int
80 migrate_predefined_report_formats ();
81 
82 int
83 check_db_report_formats ();
84 
85 int
86 check_db_report_formats_trash ();
87 
88 int
89 print_report_xml_end (gchar *, gchar *, report_format_t);
90 
91 #endif /* not _GVMD_MANAGE_SQL_REPORT_FORMATS_H */
gboolean find_trash_report_format_no_acl(const char *uuid, report_format_t *report_format)
Find a trash report format given a UUID.
Definition: manage_sql_report_formats.c:509
gboolean find_report_format_no_acl(const char *uuid, report_format_t *report_format)
Find a report format given a UUID.
Definition: manage_sql_report_formats.c:470
gboolean lookup_report_format(const char *name, report_format_t *report_format)
Find a report format given a name.
Definition: manage_sql_report_formats.c:418
int restore_report_format(const char *report_format_id)
Try restore a report format.
Definition: manage_sql_report_formats.c:1968
int create_report_format_no_acl(const char *uuid, const char *name, const char *content_type, const char *extension, const char *summary, const char *description, array_t *files, array_t *params, array_t *params_options, const char *signature, int predefined, report_format_t *report_format)
Create a report format.
Definition: manage_sql_report_formats.c:1251
Iterator column.
Definition: manage_sql.h:217
A generic SQL iterator structure.
Definition: iterator.h:50