Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Sep 28, 2004 9:30 pm
"Those are not the messages you are looking for..." |
Apparently I didn't fully understand how IMAP works. I thought that each message had a unique identifier (UID). So, I was going to let you create a "virtual folder" which was just a list of UIDs. Then, it would fetch the UID from the MessageStore to display each message in the "virtual folder".
But I was wrong. The UID of a message in IMAP is unique only within a specific "mailbox" (which is an IMAP folder).
I need to define the terminology of a "mailbox" being a collection of messages within a message store, and "folder" being a collection of messages *outside* a message store. In a virtual "folder" you can have a random mix of messages from multiple message stores. A message can exist in multiple "folders".
A "mailbox" is specific to a message store, and each message in the message store can only exist in one mailbox at a time.
In a sense, an example of a message store and "mailbox" is the normal files on your disk. A file directory is a "mailbox" and each file is a "message". You can have the same filename (UID) in different directories (mailboxes).
So, in order to implement a "virtual folder", it needs to store more than just the UID of the message. The UID is only valid for a specfic message store and specific mailbox. So, we also need to store the ID of the message store and the ID of the mailbox.
That's a bit different than what I had been thinking about. I was assuming that the UID was unique. So I removed the reference to a "mailbox" within a message. I need to put that back in and also keep the difference between a folder and a mailbox clearer in my mind.
Since a message UID is a string value, perhaps I can still go ahead with my original ID if I just redefine the UID. If I add the message store ID and the mailbox ID to the beginning of the normal message ID, then I have a UID that looks something like:
store id|mailbox id|message id
as a single string. This becomes the new unique ID of a message within eMobius.
So, back to the design documents to make these revisions. |
|