aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/notmuch-private.h
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-01-07 10:19:44 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-01-07 10:19:44 -0800
commitf93b7218c3e2d11c5b3cdd4c367a42ca7a7ede77 (patch)
tree7d1cd35cb6e21d2c1dbf3bf79799fbeb35ae6422 /lib/notmuch-private.h
parent6ed606c19edfe06d2dfd48854fc97f8502eaaf7c (diff)
lib: Consolidate checks for read-only database.
Previously, many checks were deep in the library just before a cast operation. These have now been replaced with internal errors and new checks have instead been added at the beginning of all top-levelentry points requiring a read-write database. The new checks now also use a single function for checking and printing the error message. This will give us a convenient location to extend the check, (such as based on database version as well).
Diffstat (limited to 'lib/notmuch-private.h')
-rw-r--r--lib/notmuch-private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
index 8b582640..4eb82619 100644
--- a/lib/notmuch-private.h
+++ b/lib/notmuch-private.h
@@ -151,6 +151,9 @@ typedef enum _notmuch_private_status {
const char *
_find_prefix (const char *name);
+notmuch_status_t
+_notmuch_database_ensure_writable (notmuch_database_t *notmuch);
+
const char *
_notmuch_database_relative_path (notmuch_database_t *notmuch,
const char *path);