Back to index

citadel  8.12
imap_tools.h
Go to the documentation of this file.
00001 
00002 /* 
00003  * since we work with shifted pointers to ConstStrs in some places, 
00004  * we can't just say we want to cut the n'th of Cmd, we have to pass it in
00005  * and rely on that CutMe references Cmd->CmdBuf; else peek won't work out
00006  * and len will differ.
00007  */
00008 void TokenCutRight(citimap_command *Cmd, 
00009                  ConstStr *CutMe,
00010                  int n);
00011 /*
00012  * since we just move Key around here, Cmd is just here so the syntax is identical.
00013  */
00014 void TokenCutLeft(citimap_command *Cmd, 
00015                 ConstStr *CutMe,
00016                 int n);
00017 void MakeStringOf(StrBuf *Buf, int skip);
00018 
00019 int CmdAdjust(citimap_command *Cmd, 
00020              int nArgs,
00021              int Realloc);
00022 
00023 
00024 void imap_strout(ConstStr *args);
00025 void imap_strbuffer(StrBuf *Reply, ConstStr *args);
00026 void plain_imap_strbuffer(StrBuf *Reply, char *buf);
00027 void plain_imap_strout(char *buf);
00028 int imap_parameterize(citimap_command *Cmd);
00029 void imap_mailboxname(char *buf, int bufsize, struct ctdlroom *qrbuf);
00030 void imap_ial_out(struct internet_address_list *ialist);
00031 int imap_roomname(char *buf, int bufsize, const char *foldername);
00032 int imap_is_message_set(const char *);
00033 int imap_mailbox_matches_pattern(const char *pattern, char *mailboxname);
00034 int imap_datecmp(const char *datestr, time_t msgtime);
00035 
00036 
00037 /* Imap Append Printf, send to the outbuffer */
00038 void IAPrintf(const char *Format, ...) __attribute__((__format__(__printf__,1,2)));
00039 
00040 void iaputs(const char *Str, long Len);
00041 #define IAPuts(Msg) iaputs(HKEY(Msg))
00042 /* give it a naughty name since its ugly. */
00043 #define _iaputs(Msg) iaputs(Msg, strlen(Msg))
00044 
00045 /* outputs a static message prepended by the sequence no */
00046 void ireply(const char *Msg, long len);
00047 #define IReply(msg) ireply(HKEY(msg))
00048 /* outputs a dynamic message prepended by the sequence no */
00049 void IReplyPrintf(const char *Format, ...);
00050 
00051 
00052 /* output a string like that {%ld}%s */
00053 void IPutStr(const char *Msg, long Len);
00054 #define IPutCStr(_ConstStr) IPutStr(CKEY(_ConstStr))
00055 #define IPutCParamStr(n) IPutStr(CKEY(Params[n]))
00056 
00057 void IUnbuffer (void);