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



On Tue, 2005-11-01 at 10:35 +0100, Jules Colding wrote:
> Hi,
> 
> I think that I know how to interpret CamelFolderInfo but I would really
> appreciate to have my understanding confirmed in the context of
> get_folder_info().
> 
> 
> 
> CamelFolderInfo is declared as:
> 
> typedef struct _CamelFolderInfo {
> 	struct _CamelFolderInfo *next;
> 	struct _CamelFolderInfo *parent;
> 	struct _CamelFolderInfo *child;
> 
> 	char *uri;
> 	char *name;
> 	char *full_name;
> 
> 	guint32 flags;
> 	guint32 unread;
> 	guint32 total;
> } CamelFolderInfo;
> 
> 
> 
> get_folder_info() is declared as:
> 
> static CamelFolderInfo*
> brutus_get_folder_info(CamelStore *store, 
> 		       const char *top,
> 		       guint32 flags, 
> 		       CamelException *ex);
> 
> 
> 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.

> 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.

> 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".

> 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.

> Could someone please confirm that my interpretation is correct?
> 
> Thanks a lot in advance,
>   jules
> 
> _______________________________________________
> Evolution-hackers mailing list
> Evolution-hackers gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-hackers
-- 
adfa(evolution-2.4:20087): gtkhtml-WARNING **: cannot find icon:
'stock_insert-url' in gnome 




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