callback.c File Reference

#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include <dirent.h>
#include <wchar.h>
#include <alpm.h>
#include "callback.h"
#include "util.h"
#include "conf.h"

Include dependency graph for callback.c:

Go to the source code of this file.

Defines

#define LOG_STR_LEN   256
#define FILENAME_TRIM_LEN   23

Functions

void cb_trans_evt (pmtransevt_t event, void *data1, void *data2)
void cb_trans_conv (pmtransconv_t event, void *data1, void *data2, void *data3, int *response)
void cb_trans_progress (pmtransprog_t event, const char *pkgname, int percent, int howmany, int remain)
void cb_dl_progress (const char *filename, int file_xfered, int file_total, int list_xfered, int list_total)
void cb_log (pmloglevel_t level, char *fmt, va_list args)


Define Documentation

#define FILENAME_TRIM_LEN   23

Definition at line 39 of file callback.c.

Referenced by cb_dl_progress().

#define LOG_STR_LEN   256

Definition at line 38 of file callback.c.

Referenced by cb_trans_conv(), and cb_trans_evt().


Function Documentation

void cb_dl_progress ( const char *  filename,
int  file_xfered,
int  file_total,
int  list_xfered,
int  list_total 
)

Definition at line 436 of file callback.c.

References config, FILENAME_TRIM_LEN, getcols(), __config_t::noprogressbar, __config_t::totaldownload, and UPDATE_SPEED_SEC.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void cb_log ( pmloglevel_t  level,
char *  fmt,
va_list  args 
)

Definition at line 565 of file callback.c.

References alpm_list_add(), pm_vasprintf(), and pm_vfprintf().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void cb_trans_conv ( pmtransconv_t  event,
void *  data1,
void *  data2,
void *  data3,
int *  response 
)

Definition at line 256 of file callback.c.

References _, alpm_pkg_get_name(), alpm_pkg_get_version(), config, LOG_STR_LEN, __config_t::noconfirm, __config_t::op_s_downloadonly, PM_TRANS_CONV_CONFLICT_PKG, PM_TRANS_CONV_CORRUPTED_PKG, PM_TRANS_CONV_INSTALL_IGNOREPKG, PM_TRANS_CONV_LOCAL_NEWER, PM_TRANS_CONV_REMOVE_HOLDPKG, PM_TRANS_CONV_REPLACE_PKG, and yesno().

Referenced by pacman_add(), and pacman_remove().

Here is the call graph for this function:

Here is the caller graph for this function:

void cb_trans_evt ( pmtransevt_t  event,
void *  data1,
void *  data2 
)

Definition at line 159 of file callback.c.

References _, alpm_logaction(), alpm_pkg_get_name(), alpm_pkg_get_version(), config, LOG_STR_LEN, __config_t::noprogressbar, PM_TRANS_EVT_ADD_DONE, PM_TRANS_EVT_ADD_START, PM_TRANS_EVT_CHECKDEPS_DONE, PM_TRANS_EVT_CHECKDEPS_START, PM_TRANS_EVT_DELTA_INTEGRITY_DONE, PM_TRANS_EVT_DELTA_INTEGRITY_START, PM_TRANS_EVT_DELTA_PATCH_DONE, PM_TRANS_EVT_DELTA_PATCH_FAILED, PM_TRANS_EVT_DELTA_PATCH_START, PM_TRANS_EVT_DELTA_PATCHES_DONE, PM_TRANS_EVT_DELTA_PATCHES_START, PM_TRANS_EVT_EXTRACT_DONE, PM_TRANS_EVT_FILECONFLICTS_DONE, PM_TRANS_EVT_FILECONFLICTS_START, PM_TRANS_EVT_INTEGRITY_DONE, PM_TRANS_EVT_INTEGRITY_START, PM_TRANS_EVT_INTERCONFLICTS_DONE, PM_TRANS_EVT_INTERCONFLICTS_START, PM_TRANS_EVT_PRINTURI, PM_TRANS_EVT_REMOVE_DONE, PM_TRANS_EVT_REMOVE_START, PM_TRANS_EVT_RESOLVEDEPS_DONE, PM_TRANS_EVT_RESOLVEDEPS_START, PM_TRANS_EVT_RETRIEVE_START, PM_TRANS_EVT_SCRIPTLET_INFO, PM_TRANS_EVT_UPGRADE_DONE, and PM_TRANS_EVT_UPGRADE_START.

Referenced by pacman_add(), and pacman_remove().

Here is the call graph for this function:

Here is the caller graph for this function:

void cb_trans_progress ( pmtransprog_t  event,
const char *  pkgname,
int  percent,
int  howmany,
int  remain 
)

Definition at line 325 of file callback.c.

References _, config, __alpm_list_t::data, FREELIST, getcols(), __alpm_list_t::next, __config_t::noprogressbar, PM_TRANS_PROGRESS_ADD_START, PM_TRANS_PROGRESS_CONFLICTS_START, PM_TRANS_PROGRESS_REMOVE_START, and PM_TRANS_PROGRESS_UPGRADE_START.

Referenced by pacman_add(), and pacman_remove().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Mon Jan 14 23:55:26 2008 for libalpm by  doxygen 1.5.4