ll2_new_context3
Allocates context which defines the lastlog2 environment.
Usage
#include <lastlog2.h>
*ll2_context * ll2_new_context(const char *db_path);
Overview
Defines lastlog2 context e.g. database file, which will be used for any other lastlog2 call. If db_path is NULL, the default path defined in LL2_DEFAULT_DATABASE will be taken.
const char *db_path = "/var/lib/lastlog/lastlog2.db"; ll2_context *context = ll2_new_context(db_path);
Return value
Returns context which will be used for all other lastlog2 library calls. This context should be released with ll2_unref_context when it is not needed anymore. Returns NULL on an error.