On Fri, 28 May 2004, Shawn Walker wrote:
How can I get the CAPABILITY strings that is returned from the IMAP server from c-client? I want to be able to see what the IMAP server can do in order to vailidate that IMAP server can or cannot do.

You can't get the capability string itself, but in imap-2004 there are several macros which you can use, e.g. LEVELNAMESPACE(stream) is non-zero if the IMAP server open on the stream has the NAMESPACE extension.


Refer to imap4r1.h for more information. Also, look at the code which uses these in mtest.c.

Do not call these macros on a non-IMAP stream, or you will be promptly punished by a crash.

There are earlier versions of this interface in previous c-client releases. Don't use those earlier interfaces. Use the imap-2004 interface.

You can call imap_cap(stream) directly, and in fact you have to in order to probe the extlevel. Note, though, that the extlevel can change after the first time you call imap_structure(); basically, once c-client realizes that the server supports bodystructure extension data it won't do unnecessary HEADER.FIELDS fetching after the first time.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

Reply via email to