Re: mailimap_lsub problem

Marko Ivancic <[email protected]> Sun, 02 Apr 2006 13:19:07 +0200
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
Tnx Mr. Dinh

I always get the mb_flag pointer value as NULL. I have 7 folders on an 
imap server only one of these is not NULL but is a selectable folder ( a 
folder I can connect on).

Mybe is a server side problem ??

Tnx,
By
Marko

DINH Viet Hoa wrote:
> Marko Ivancic wrote :
>
>   
>> I use mailimap_lsub to retrive mail folders from IMAP server like this:
>>
>> mailimap_lsub(imap, "", "*",&list);  // (the  same way as etpan does)
>>
>> But in the result list there are folders that can not be connected for 
>> example:
>>
>> mail/
>> mail
>> mail/sent/
>> mail/inbox
>>
>> The folder: mail/ and mail (is the same folder) can not be connected. 
>> Is  there any way to find out which folder can be connected and which not.
>>     
>
> struct mailimap_mailbox_list {
>   struct mailimap_mbx_list_flags * mb_flag; /* can be NULL */
>   char mb_delimiter;
>   char * mb_name; /* != NULL */
> };
>
>
> enum {
>   MAILIMAP_MBX_LIST_SFLAG_ERROR,
>   MAILIMAP_MBX_LIST_SFLAG_MARKED,
>   MAILIMAP_MBX_LIST_SFLAG_NOSELECT,
>   MAILIMAP_MBX_LIST_SFLAG_UNMARKED
> };
>
> struct mailimap_mbx_list_flags {
>   int mbf_type;
>   clist * mbf_oflags; /* list of
>                          (struct mailimap_mbx_list_oflag *), != NULL */
>   int mbf_sflag;
> };
>
> if mbf_type is MAILIMAP_MBX_LIST_FLAGS_SFLAG and mbf_sflag is 
> MAILIMAP_MBX_LIST_SFLAG_NOSELECT, then the folder is not connectable.
>
> look at etpan-imap.c in etpan-ng to see an example of use.
>
>   



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642