Greenbone Vulnerability Manager  8.0.1~git
iterator.h
Go to the documentation of this file.
1 /* Copyright (C) 2016-2018 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the 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 General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
28 #ifndef _GVMD_ITERATOR_H
29 #define _GVMD_ITERATOR_H
30 
31 #include "lsc_crypt.h"
32 
33 #include <glib.h>
34 
35 /* Types. */
36 
40 typedef long long int resource_t;
41 
45 typedef struct sql_stmt sql_stmt_t;
46 
50 struct iterator
51 {
53  gboolean done;
54  int prepared;
56 };
57 
61 typedef struct iterator iterator_t;
62 
63 /* Functions. */
64 
65 void
67 
68 gboolean
69 next (iterator_t *);
70 
71 #endif /* not _GVMD_ITERATOR_H */
A generic SQL iterator structure.
Definition: iterator.h:50
lsc_crypt_ctx_t crypt_ctx
Encryption context.
Definition: iterator.h:55
gboolean done
End flag.
Definition: iterator.h:53
An SQL statement.
Definition: sql_pg.c:57
The context object for encryption operations.
Definition: lsc_crypt.c:88
sql_stmt_t * stmt
SQL statement.
Definition: iterator.h:52
int prepared
Prepared flag.
Definition: iterator.h:54
void cleanup_iterator(iterator_t *)
Cleanup an iterator.
Definition: sql.c:655
gboolean next(iterator_t *)
Increment an iterator.
Definition: sql.c:680
long long int resource_t
A resource, like a task or target.
Definition: iterator.h:40