1 /* Copyright (C) 2019-2020 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_TICKETS_H
20 #define _GVMD_MANAGE_TICKETS_H
21 
22 #include "manage.h"
23 #include "iterator.h"
24 
25 int
26 ticket_count (const get_data_t *);
27 
28 int
29 init_ticket_iterator (iterator_t *, const get_data_t *);
30 
31 const char*
32 ticket_iterator_user_id (iterator_t*);
33 
34 const char*
35 ticket_iterator_user_name (iterator_t*);
36 
37 const char*
38 ticket_iterator_task_id (iterator_t*);
39 
40 const char*
41 ticket_iterator_task_name (iterator_t*);
42 
43 const char*
44 ticket_iterator_report_id (iterator_t*);
45 
46 double
47 ticket_iterator_severity (iterator_t*);
48 
49 const char*
50 ticket_iterator_host (iterator_t*);
51 
52 const char*
53 ticket_iterator_location (iterator_t*);
54 
55 const char*
56 ticket_iterator_solution_type (iterator_t*);
57 
58 const char*
59 ticket_iterator_status (iterator_t*);
60 
61 const char*
62 ticket_iterator_open_time (iterator_t*);
63 
64 const char*
65 ticket_iterator_fixed_time (iterator_t*);
66 
67 const char*
68 ticket_iterator_closed_time (iterator_t*);
69 
70 const char*
71 ticket_iterator_fix_verified_time (iterator_t*);
72 
73 int
74 ticket_iterator_orphan (iterator_t*);
75 
76 const char*
77 ticket_iterator_open_note (iterator_t*);
78 
79 const char*
80 ticket_iterator_fixed_note (iterator_t*);
81 
82 const char*
83 ticket_iterator_closed_note (iterator_t*);
84 
85 const char*
86 ticket_iterator_fix_verified_report_id (iterator_t*);
87 
88 const char*
89 ticket_iterator_nvt_oid (iterator_t*);
90 
91 int
92 init_ticket_result_iterator (iterator_t *, const gchar *, int);
93 
94 const char*
95 ticket_result_iterator_result_id (iterator_t*);
96 
97 int
98 init_result_ticket_iterator (iterator_t *, result_t);
99 
100 const char*
101 result_ticket_iterator_ticket_id (iterator_t*);
102 
103 int
104 ticket_in_use (ticket_t);
105 
106 int
107 trash_ticket_in_use (ticket_t);
108 
109 int
110 ticket_writable (ticket_t);
111 
112 int
113 trash_ticket_writable (ticket_t);
114 
115 int
116 create_ticket (const char *, const char *, const char *, const char *, ticket_t *) __attribute__((weak));
117 
118 int
119 copy_ticket (const char *, const char *, ticket_t *) __attribute__((weak));
120 
121 char*
122 ticket_uuid (ticket_t) __attribute__((weak));
123 
124 int
125 modify_ticket (const gchar *, const gchar *, const gchar *,
126                const gchar *, const gchar *, const gchar *,
127                const gchar *);
128 
129 #endif /* not _GVMD_MANAGE_TICKETS_H */
130