On Tue, Feb 14, 2006, Paul J Stevens <[EMAIL PROTECTED]> said:
 
Aaron Stone wrote:
>> Paul,
>> 
>> How does GMime handle headers with multiple values? Received, for
>> example, typically has 3-5 header-value pairs in a given message. But
>> the GMime function we're using returns only a single char *
> 
> Yeah I know. That's what the GRelation *headers was meant for
> originally, before I could setup the whole caching chain without
> building an internal representation of the header-tree. I ended up using
>  a g_mime_headers_foreach loop.
> 
> The GRelation is still there though, albeit unused. Feel free to use it
> or improve it, if you like. I suggest we implement:
> 
> GTuples * dbmail_message_get_headers(const struct DbmailMessage *self,
> const char *header);
> 
> but perhaps mapping the GTuples * and returning char ** makes more sense
> for a public call.

I only need a NULL-terminated char ** list of headers. I'll take a look at
what you started on with GTuples, and look at g_mime_headers_foreach.

Do you know what the representation of 3-4 Received headers looks like in
that single-valued return from g_mime_object_get_header? I'm curious to
see if they've just concatenated each instance of the header, or just used
the first or who knows what.

Aaron

Reply via email to