EMailFactory will be a dbus daemon, that runs camel session. The camel session controls the providers of IMAP/POP/Exchange/* and keeps checking emails, and serves CamelStore/CamelFolder/CamelMimeMessage/* over DBUS to its clients. Below is a high level architecture diagram of how the various pieces fit together.
The QMF wrappers provide QMF API (mostly) compatible library that wraps & built around DBus Camel APIs. The QMailID which is a 64bit id unique for every email could a unique string formed by 8-byte hash of CamelStore & CamelFolder appended to the UID (used similarly in vFolders of Evolution). This way the forward & reverse lookup works and is static. Most of the APIs look similar apart and the Object hierarchy is also similar, though some complication needs to be worked around.
CamelMimeMessage -> QMailMessage CamelStore ->QMailStore CamelFolder -> QMailFolder