aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2016-03-10 17:42:09 +0100
committerRobin Krahl <me@robin-krahl.de>2016-03-10 17:42:09 +0100
commit4c68c15d4d3102b26b824b0021901d1dd9d79e77 (patch)
tree47688168607b1c25002ab45eeb197a3bfaa21567 /man
parentde9f0aa8f8d248292815e5571e1fa3fb068de8c3 (diff)
downloaddbfp-4c68c15d4d3102b26b824b0021901d1dd9d79e77.tar.gz
dbfp-4c68c15d4d3102b26b824b0021901d1dd9d79e77.tar.bz2
dbfp: move curl handle to dbfp
As the curl handle can be reused between requests, it is moved to the dbfp structure, initialized in dbfp_init and freed in dbfp_close.
Diffstat (limited to 'man')
-rw-r--r--man/dbfp.316
1 files changed, 12 insertions, 4 deletions
diff --git a/man/dbfp.3 b/man/dbfp.3
index e423f38..6e9cc2a 100644
--- a/man/dbfp.3
+++ b/man/dbfp.3
@@ -8,6 +8,8 @@ dbfp, dbfp_init, dbfp_close \- handle metadata for connections to the DB timetab
.B struct dbfp {
.RS
.B char *key;
+.br
+.B CURL *curl;
.RE
.B };
.HP
@@ -19,12 +21,14 @@ dbfp, dbfp_init, dbfp_close \- handle metadata for connections to the DB timetab
stores the metadata for connections to the DB timetable API.
.B key
is the API key used for API queries.
+.B curl
+is the curl handle used for the API requests.
.PP
.B dbfp_init
-initializes a dbfp structure and sets the API key to the given value. dbfp and
-key may not be NULL. dbfp must already be allocated. The key is copied to the
-dbfp structure. Every structure that was initialized with this function must
-be closed with dbfp_close.
+initializes a dbfp structure with the given API key. dbfp and key may not be
+NULL. dbfp must already be allocated. The key is copied to the dbfp structure.
+Every structure that was initialized with this function must be closed with
+dbfp_close.
.PP
.B dbfp_close
closes a dbfp structure and releases its allocated resources. dbfp itself is
@@ -43,6 +47,10 @@ ENOMEM
.RS
if there is not enough memory to copy the key in dbfp_init
.RE
+DBFP_ERROR_CURL
+.RS
+if the curl handle could not be created
+.RE
.SH EXAMPLE
#include <dbfp.h>
.br