]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch-private.h
lib: Consolidate checks for read-only database.
[notmuch] / lib / notmuch-private.h
index cb93c397a0265b539f54c407929ebfb90562b350..4eb82619afa91235daa1c3a00ffad6efe27a7294 100644 (file)
@@ -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);
@@ -161,6 +164,15 @@ _notmuch_database_split_path (void *ctx,
                              const char **directory,
                              const char **basename);
 
+const char *
+_notmuch_database_get_directory_db_path (const char *path);
+
+notmuch_private_status_t
+_notmuch_database_find_unique_doc_id (notmuch_database_t *notmuch,
+                                     const char *prefix_name,
+                                     const char *value,
+                                     unsigned int *doc_id);
+
 notmuch_status_t
 _notmuch_database_find_directory_id (notmuch_database_t *database,
                                     const char *path,
@@ -177,6 +189,16 @@ _notmuch_database_filename_to_direntry (void *ctx,
                                        const char *filename,
                                        char **direntry);
 
+/* directory.cc */
+
+notmuch_directory_t *
+_notmuch_directory_create (notmuch_database_t *notmuch,
+                          const char *path,
+                          notmuch_status_t *status_ret);
+
+unsigned int
+_notmuch_directory_get_document_id (notmuch_directory_t *directory);
+
 /* thread.cc */
 
 notmuch_thread_t *