libcyrus and the imap proto

Patrick Welche prlw1 at newn.cam.ac.uk
Thu Feb 27 14:01:28 EST 2003


On Thu, Feb 27, 2003 at 09:53:57AM -0500, John Alton Tamplin wrote:
> Patrick Welche wrote:
... 
> >same for eg
> >. fetch 1 (internaldate)
> >* 1 FETCH (INTERNALDATE "30-Jan-2003 19:23:41 +0000")
> >. OK Completed
> >
> >How can I see the result of fetch?
> > 
> >
> I have not used the C library, but the perl interface is similar so I 
> suspect this approach will work for you.  What I did was add a callback 
> with an empty string for a trigger.  The callback gets called on every 
> line, and you can parse it as you please.
...

Great idea - I kept thinking "14 RECENT" was keyword "RECENT".. but evidently
not..

  imclient_addcallback(imp, "",     /* keyword */
              NULL,                 /* flags   */
              callback_all,         /* proc    */
              NULL,                 /* rock    */
              NULL);

did the trick. Incidentally, I didn't receive the messages if I set the
CALLBACK_NOLITERAL flag. What does it do? (I thought it meant don't use
eg. {42} followed by 42 characters, but in eg. 14 RECENT, no literal is used,
yet I didn't see those messages either)

Cheers,

Patrick




More information about the Info-cyrus mailing list