libalpm
Arch Linux Package Manager Library
|
Functions to initialize and release libalpm. More...
Functions | |
alpm_handle_t * | alpm_initialize (const char *root, const char *dbpath, alpm_errno_t *err) |
Initializes the library. | |
int | alpm_release (alpm_handle_t *myhandle) |
Release the library. |
Functions to initialize and release libalpm.
alpm_handle_t* alpm_initialize | ( | const char * | root, |
const char * | dbpath, | ||
alpm_errno_t * | err | ||
) |
Initializes the library.
This must be called before any other functions are called.
root | the root path for all filesystem operations |
dbpath | the absolute path to the libalpm database |
err | an optional variable to hold any error return codes |
Definition at line 47 of file alpm.c.
References _alpm_db_register_local(), _alpm_handle_free(), _alpm_handle_new(), _alpm_set_directory_option(), ALPM_ERR_MEMORY, __alpm_handle_t::dbpath, __alpm_handle_t::lockfile, __alpm_handle_t::pm_errno, and __alpm_handle_t::root.
Referenced by main().
int alpm_release | ( | alpm_handle_t * | myhandle | ) |
Release the library.
This should be the last alpm call you make. After this returns, handle should be considered invalid and cannot be reused in any way.
myhandle | the context handle |
Definition at line 95 of file alpm.c.
References _alpm_handle_free(), _alpm_handle_unlock(), alpm_db_unregister_all(), CHECK_HANDLE, __alpm_handle_t::db_local, __alpm_db_t::ops, and db_operations::unregister.
Referenced by main().