dpkg 1.21.11
db-ctrl.h
Go to the documentation of this file.
1/*
2 * libdpkg - Debian packaging suite library routines
3 * db-ctrl.h - package control information database
4 *
5 * Copyright © 2011-2014 Guillem Jover <guillem@debian.org>
6 *
7 * This is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef LIBDPKG_DB_CTRL_H
22#define LIBDPKG_DB_CTRL_H
23
24#include <stdbool.h>
25
26#include <dpkg/dpkg-db.h>
27
29
35};
36
40void pkg_infodb_upgrade(void);
41
42const char *pkg_infodb_get_dir(void);
43const char *pkg_infodb_get_file(const struct pkginfo *pkg, const struct pkgbin *pkgbin,
44 const char *filetype);
45const char *pkg_infodb_reset_dir(void);
46bool pkg_infodb_has_file(struct pkginfo *pkg, struct pkgbin *pkgbin,
47 const char *name);
48
49typedef void pkg_infodb_file_func(const char *filename, const char *filetype);
50
51void pkg_infodb_foreach(struct pkginfo *pkg, struct pkgbin *pkgbin,
53
55
56#endif /* LIBDPKG_DB_CTRL_H */
void pkg_infodb_file_func(const char *filename, const char *filetype)
Definition: db-ctrl.h:49
enum pkg_infodb_format pkg_infodb_get_format(void)
Definition: db-ctrl-format.c:95
void pkg_infodb_upgrade(void)
Upgrade the infodb if there's the need and possibility.
Definition: db-ctrl-upgrade.c:240
void pkg_infodb_set_format(enum pkg_infodb_format format)
Definition: db-ctrl-format.c:104
bool pkg_infodb_has_file(struct pkginfo *pkg, struct pkgbin *pkgbin, const char *name)
Definition: db-ctrl-access.c:40
const char * pkg_infodb_get_dir(void)
Definition: db-ctrl-format.c:119
pkg_infodb_format
Definition: db-ctrl.h:30
@ PKG_INFODB_FORMAT_UNKNOWN
Definition: db-ctrl.h:31
@ PKG_INFODB_FORMAT_LAST
Definition: db-ctrl.h:34
@ PKG_INFODB_FORMAT_LEGACY
Definition: db-ctrl.h:32
@ PKG_INFODB_FORMAT_MULTIARCH
Definition: db-ctrl.h:33
const char * pkg_infodb_get_file(const struct pkginfo *pkg, const struct pkgbin *pkgbin, const char *filetype)
Definition: db-ctrl-format.c:128
bool pkg_infodb_is_upgrading(void)
Definition: db-ctrl-format.c:110
const char * pkg_infodb_reset_dir(void)
Definition: db-ctrl-format.c:151
void pkg_infodb_foreach(struct pkginfo *pkg, struct pkgbin *pkgbin, pkg_infodb_file_func *func)
Definition: db-ctrl-access.c:56
#define DPKG_BEGIN_DECLS
Definition: macros.h:86
#define DPKG_END_DECLS
Definition: macros.h:87
Node describing a binary package file.
Definition: dpkg-db.h:108
Node describing an architecture package instance.
Definition: dpkg-db.h:198