libalpm
Arch Linux Package Manager Library
|
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>
#include "alpm_list.h"
#include "alpm.h"
#include <curl/curl.h>
Go to the source code of this file.
Data Structures | |
struct | __alpm_handle_t |
Defines | |
#define | EVENT(h, e, d1, d2) |
#define | QUESTION(h, q, d1, d2, d3, r) |
#define | PROGRESS(h, e, p, per, n, r) |
Functions | |
alpm_handle_t * | _alpm_handle_new (void) |
void | _alpm_handle_free (alpm_handle_t *handle) |
int | _alpm_handle_lock (alpm_handle_t *handle) |
Lock the database. | |
int | _alpm_handle_unlock (alpm_handle_t *handle) |
Remove a lock file. | |
alpm_errno_t | _alpm_set_directory_option (const char *value, char **storage, int must_exist) |
#define EVENT | ( | h, | |
e, | |||
d1, | |||
d2 | |||
) |
do { \ if((h)->eventcb) { \ (h)->eventcb(e, d1, d2); \ } \ } while(0)
Definition at line 34 of file handle.h.
Referenced by _alpm_remove_prepare(), _alpm_remove_single_package(), _alpm_run_chroot(), _alpm_sync_commit(), and _alpm_sync_prepare().
#define PROGRESS | ( | h, | |
e, | |||
p, | |||
per, | |||
n, | |||
r | |||
) |
do { \ if((h)->progresscb) { \ (h)->progresscb(e, p, per, n, r); \ } \ } while(0)
Definition at line 46 of file handle.h.
Referenced by _alpm_check_diskspace(), and _alpm_db_find_fileconflicts().
#define QUESTION | ( | h, | |
q, | |||
d1, | |||
d2, | |||
d3, | |||
r | |||
) |
do { \ if((h)->questioncb) { \ (h)->questioncb(q, d1, d2, d3, r); \ } \ } while(0)
Definition at line 40 of file handle.h.
Referenced by _alpm_process_siglist(), _alpm_sync_prepare(), and alpm_find_group_pkgs().
void _alpm_handle_free | ( | alpm_handle_t * | handle | ) |
Definition at line 50 of file handle.c.
References _alpm_trans_free(), __alpm_handle_t::arch, __alpm_handle_t::cachedirs, __alpm_handle_t::curl, __alpm_handle_t::dbpath, __alpm_handle_t::dbs_sync, __alpm_handle_t::delta_regex, FREE, FREELIST, __alpm_handle_t::gpgdir, __alpm_handle_t::ignoregroup, __alpm_handle_t::ignorepkg, __alpm_handle_t::lockfile, __alpm_handle_t::logfile, __alpm_handle_t::logstream, __alpm_handle_t::noextract, __alpm_handle_t::noupgrade, __alpm_handle_t::root, __alpm_handle_t::trans, and __alpm_handle_t::usesyslog.
Referenced by alpm_initialize(), and alpm_release().
int _alpm_handle_lock | ( | alpm_handle_t * | handle | ) |
Lock the database.
Definition at line 91 of file handle.c.
References _alpm_makepath(), ASSERT, FREE, __alpm_handle_t::lckstream, and __alpm_handle_t::lockfile.
Referenced by alpm_db_update(), and alpm_trans_init().
alpm_handle_t* _alpm_handle_new | ( | void | ) |
Definition at line 41 of file handle.c.
References CALLOC, and handle.
Referenced by alpm_initialize().
int _alpm_handle_unlock | ( | alpm_handle_t * | handle | ) |
Remove a lock file.
Definition at line 126 of file handle.c.
References ASSERT, __alpm_handle_t::lckstream, and __alpm_handle_t::lockfile.
Referenced by alpm_db_update(), alpm_release(), and alpm_trans_release().
alpm_errno_t _alpm_set_directory_option | ( | const char * | value, |
char ** | storage, | ||
int | must_exist | ||
) |
Definition at line 343 of file handle.c.
References ALPM_ERR_MEMORY, ALPM_ERR_NOT_A_DIR, ALPM_ERR_WRONG_ARGS, CALLOC, and FREE.
Referenced by alpm_initialize().