diff options
Diffstat (limited to 'src/pq/pq.h')
-rw-r--r-- | src/pq/pq.h | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/src/pq/pq.h b/src/pq/pq.h deleted file mode 100644 index 354d85a9f..000000000 --- a/src/pq/pq.h +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2017, 2019 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | 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 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | /** | ||
21 | * @file pq/pq.h | ||
22 | * @brief shared internal data structures of libgnunetpq | ||
23 | * @author Christian Grothoff | ||
24 | */ | ||
25 | #ifndef PQ_H | ||
26 | #define PQ_H | ||
27 | |||
28 | #include "gnunet_util_lib.h" | ||
29 | #include "gnunet_pq_lib.h" | ||
30 | |||
31 | |||
32 | /** | ||
33 | * Handle to Postgres database. | ||
34 | */ | ||
35 | struct GNUNET_PQ_Context | ||
36 | { | ||
37 | /** | ||
38 | * Actual connection. | ||
39 | */ | ||
40 | PGconn *conn; | ||
41 | |||
42 | /** | ||
43 | * Statements to execute upon connection. | ||
44 | */ | ||
45 | struct GNUNET_PQ_ExecuteStatement *es; | ||
46 | |||
47 | /** | ||
48 | * Prepared statements. | ||
49 | */ | ||
50 | struct GNUNET_PQ_PreparedStatement *ps; | ||
51 | |||
52 | /** | ||
53 | * Configuration to use to connect to the DB. | ||
54 | */ | ||
55 | char *config_str; | ||
56 | |||
57 | /** | ||
58 | * Path to load SQL files from. | ||
59 | */ | ||
60 | char *load_path; | ||
61 | |||
62 | /** | ||
63 | * Map managing event subscriptions. | ||
64 | */ | ||
65 | struct GNUNET_CONTAINER_MultiShortmap *channel_map; | ||
66 | |||
67 | /** | ||
68 | * Task responsible for processing events. | ||
69 | */ | ||
70 | struct GNUNET_SCHEDULER_Task *event_task; | ||
71 | |||
72 | /** | ||
73 | * File descriptor wrapper for @e event_task. | ||
74 | */ | ||
75 | struct GNUNET_NETWORK_Handle *rfd; | ||
76 | |||
77 | /** | ||
78 | * Flags controlling the connection. | ||
79 | */ | ||
80 | enum GNUNET_PQ_Options flags; | ||
81 | }; | ||
82 | |||
83 | |||
84 | /** | ||
85 | * Internal API. Reconnect should re-register notifications | ||
86 | * after a disconnect. | ||
87 | * | ||
88 | * @param db the DB handle | ||
89 | * @param fd socket to listen on | ||
90 | */ | ||
91 | void | ||
92 | GNUNET_PQ_event_reconnect_ (struct GNUNET_PQ_Context *db, | ||
93 | int fd); | ||
94 | |||
95 | |||
96 | #endif | ||