From f93b7218c3e2d11c5b3cdd4c367a42ca7a7ede77 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 7 Jan 2010 10:19:44 -0800 Subject: 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). --- lib/notmuch-private.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/notmuch-private.h') 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); -- cgit v1.2.3