libalpm
Arch Linux Package Manager Library
package.h File Reference
#include <sys/types.h>
#include <archive.h>
#include <archive_entry.h>
#include "alpm.h"
#include "backup.h"
#include "db.h"
#include "signing.h"
Include dependency graph for package.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pkg_operations
 Package operations struct. More...
 

Variables

const struct pkg_operations default_pkg_ops
 The standard package operations struct.
 

Data Structure Documentation

◆ pkg_operations

struct pkg_operations

Package operations struct.

This struct contains function pointers to all methods used to access data in a package to allow for things such as lazy package initialization (such as used by the file backend). Each backend is free to define a struct containing pointers to a specific implementation of these methods. Some backends may find using the defined default_pkg_ops struct to work just fine for their needs.

Collaboration diagram for pkg_operations:
Data Fields
int(*)(const alpm_pkg_t *, void *) changelog_close
void *(*)(alpm_pkg_t *) changelog_open
size_t(*)(void *, size_t, const alpm_pkg_t *, void *) changelog_read
int(*)(alpm_pkg_t *) force_load
const char *(*)(alpm_pkg_t *) get_arch
alpm_list_t *(*)(alpm_pkg_t *) get_backup
const char *(*)(alpm_pkg_t *) get_base
alpm_time_t(*)(alpm_pkg_t *) get_builddate
alpm_list_t *(*)(alpm_pkg_t *) get_checkdepends
alpm_list_t *(*)(alpm_pkg_t *) get_conflicts
alpm_list_t *(*)(alpm_pkg_t *) get_depends
const char *(*)(alpm_pkg_t *) get_desc
alpm_filelist_t *(*)(alpm_pkg_t *) get_files
alpm_list_t *(*)(alpm_pkg_t *) get_groups
alpm_time_t(*)(alpm_pkg_t *) get_installdate
off_t(*)(alpm_pkg_t *) get_isize
alpm_list_t *(*)(alpm_pkg_t *) get_licenses
alpm_list_t *(*)(alpm_pkg_t *) get_makedepends
alpm_list_t *(*)(alpm_pkg_t *) get_optdepends
const char *(*)(alpm_pkg_t *) get_packager
alpm_list_t *(*)(alpm_pkg_t *) get_provides
alpm_pkgreason_t(*)(alpm_pkg_t *) get_reason
alpm_list_t *(*)(alpm_pkg_t *) get_replaces
const char *(*)(alpm_pkg_t *) get_url
int(*)(alpm_pkg_t *) get_validation
alpm_list_t *(*)(alpm_pkg_t *) get_xdata
int(*)(alpm_pkg_t *) has_scriptlet
int(*)(const alpm_pkg_t *, struct archive *) mtree_close
int(*)(const alpm_pkg_t *, struct archive *, struct archive_entry **) mtree_next
struct archive *(*)(alpm_pkg_t *) mtree_open

Variable Documentation

◆ default_pkg_ops

const struct pkg_operations default_pkg_ops
extern

The standard package operations struct.

get fields directly from the struct itself with no abstraction layer or any type of lazy loading. The actual definition is in package.c so it can have access to the default accessor functions which are defined there.

Get fields directly from the struct itself with no abstraction layer or any type of lazy loading.

Referenced by get_file_pkg_ops(), and get_sync_pkg_ops().