Re: Message getting strategy



En 11/08/10 11:31, evolution test escribiu:
> On Wed, Aug 11, 2010 at 2:19 PM, Sergio Villar Senin <svillar igalia com
> <mailto:svillar igalia com>> wrote:
> 
>     En 11/08/10 07:31, evolution test escribiu:
>     > Hello,
>     > I would like to know what is message collection strategy followed in
>     > tinymail.
>     >
>     > I have got the account detail (account uri) & know the folder name
>     from
>     > which i need to get message.
>     >
>     > My query is :
>     >
>     > - Do tinymail first get the header detail for all the mail & show
>     on gui.
> 
>     You first need to get the header and then use it to retrieve the
>     message. There is another possibility which is to retrieve the message
>     using a URL but that is not really very usable as you need to know the
>     whole URL to the message.
> 
> 
> is this way will work for POP also. (tny_header_get_ api will work for
> pop account).
> Please let me know if any difference in getting header for pop & imap
> account.

No difference, that's what tinymail is about, is a generic framework.
You won't see any difference at API level for whatever account you have.
There is no POP or IMAP reference in the API.

>> - once user click on any message then he will get the content for same
>> message.
> 
>     This is responsibility of the application not tinymail's. Normally when
>     developing an application with tinymail you get all the headers of a
>     folder and show them. Then once the user clicks on one of them you use
>     it to retrieve the message and show it.
> 
> 
> it means to use uid & get the message content.

Exactly.

> 
>     > - is their any difference in handling message receving streategy for
>     > imap & pop account.
> 
>     The retrieving strategy is indeed different. And you can also implement
>     whatever strategy you want. POP always downloads the whole messages but
>     for IMAP you can download them completely or if you use the BODYSTRUCT
>     strategy, download MIME parts on demand from the server (for example
>     only body and not the attachments)
> 
> 
> it will be good if you give me some idea in what way it is different in
> tinymail.

In tinymail, as I said you can implement and use different strategies.
Currently you can use a full message download strategy or a partial
message retrieval strategy. In your program you'd have to take that into
account since if you use a partial message retrieval strategy you cannot
assume that you always have the whole message (for example if you want
to forward it you might first have to download it completely)

BR


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