|
Data Structures |
| struct | db_pkg |
| | Package information structure. More...
|
Defines |
| #define | PKGDB_DIR "var/log" |
| | Directory where the package database is stored.
|
| #define | DB_NOPEN E(0) |
| | Database is not open.
|
| #define | DB_OPEN E(1) |
| | Database is already open (when opening).
|
| #define | DB_CORRUPT E(2) |
| | Database is corrupted.
|
| #define | DB_NOTEX E(3) |
| | Package not exist in database.
|
| #define | DB_EXIST E(4) |
| | Package already in database.
|
| #define | DB_BLOCKED E(6) |
| | DB is open by another proccess.
|
| #define | MAXPATHLEN 8192 |
| | Maximum length of the path.
|
Typedefs |
| typedef gint(*) | db_selector (const struct db_pkg *pkg, void *data) |
| | Package selector callback function.
|
Enumerations |
| enum | db_get_type { DB_GET_FULL,
DB_GET_WITHOUT_FILES
} |
| | What to get when getting package from database. More...
|
| enum | db_query_type { DB_QUERY_PKGS_WITH_FILES,
DB_QUERY_PKGS_WITHOUT_FILES,
DB_QUERY_NAMES
} |
| | What to get when querying package list from database. More...
|
| enum | db_path_type { DB_PATH_NONE = 0,
DB_PATH_FILE,
DB_PATH_DIR,
DB_PATH_SYMLINK
} |
| | Path file type. More...
|
Functions |
| gint | db_open (const gchar *root, struct error *e) |
| | Open package database.
|
| void | db_close () |
| | Close package database.
|
| db_pkg * | db_alloc_pkg (gchar *name) |
| | Create package object.
|
| void | db_free_pkg (struct db_pkg *pkg) |
| | Free db_pkg object.
|
| gint | db_pkg_add_path (struct db_pkg *pkg, const gchar *path, db_path_type type) |
| | Add path to the package.
|
| db_path_type | db_pkg_get_path (struct db_pkg *pkg, const gchar *path) |
| | Get path from the package.
|
| gint | db_add_pkg (struct db_pkg *pkg) |
| | Add package to the database.
|
| db_pkg * | db_get_pkg (gchar *name, db_get_type type) |
| | Get package from the database.
|
| gint | db_rem_pkg (gchar *name) |
| | Remove package from the database.
|
| gint | db_replace_pkg (gchar *origname, struct db_pkg *pkg) |
| | Replace package origname with package pkg.
|
| GSList * | db_query (db_selector cb, void *data, db_query_type type) |
| | Get packages list from the database.
|
| void | db_free_query (GSList *pkgs, db_query_type type) |
| | Free packages list returned by db_query().
|
| gchar * | db_get_package_name (const gchar *name) |
| | Get full name of the installed package from namespec.
|
| gint | db_filelist_load (gboolean force_reload) |
| | Load filelist from the package database.
|
| void | db_filelist_free () |
| | Free loaded filelist.
|
| gint | db_filelist_get_path_refs (const gchar *path) |
| | Lookup path refs in the filelist.
|
| void | db_filelist_add_pkg_paths (const struct db_pkg *pkg) |
| | Add paths from the package to the filelist.
|
| void | db_filelist_rem_pkg_paths (const struct db_pkg *pkg) |
| | Remove paths from the package from the filelist.
|