summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/db.h')
-rw-r--r--lib/libalpm/db.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 26f1fdf4..3916e848 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -1,10 +1,10 @@
/*
* db.h
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _ALPM_DB_H
@@ -25,6 +25,7 @@
#include "alpm.h"
#include <limits.h>
+#include <time.h>
/* Database entries */
typedef enum _pmdbinfrq_t {
@@ -33,8 +34,9 @@ typedef enum _pmdbinfrq_t {
INFRQ_DEPENDS = 0x04,
INFRQ_FILES = 0x08,
INFRQ_SCRIPTLET = 0x10,
+ INFRQ_DELTAS = 0x20,
/* ALL should be sum of all above */
- INFRQ_ALL = 0x1F
+ INFRQ_ALL = 0x3F
} pmdbinfrq_t;
/* Database */
@@ -48,11 +50,16 @@ struct __pmdb_t {
};
/* db.c, database general calls */
-pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename);
+pmdb_t *_alpm_db_new(const char *dbpath, const char *treename);
void _alpm_db_free(pmdb_t *db);
int _alpm_db_cmp(const void *db1, const void *db2);
-alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles);
-pmdb_t *_alpm_db_register(const char *treename, alpm_cb_db_register callback);
+alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
+pmdb_t *_alpm_db_register_local(void);
+pmdb_t *_alpm_db_register_sync(const char *treename);
+
+/* Provision */
+int _alpm_prov_cmp(const void *provision, const void *needle);
+alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, const char *package);
/* be.c, backend specific calls */
int _alpm_db_install(pmdb_t *db, const char *dbfile);
@@ -63,8 +70,8 @@ pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target);
int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
int _alpm_db_remove(pmdb_t *db, pmpkg_t *info);
-int _alpm_db_getlastupdate(pmdb_t *db, char *ts);
-int _alpm_db_setlastupdate(pmdb_t *db, char *ts);
+time_t _alpm_db_getlastupdate(const pmdb_t *db);
+int _alpm_db_setlastupdate(const pmdb_t *db, time_t time);
#endif /* _ALPM_DB_H */