summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-13 14:10:30 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-13 14:10:30 +0300
commit279513bfbe8f0f37c6fb7f38dc331f0290b19b2f (patch)
treecd6a5aef78391be52fcfb18d95fe6b1ab5ec3f17 /src/apk_database.h
parentb71606dbf42815cc82b5792eb53438673111a4d5 (diff)
downloadapk-tools-279513bfbe8f0f37c6fb7f38dc331f0290b19b2f.tar.gz
apk-tools-279513bfbe8f0f37c6fb7f38dc331f0290b19b2f.tar.bz2
apk-tools-279513bfbe8f0f37c6fb7f38dc331f0290b19b2f.tar.xz
apk-tools-279513bfbe8f0f37c6fb7f38dc331f0290b19b2f.zip
db: implement triggers (fixes #45)
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index 42e214a..dfaf0d3 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -36,9 +36,9 @@ struct apk_db_file {
char name[];
};
-#define APK_DBDIRF_PROTECTED 0x0001
-#define APK_DBDIRF_SYMLINKS_ONLY 0x0002
-#define APK_DBDIRF_MODIFIED 0x0100
+#define APK_DBDIRF_PROTECTED 0x01
+#define APK_DBDIRF_SYMLINKS_ONLY 0x02
+#define APK_DBDIRF_MODIFIED 0x04
struct apk_db_dir {
apk_hash_node hash_node;
@@ -48,8 +48,9 @@ struct apk_db_dir {
struct apk_db_dir *parent;
unsigned short refs;
- unsigned short flags;
unsigned short namelen;
+ unsigned char flags;
+ char rooted_name[1];
char name[];
};
@@ -149,8 +150,9 @@ struct apk_db_file *apk_db_file_query(struct apk_database *db,
APK_OPENF_NO_WORLD)
int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts);
-int apk_db_write_config(struct apk_database *db);
void apk_db_close(struct apk_database *db);
+int apk_db_write_config(struct apk_database *db);
+int apk_db_run_triggers(struct apk_database *db);
int apk_db_permanent(struct apk_database *db);
struct apk_package *apk_db_pkg_add(struct apk_database *db, struct apk_package *pkg);