libalpm
Arch Linux Package Manager Library
Data Structures | Defines | Functions
handle.h File Reference
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>
#include "alpm_list.h"
#include "alpm.h"
#include <curl/curl.h>
Include dependency graph for handle.h:
This graph shows which files directly or indirectly include this file:

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 Documentation

#define EVENT (   h,
  e,
  d1,
  d2 
)
Value:
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,
 
)
Value:
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,
 
)
Value:
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().


Function Documentation

void _alpm_handle_free ( alpm_handle_t handle)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 41 of file handle.c.

References CALLOC, and handle.

Referenced by alpm_initialize().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function: