XBPS Library API  0.19
The X Binary Package System
Data Fields
xbps_handle Struct Reference

Generic XBPS structure handler for initialization. More...

+ Collaboration diagram for xbps_handle:

Data Fields

const char * cachedir
 
const char * conffile
 
void(* fetch_cb )(struct xbps_fetch_cb_data *, void *)
 
void * fetch_cb_data
 
uint16_t fetch_timeout
 
int flags
 
const char * metadir
 
const char * rootdir
 
void(* state_cb )(struct xbps_state_cb_data *, void *)
 
void * state_cb_data
 
prop_dictionary_t transd
 
void(* unpack_cb )(struct xbps_unpack_cb_data *, void *)
 
void * unpack_cb_data
 

Detailed Description

This structure sets some global properties for libxbps, to set some function callbacks and data to the fetch, transaction and unpack functions, the root and cache directory, flags, etc.

Definition at line 483 of file xbps_api.h.

Field Documentation

cachedir

Cache directory to store downloaded binary packages. If NULL default value in XBPS_CACHE_PATH is used.

Definition at line 566 of file xbps_api.h.

Referenced by xbps_init().

conffile

Full path to the xbps configuration file.

Definition at line 592 of file xbps_api.h.

Referenced by xbps_init(), and xbps_pkg_exec_buffer().

void(* fetch_cb)(struct xbps_fetch_cb_data *, void *)

Pointer to the supplied function callback to be used in xbps_fetch_file().

Definition at line 545 of file xbps_api.h.

fetch_cb_data

Pointer to user supplied data to be passed as argument to the xbps_fetch_cb function callback.

Definition at line 552 of file xbps_api.h.

fetch_timeout

Unsigned integer to specify libfetch's timeout limit. If not set, it defaults to 30 (in seconds). This is set internally by the API from a setting in configuration file.

Definition at line 600 of file xbps_api.h.

Referenced by xbps_fetch_file(), and xbps_init().

flags

Flags to be set globally by ORing them, possible values:

  • XBPS_FLAG_VERBOSE
  • XBPS_FLAG_FORCE_CONFIGURE
  • XBPS_FLAG_FORCE_REMOVE_FILES
  • XBPS_FLAG_DEBUG
  • XBPS_FLAG_SYSLOG
  • XBPS_FLAG_INSTALL_AUTO
  • XBPS_FLAG_INSTALL_MANUAL

Definition at line 613 of file xbps_api.h.

Referenced by xbps_configure_pkg(), xbps_init(), xbps_register_pkg(), and xbps_remove_pkg_files().

metadir

Metadata directory for all operations in XBPS. If NULL, defaults to XBPS_CACHE_PATH (relative to rootdir).

Definition at line 573 of file xbps_api.h.

Referenced by xbps_configure_pkg(), xbps_init(), xbps_pkgdb_update(), xbps_register_pkg(), and xbps_remove_pkg().

rootdir

Root directory for all operations in XBPS. If NULL, by default it's set to /.

Definition at line 559 of file xbps_api.h.

Referenced by xbps_init(), xbps_pkg_exec_buffer(), xbps_remove_pkg(), and xbps_remove_pkg_files().

void(* state_cb)(struct xbps_state_cb_data *, void *)

Pointer to the supplifed function callback to be used in the XBPS possible states.

Definition at line 525 of file xbps_api.h.

void* state_cb_data

Pointer to user supplied data to be passed as argument to the xbps_state_cb function callback.

Definition at line 530 of file xbps_api.h.

transd

Proplib dictionary with transaction details, required by xbps_transaction_commit().

Definition at line 520 of file xbps_api.h.

Referenced by xbps_transaction_autoremove_pkgs(), xbps_transaction_commit(), xbps_transaction_prepare(), and xbps_transaction_remove_pkg().

void(* unpack_cb)(struct xbps_unpack_cb_data *, void *)

Pointer to the supplied function callback to be used in xbps_unpack_binary_pkg().

Definition at line 535 of file xbps_api.h.

void* unpack_cb_data

Pointer to user supplied data to be passed as argument to the xbps_unpack_cb function callback.

Definition at line 540 of file xbps_api.h.