Commit 7ffc4184 authored by Michael Tremer's avatar Michael Tremer

man: Add man page for loc_database_new

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 3643b0bd
......@@ -422,6 +422,7 @@ src_test_signature_LDADD = \
MANPAGES = \
man/libloc.3 \
man/location.8 \
man/loc_database_new.3 \
man/loc_get_log_priority.3 \
man/loc_new.3 \
man/loc_set_log_fn.3 \
......
= loc_database_new(3)
== Name
loc_database_new - Create a new libloc context
== Synopsis
[verse]
#include <libloc/libloc.h>
#include <libloc/database.h>
struct loc_database;
int loc_database_new(struct loc_ctx{empty}* ctx,
struct loc_database{empty}*{empty}* database, FILE{empty}* f);
Reference Counting:
struct loc_database{empty}* loc_database_ref(struct loc_database{empty}* db);
struct loc_database{empty}* loc_database_unref(struct loc_database{empty}* db);
Access some data:
time_t loc_database_created_at(struct loc_database{empty}* db);
const char{empty}* loc_database_get_vendor(struct loc_database{empty}* db);
const char{empty}* loc_database_get_description(struct loc_database{empty}* db);
const char{empty}* loc_database_get_license(struct loc_database{empty}* db);
== Description
loc_database_new() opens a new database from the given file descriptor.
The file descriptor can be closed after this operation because the function is creating
its own copy.
If the database could be opened successfully, zero is returned. Otherwise a non-zero
return code will indicate an error and errno will be set appropriately.
Various meta-data about the database can be retrieved with
loc_database_created_at(), loc_database_get_vendor(), loc_database_get_description(),
and loc_database_get_license().
== See Also
link:libloc[3]
== Authors
Michael Tremer
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment