summaryrefslogtreecommitdiff
path: root/src/leap/mail/constants.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-12-26 18:25:36 -0400
committerKali Kaneko <kali@leap.se>2015-02-11 14:05:43 -0400
commit22f619cf2a295ecc5beff16a91de63728ac4b17d (patch)
tree6a9a371fcc4061df465bd315db83a09cefd16e61 /src/leap/mail/constants.py
parent6ede495b94501a4cbdfd985dcdf4be4f582bbb9b (diff)
MessageCollections + MailboxIndexer
Diffstat (limited to 'src/leap/mail/constants.py')
-rw-r--r--src/leap/mail/constants.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/leap/mail/constants.py b/src/leap/mail/constants.py
index 55bf1da..bf1db7f 100644
--- a/src/leap/mail/constants.py
+++ b/src/leap/mail/constants.py
@@ -19,3 +19,20 @@ Constants for leap.mail.
"""
INBOX_NAME = "INBOX"
+
+# Regular expressions for the identifiers to be used in the Message Data Layer.
+
+METAMSGID = "M-{mbox}-{chash}"
+METAMSGID_RE = "M\-{mbox}\-[0-9a-fA-F]+"
+METAMSGID_CHASH_RE = "M\-\w+\-([0-9a-fA-F]+)"
+METAMSGID_MBOX_RE = "M\-(\w+)\-[0-9a-fA-F]+"
+
+FDOCID = "F-{mbox}-{chash}"
+FDOCID_RE = "F\-{mbox}\-[0-9a-fA-F]+"
+FDOCID_CHASH_RE = "F\-\w+\-([0-9a-fA-F]+)"
+
+HDOCID = "H-{chash}"
+HDOCID_RE = "H\-[0-9a-fA-F]+"
+
+CDOCID = "C-{phash}"
+CDOCID_RE = "C\-[0-9a-fA-F]+"