GNUnet  0.11.x
pq.h
Go to the documentation of this file.
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  */
25 #ifndef PQ_H
26 #define PQ_H
27 
28 #include "gnunet_util_lib.h"
29 #include "gnunet_pq_lib.h"
30 
31 
36 {
40  PGconn *conn;
41 
46 
51 
55  char *config_str;
56 
60  char *load_path;
61 
66 
71 
76 };
77 
78 
86 void
88  int fd);
89 
90 
91 #endif
static struct GNUNET_FS_DirectoryBuilder * db
Definition: gnunet-search.c:41
helper functions for Postgres DB interactions
void GNUNET_PQ_event_reconnect_(struct GNUNET_PQ_Context *db, int fd)
Internal API.
Definition: pq_event.c:383
Internal representation of the hash map.
handle to a socket
Definition: network.c:53
Handle to Postgres database.
Definition: pq.h:36
struct GNUNET_PQ_ExecuteStatement * es
Statements to execute upon connection.
Definition: pq.h:45
struct GNUNET_NETWORK_Handle * rfd
File descriptor wrapper for event_task.
Definition: pq.h:75
struct GNUNET_SCHEDULER_Task * event_task
Task responsible for processing events.
Definition: pq.h:70
char * load_path
Path to load SQL files from.
Definition: pq.h:60
struct GNUNET_PQ_PreparedStatement * ps
Prepared statements.
Definition: pq.h:50
struct GNUNET_CONTAINER_MultiShortmap * channel_map
Map managing event subscriptions.
Definition: pq.h:65
char * config_str
Configuration to use to connect to the DB.
Definition: pq.h:55
PGconn * conn
Actual connection.
Definition: pq.h:40
Information needed to run a list of SQL statements using GNUNET_PQ_exec_statements().
Information needed to prepare a list of SQL statements using GNUNET_PQ_prepare_statements().
Entry in list of pending tasks.
Definition: scheduler.c:135