citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

imap_fetch.c File Reference
#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
#include <time.h>
#include <sys/wait.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "sysdep_decls.h"
#include "citserver.h"
#include "support.h"
#include "config.h"
#include "user_ops.h"
#include "database.h"
#include "msgbase.h"
#include "internet_addressing.h"
#include "serv_imap.h"
#include "imap_tools.h"
#include "imap_fetch.h"
#include "genstamp.h"
#include "ctdl_module.h"
Include dependency graph for imap_fetch.c:

Go to the source code of this file.

Functions

void imap_fetch_uid (int seq)
 
void imap_fetch_flags (int seq)
 
void imap_fetch_internaldate (struct CtdlMessage *msg)
 
void imap_fetch_rfc822 (long msgnum, const char *whichfmt)
 
void imap_load_part (char *name, char *filename, char *partnum, char *disp, void *content, char *cbtype, char *cbcharset, size_t length, char *encoding, char *cbid, void *cbuserdata)
 
void imap_output_envelope_from (struct CtdlMessage *msg)
 
void imap_output_envelope_addr (char *addr)
 
void imap_fetch_envelope (struct CtdlMessage *msg)
 
void imap_strip_headers (StrBuf *section)
 
void imap_fetch_body (long msgnum, ConstStr item, int is_peek)
 
void imap_fetch_bodystructure_pre (char *name, char *filename, char *partnum, char *disp, void *content, char *cbtype, char *cbcharset, size_t length, char *encoding, char *cbid, void *cbuserdata)
 
void imap_fetch_bodystructure_post (char *name, char *filename, char *partnum, char *disp, void *content, char *cbtype, char *cbcharset, size_t length, char *encoding, char *cbid, void *cbuserdata)
 
void imap_fetch_bodystructure_part (char *name, char *filename, char *partnum, char *disp, void *content, char *cbtype, char *cbcharset, size_t length, char *encoding, char *cbid, void *cbuserdata)
 
void imap_fetch_bodystructure (long msgnum, const char *item, struct CtdlMessage *msg)
 
void imap_do_fetch_msg (int seq, citimap_command *Cmd)
 
void imap_do_fetch (citimap_command *Cmd)
 
void imap_macro_replace (StrBuf *Buf, long where, StrBuf *TmpBuf, char *find, long findlen, char *replace, long replacelen)
 
void imap_handle_macros (citimap_command *Cmd)
 
int imap_extract_data_items (citimap_command *Cmd)
 
void imap_pick_range (const char *supplied_range, int is_uid)
 
void imap_fetch (int num_parms, ConstStr *Params)
 
void imap_uidfetch (int num_parms, ConstStr *Params)
 

Function Documentation

◆ imap_do_fetch()

◆ imap_do_fetch_msg()

◆ imap_extract_data_items()

◆ imap_fetch()

void imap_fetch ( int  num_parms,
ConstStr *  Params 
)

◆ imap_fetch_body()

◆ imap_fetch_bodystructure()

◆ imap_fetch_bodystructure_part()

void imap_fetch_bodystructure_part ( char *  name,
char *  filename,
char *  partnum,
char *  disp,
void *  content,
char *  cbtype,
char *  cbcharset,
size_t  length,
char *  encoding,
char *  cbid,
void *  cbuserdata 
)

Definition at line 812 of file imap_fetch.c.

References IAPrintf(), IAPuts, and IPutStr().

Referenced by imap_fetch_bodystructure().

◆ imap_fetch_bodystructure_post()

void imap_fetch_bodystructure_post ( char *  name,
char *  filename,
char *  partnum,
char *  disp,
void *  content,
char *  cbtype,
char *  cbcharset,
size_t  length,
char *  encoding,
char *  cbid,
void *  cbuserdata 
)

Definition at line 786 of file imap_fetch.c.

References IAPuts, and IPutStr().

Referenced by imap_fetch_bodystructure().

◆ imap_fetch_bodystructure_pre()

void imap_fetch_bodystructure_pre ( char *  name,
char *  filename,
char *  partnum,
char *  disp,
void *  content,
char *  cbtype,
char *  cbcharset,
size_t  length,
char *  encoding,
char *  cbid,
void *  cbuserdata 
)

Definition at line 772 of file imap_fetch.c.

References IAPuts.

Referenced by imap_fetch_bodystructure().

◆ imap_fetch_envelope()

◆ imap_fetch_flags()

void imap_fetch_flags ( int  seq)

Definition at line 60 of file imap_fetch.c.

References __citimap::flags, IAPuts, IMAP, IMAP_ANSWERED, IMAP_DELETED, IMAP_RECENT, and IMAP_SEEN.

Referenced by imap_do_fetch_msg(), and imap_do_store().

◆ imap_fetch_internaldate()

void imap_fetch_internaldate ( struct CtdlMessage msg)

◆ imap_fetch_rfc822()

◆ imap_fetch_uid()

void imap_fetch_uid ( int  seq)

Definition at line 56 of file imap_fetch.c.

References IAPrintf(), and IMAP.

Referenced by imap_do_fetch_msg().

◆ imap_handle_macros()

void imap_handle_macros ( citimap_command Cmd)

Definition at line 1169 of file imap_fetch.c.

References __citimap_command::CmdBuf, and imap_macro_replace().

Referenced by imap_extract_data_items().

◆ imap_load_part()

void imap_load_part ( char *  name,
char *  filename,
char *  partnum,
char *  disp,
void *  content,
char *  cbtype,
char *  cbcharset,
size_t  length,
char *  encoding,
char *  cbid,
void *  cbuserdata 
)

Definition at line 261 of file imap_fetch.c.

References client_write(), cprintf(), and SIZ.

Referenced by imap_fetch_body().

◆ imap_macro_replace()

void imap_macro_replace ( StrBuf *  Buf,
long  where,
StrBuf *  TmpBuf,
char *  find,
long  findlen,
char *  replace,
long  replacelen 
)

Definition at line 1139 of file imap_fetch.c.

Referenced by imap_handle_macros().

◆ imap_output_envelope_addr()

void imap_output_envelope_addr ( char *  addr)

Definition at line 359 of file imap_fetch.c.

References IAPuts, IPutStr(), and process_rfc822_addr().

Referenced by imap_fetch_envelope().

◆ imap_output_envelope_from()

◆ imap_pick_range()

void imap_pick_range ( const char *  supplied_range,
int  is_uid 
)

◆ imap_strip_headers()

void imap_strip_headers ( StrBuf *  section)

◆ imap_uidfetch()