summaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h
index 59d1d06..999d3f3 100644
--- a/src/types.h
+++ b/src/types.h
@@ -78,6 +78,20 @@ struct TagChange
}
};
+/// Database-level facts for the Maildir overview.
+///
+/// Every field is -1 until answered, so a dialog opened against a database that
+/// cannot be read shows "unknown" rather than a confident zero. A zero is a
+/// claim, and "no mail at all" is exactly the wrong thing to tell someone whose
+/// index failed to open.
+struct DatabaseStats
+{
+ int messages = -1; ///< Every message notmuch has indexed.
+ int threads = -1; ///< Every thread. Differs from messages by reply depth.
+ int tags = -1; ///< Distinct tag names in the database.
+};
+
Q_DECLARE_METATYPE(ThreadSummary)
Q_DECLARE_METATYPE(MessageRef)
Q_DECLARE_METATYPE(TagChange)
+Q_DECLARE_METATYPE(DatabaseStats)