Re: [Evolution-hackers] [CAMEL] CamelFolderInfo clarification please...

Hi Michael,

On Wed, 2005-11-02 at 09:21 +0800, Not Zed wrote:
> > My understanding is:
> > 
> > next: A pointer to a CamelFolderInfo structure for the next folder on
> > the same tree-level as the current one. The current folder is "top".
> > 
> > parent: If "top" is NULL then parent is NULL too. If "top" is non-NULL
> > then parent is a pointer to the CamelFolderInfo structure for the folder
> > containing "top"
> A null top and a top of "" should be treated the same.


> > child: This one is the one I am mostly confused about. I think that it
> > is an array of pointers to CamelFolderInfo structures of all folders
> > which is contained within "top". The array is terminated with NULL.
> Ugh, its a tree node pointer.  Each camelfolderinfo is a tree node.  The
> types make it pretty obvious.

Yes, a full day later I realized that. Amazing what some time hacking on
the code can provide in terms of "I should have seen that, damn now I
look stupid" insight.

> > uri: A string based upon the Camel.Service uri and the full folder name.
> > Its format is otherwise totally unspecified except that it must uniquely
> > identify a given folder. It does not seem to be used anywhere else in
> > Camel. Design oversight?
> It's used EXTENSIVELY in evolution.  Thats how a folder is loaded.  It
> certainly isn't a design oversight.

Hmm, how and where? The get_folder() function uses the full_name and I
can't really see where the uri is used. 

> > name: A basename()-ish version of full_name.
> Not exactly.  This is the translated display name for the folder.  It
> may or may not relate to the full_name.  It will be a basename for
> non-system folders (e.g. inbox).


> > full_name: An absolute path to "top".
> > 
> > flags: Flags describing "top".
> Wrong.  Flags describing this node: the folder "full_name".

OK, that was what I meant. I was thinking about CamelFolderInfo in the
context of get_folder_info() so I was using full_name as another name
for "top".

The other folders that is below "top" in the directory tree has their
own full_name.

> > unread: The number of unread message objects in "top".
> > 
> > total: The total number of message objects in "top".
> Wrong wrong, the number of unread messages in this node: full_name.

Yes, see above.

Thanks a lot for you help Michael,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]