GNUnet  0.19.3
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  unsigned int ps_len;
56 
60  unsigned int ps_off;
61 
65  char *config_str;
66 
70  char *load_path;
71 
75  char *auto_suffix;
76 
81 
86 
91 
96 
101 };
102 
103 
111 void
113  int fd);
114 
115 
116 #endif
static struct GNUNET_FS_DirectoryBuilder * db
Definition: gnunet-search.c:97
helper functions for Postgres DB interactions
GNUNET_PQ_Options
Flags to control PQ operation.
void GNUNET_PQ_event_reconnect_(struct GNUNET_PQ_Context *db, int fd)
Internal API.
Definition: pq_event.c:412
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
enum GNUNET_PQ_Options flags
Flags controlling the connection.
Definition: pq.h:100
struct GNUNET_NETWORK_Handle * rfd
File descriptor wrapper for event_task.
Definition: pq.h:90
unsigned int ps_off
Last used offset in the ps array.
Definition: pq.h:60
struct GNUNET_SCHEDULER_Task * event_task
Task responsible for processing events.
Definition: pq.h:85
char * load_path
Path to load SQL files from.
Definition: pq.h:70
unsigned int ps_len
Length of the ps array.
Definition: pq.h:55
struct GNUNET_TIME_Relative resubscribe_backoff
How fast should we resubscribe again?
Definition: pq.h:95
struct GNUNET_PQ_PreparedStatement * ps
Prepared statements.
Definition: pq.h:50
struct GNUNET_CONTAINER_MultiShortmap * channel_map
Map managing event subscriptions.
Definition: pq.h:80
char * config_str
Configuration to use to connect to the DB.
Definition: pq.h:65
PGconn * conn
Actual connection.
Definition: pq.h:40
char * auto_suffix
Suffix to append to path to load on startup.
Definition: pq.h:75
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:136
Time for relative time used by GNUnet, in microseconds.