Re: [Evolution-hackers] CamelFolder updates

> list_subfolders and get_uid_list both return GLists. I think GPtrArray
> is a generally more useful type, since it's randomly accessible and
> has a "length" element. Also, list_subfolders returns actual
> CamelFolders, and I think there are cases where you'd rather have just
> the names. (There are no places that actually call list_subfolders
> currently.)
> So my new proposal is to get rid of get_subfolder_info,
> get_message_info, list_subfolders, and get_uid_list and replace them
> with:
> GPtrArray *get_uids  (CamelFolder *, CamelException *);
> void       free_uids (CamelFolder *, GPtrArray *);
> GPtrArray *get_subfolder_names  (CamelFolder *, CamelException *);
> void       free_subfolder_names (CamelFolder *, GPtrArray *);
> GPtrArray *get_summary  (CamelFolder *, CamelException *);
> void       free_summary (CamelFolder *, GPtrArray *);

These should only return pointers to the internal arrays, or
otherwise const'd data.


 - save overhead of copying and gptrarrays are prtty slow anyway.
 - The contents if it is a pointer array is only as safe as
   the real array is.  Unless the interface actually copies all
   of the elements data as well, which is well, not worth it.
 - the folder_changed signal indicates when any such data is
   stale and needs to be re-retrieved anyway.

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