Re: [evolution-patches] First pass at IMAP quota support (RFC 2087)
- From: Not Zed <notzed ximian com>
- To: David Malcolm <dmalcolm redhat com>
- Cc: Evolution Patches <evolution-patches ximian com>
- Subject: Re: [evolution-patches] First pass at IMAP quota support (RFC 2087)
- Date: Tue, 12 Oct 2004 10:35:57 +0800
Shit, I replied to this, but the reply seems to have gone nowhere, and i can't find it in sent. Blah.
But from memory, the main points were:
- You can't call any provider methods directly from evolution-mail code. It isn't gauranteed to be dlopened by then, and you can't link with them directly.
- I think you should just put the quota usage and limit values directly into the CamelFolderInfo structure, and just use a known value, probably defined to ~0 to define 'unknown value'. This simplifies memory management and the code significantly.
- Add a bit to the folderinfo flags to say if the quota value is inherited from the parent.
- currently the code defines some values in a camel header which are only used internally inside the mail code - unecessary.
- the additional traffic - what can you do eh? We need to cache things more agressively anyway but thats a mostly unrelated issue.
- use camel:getv to get the quota values directly from the folder object for the properties popup window.
- the generalisations, we should probably try to get all of the features of all quota systems. e.g. some might have an alarm value or a limit beyond which some features become disabled progressively. If this is very complex then we might have to look into a more complex system, on the other hand maybe it can be abstracted to something useful without it, at least in the public api.
Thanks for the work so far.
On Thu, 2004-10-07 at 12:43 -0400, David Malcolm wrote:
Attached is a first attempt at IMAP quota support. A screenshot can be
It detects the QUOTA capability on an IMAP server. If present, when
getting folder information, it does a quota query on _every_ folder
returned by the server.
This is returned as a CamelImapQuotaRoot object, created by the
CamelProvider in its thread, owned by the CamelFolderInfo.
The UI thread examines these and converts to a percentage, or to
CAMEL_QUOTA_UNAVAILABLE, or to CAMEL_QUOTA_INHERIT_PARENT. It appends a
% usage figure to every mail folder for which data is available that
doesn't inhereit its quota from its parent. This means that for typical
usage you get a % full indicator on your INBOX.
Limitations so far:
- There are some hacks/incomplete bits in the RFC2087 parsing code
- Is the additional IMAP traffic too excessive?
- I haven't yet added GUI to the Folder Properties dialog
- There's a crash when I free up the quota structs; I believe I've
messed up somewhere - what are the ownership rules for CamelFolderInfo
structs? So for now I leak memory :-(
- This should be generalised to handle quotas on other types of mail
store e.g. for Exchange servers. I don't know the details of these;
suggestions are welcome.
Still it works (with the above caveats), and I wanted to get feedback.
] [Thread Prev