Re: Patch: add header flag "calendar"



El jue, 17-12-2009 a las 18:19 +0100, Philip Van Hoof escribió:
> On Thu, 2009-12-17 at 17:46 +0100, José Dapena Paz wrote:
> > 	Hi,
> > 
> > 	This patch adds a flag to TnyHeaderFlags (and camel message
> > counterpart) named calendar. This will be used in the future to store in
> > summary if a message contains a calendar appointment.
> > 
> 
> Euh, no.
> 
> TnyHeaderFlags is not a junkbin for random headers. Anything that isn't
> in the ENVELOPE of a message should not be in in lower bits of a.
> TnyHeaderFlags
> 
> Better find another solution for this than to use TnyHeaderFlags.
> 
> Not approved.

	Right.

	Then we need to find a different way. The approach taken in camel is
storing this kind of information in the user flags, which is not
supported in camel lite (and also, not exposed in any way to tinymail).
As far as I remember, this is one of the things removed to keep small
tinymail/camel-lite folder summary storage.

	Or we can just add the user flags in this way:
	* CamelMessageInfo: same API
	* Add API to TnyHeader to get/set these flags
	* Add a way to know the degree of support for these flags in the header
(no support, only memory storage, both memory and persistent storage).

	void tny_header_set_user_flag (TnyHeader *header, const gchar *name, gboolean flag)
	void tny_header_get_user_flags (TnyHeader *header, TnyList *flags);

	TnyHeaderSupportFlagsType tny_header_support_user_flags (TnyHeader *header);
	^----- How could this be better implemented? :m

	Same for camel. We recover the userflags field. By default we would
only support storage in memory, and we could allow to set in some way if
support is also available to storage in disk. This info would be stored
in the CamelFolderSummary. This way, if we have (as we have now) some
provider that don't use the camel-lite summary, and provides special
flags, we could add access to it.


-- 
José Dapena Paz <jdapena igalia com>
Igalia



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