Re: RFC mailbox interface



On 2001.11.17 06:58 Kenneth Haley wrote:
> After following this thread I came up with the following interface.
> 
> typedef struct _Message {
> 	struct _Folder *Folder;
> 	Flags flags;
> 	//perhaps return a string instead?
> 	glist (*getHeaders)(const char[] hdrs);
> 	glist (*getAllHeaders)();
> 	char* (*getBody)();
> 	char* (*getAll)();
> };

Are these methods not specific to the mailbox that owns the Message?
I imagine that following scheme would be a better solution:
glist
lib_message_getHeaders(Message* msg)
{ msg->folder->getHeaders(msg->folder, msg); }

(I skimmed over the thread and I have not found a discussion of this).

/Pawel



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