aboutsummaryrefslogtreecommitdiff
path: root/src/pq/pq.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pq/pq.h')
-rw-r--r--src/pq/pq.h101
1 files changed, 0 insertions, 101 deletions
diff --git a/src/pq/pq.h b/src/pq/pq.h
deleted file mode 100644
index 9f7e45f62..000000000
--- a/src/pq/pq.h
+++ /dev/null
@@ -1,101 +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 */
35struct 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 * Suffix to append to path to load on startup.
64 */
65 char *auto_suffix;
66
67 /**
68 * Map managing event subscriptions.
69 */
70 struct GNUNET_CONTAINER_MultiShortmap *channel_map;
71
72 /**
73 * Task responsible for processing events.
74 */
75 struct GNUNET_SCHEDULER_Task *event_task;
76
77 /**
78 * File descriptor wrapper for @e event_task.
79 */
80 struct GNUNET_NETWORK_Handle *rfd;
81
82 /**
83 * Flags controlling the connection.
84 */
85 enum GNUNET_PQ_Options flags;
86};
87
88
89/**
90 * Internal API. Reconnect should re-register notifications
91 * after a disconnect.
92 *
93 * @param db the DB handle
94 * @param fd socket to listen on
95 */
96void
97GNUNET_PQ_event_reconnect_ (struct GNUNET_PQ_Context *db,
98 int fd);
99
100
101#endif