citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
![]() ![]() |
Go to the source code of this file.
Data Structures | |
struct | _imap_handler_hook |
struct | __citimap_command |
struct | __citimap |
Macros | |
#define | GLOBAL_UIDVALIDITY_VALUE 1L |
#define | IMAP_ANSWERED 1 /* reportable and setable */ |
#define | IMAP_FLAGGED 2 /* reportable and setable */ |
#define | IMAP_DELETED 4 /* reportable and setable */ |
#define | IMAP_DRAFT 8 /* reportable and setable */ |
#define | IMAP_SEEN 16 /* reportable and setable */ |
#define | IMAP_MASK_SETABLE 0x1f |
#define | IMAP_MASK_SYSTEM 0xe0 |
#define | IMAP_SELECTED 32 /* neither reportable nor setable */ |
#define | IMAP_RECENT 64 /* reportable but not setable */ |
#define | IR_MAILBOX 0x0100 /* Mailbox */ |
#define | IR_EXISTS 0x0200 /* Room exists (not implemented) */ |
#define | IR_BABOON 0x0000 /* Just had to put this here :) */ |
#define | FDELIM '\\' |
#define | IMAP ((citimap *)CC->session_specific_data) |
#define | CCCIMAP ((citimap *)CCC->session_specific_data) |
#define | IMAPDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (IMAPDebugEnabled != 0)) |
#define | I_FLAG_NONE (0) |
#define | I_FLAG_LOGGED_IN (1<<0) |
#define | I_FLAG_SELECT (1<<1) |
#define | I_FLAG_UNTAGGED (1<<2) |
#define | REALLOC_INCREMENT 100 |
#define | RegisterImapCMD(First, Second, H, Flags) registerImapCMD(HKEY(First), HKEY(Second), H, Flags) |
Typedefs | |
typedef void(* | imap_handler) (int num_parms, ConstStr *Params) |
typedef struct _imap_handler_hook | imap_handler_hook |
typedef struct __citimap_command | citimap_command |
typedef struct __citimap | citimap |
Functions | |
void | imap_cleanup_function (void) |
void | imap_greeting (void) |
void | imap_command_loop (void) |
int | imap_grabroom (char *returned_roomname, const char *foldername, int zapped_ok) |
void | imap_free_transmitted_message (void) |
int | imap_do_expunge (void) |
void | imap_rescan_msgids (void) |
void | registerImapCMD (const char *First, long FLen, const char *Second, long SLen, imap_handler H, int Flags) |
#define CCCIMAP ((citimap *)CCC->session_specific_data) |
Definition at line 105 of file serv_imap.h.
#define FDELIM '\\' |
Definition at line 102 of file serv_imap.h.
#define GLOBAL_UIDVALIDITY_VALUE 1L |
Definition at line 1 of file serv_imap.h.
#define I_FLAG_LOGGED_IN (1<<0) |
Definition at line 110 of file serv_imap.h.
#define I_FLAG_NONE (0) |
Definition at line 109 of file serv_imap.h.
#define I_FLAG_SELECT (1<<1) |
Definition at line 111 of file serv_imap.h.
#define I_FLAG_UNTAGGED (1<<2) |
Definition at line 113 of file serv_imap.h.
Definition at line 104 of file serv_imap.h.
#define IMAP_ANSWERED 1 /* reportable and setable */ |
Definition at line 81 of file serv_imap.h.
#define IMAP_DELETED 4 /* reportable and setable */ |
Definition at line 83 of file serv_imap.h.
#define IMAP_DRAFT 8 /* reportable and setable */ |
Definition at line 84 of file serv_imap.h.
#define IMAP_FLAGGED 2 /* reportable and setable */ |
Definition at line 82 of file serv_imap.h.
#define IMAP_MASK_SETABLE 0x1f |
Definition at line 87 of file serv_imap.h.
#define IMAP_MASK_SYSTEM 0xe0 |
Definition at line 88 of file serv_imap.h.
#define IMAP_RECENT 64 /* reportable but not setable */ |
Definition at line 91 of file serv_imap.h.
#define IMAP_SEEN 16 /* reportable and setable */ |
Definition at line 85 of file serv_imap.h.
#define IMAP_SELECTED 32 /* neither reportable nor setable */ |
Definition at line 90 of file serv_imap.h.
#define IMAPDBGLOG | ( | LEVEL | ) | if ((LEVEL != LOG_DEBUG) || (IMAPDebugEnabled != 0)) |
Definition at line 107 of file serv_imap.h.
#define IR_BABOON 0x0000 /* Just had to put this here :) */ |
Definition at line 100 of file serv_imap.h.
#define IR_EXISTS 0x0200 /* Room exists (not implemented) */ |
Definition at line 99 of file serv_imap.h.
#define IR_MAILBOX 0x0100 /* Mailbox */ |
Definition at line 98 of file serv_imap.h.
#define REALLOC_INCREMENT 100 |
Definition at line 119 of file serv_imap.h.
#define RegisterImapCMD | ( | First, | |
Second, | |||
H, | |||
Flags | |||
) | registerImapCMD(HKEY(First), HKEY(Second), H, Flags) |
Definition at line 127 of file serv_imap.h.
typedef struct __citimap_command citimap_command |
typedef void(* imap_handler) (int num_parms, ConstStr *Params) |
Definition at line 21 of file serv_imap.h.
typedef struct _imap_handler_hook imap_handler_hook |
anonymous enum |
Enumerator | |
---|---|
imap_as_normal | |
imap_as_expecting_username | |
imap_as_expecting_password | |
imap_as_expecting_plainauth | |
imap_as_expecting_multilineusername | |
imap_as_expecting_multilinepassword |
Definition at line 69 of file serv_imap.h.
void imap_cleanup_function | ( | void | ) |
Definition at line 413 of file serv_imap.c.
References __citimap::cached_body, __citimap::cached_body_len, __citimap::cached_bodymsgnum, __citimap::cached_rfc822, __citimap::cached_rfc822_msgnum, __citimap::cached_rfc822_withbody, CC, CCCIMAP, __citimap::Cmd, __citimap_command::CmdBuf, free(), imap_command_loop(), imap_do_expunge(), imap_free_msgids(), imap_free_transmitted_message(), __citimap_command::Params, __citimap::Reply, and __citimap::selected.
Referenced by ctdl_module_init_imap().
void imap_command_loop | ( | void | ) |
Definition at line 1410 of file serv_imap.c.
References __citimap::authstate, CC, CCCIMAP, __citimap::Cmd, __citimap_command::CmdBuf, CtdlClientGetLine(), _imap_handler_hook::Flags, flush_output(), _imap_handler_hook::h, I_FLAG_LOGGED_IN, I_FLAG_SELECT, I_FLAG_UNTAGGED, imap_as_expecting_multilinepassword, imap_as_expecting_multilineusername, imap_as_expecting_password, imap_as_expecting_plainauth, imap_as_expecting_username, imap_auth_login_pass(), imap_auth_login_user(), imap_auth_plain(), imap_free_transmitted_message(), imap_lookup(), imap_parameterize(), imap_rescan_msgids(), IReply, IUnbuffer(), KILLME_CLIENT_DISCONNECTED, CitContext::lastcmd, __citimap_command::num_parms, __citimap_command::Params, __citimap::selected, and SIZ.
Referenced by ctdl_module_init_imap(), and imap_cleanup_function().
int imap_do_expunge | ( | void | ) |
Definition at line 864 of file serv_imap.c.
References CC, CCCIMAP, CtdlDeleteMessages(), __citimap::flags, free(), IMAP_DELETED, imap_rescan_msgids(), malloc(), __citimap::msgids, __citimap::num_msgs, and __citimap::selected.
Referenced by imap_cleanup_function(), imap_close(), imap_do_store(), imap_expunge(), imap_logout(), and imap_select().
void imap_free_transmitted_message | ( | void | ) |
Definition at line 145 of file serv_imap.c.
References IMAP.
Referenced by imap_append(), imap_cleanup_function(), and imap_command_loop().
int imap_grabroom | ( | char * | returned_roomname, |
const char * | foldername, | ||
int | zapped_ok | ||
) |
Definition at line 1047 of file serv_imap.c.
References CC, CtdlGetRoom(), CtdlMailboxName(), CtdlRoomAccess(), imap_roomname(), ctdlroom::QRname, ROOMNAMELEN, UA_KNOWN, and UA_ZAPPED.
Referenced by imap_append(), imap_delete(), imap_do_copy(), imap_getacl(), imap_getmetadata(), imap_listrights(), imap_myrights(), imap_setmetadata(), imap_status(), imap_subscribe(), and imap_unsubscribe().
void imap_greeting | ( | void | ) |
Definition at line 512 of file serv_imap.c.
References __citimap::authstate, __citimap::cached_rfc822_msgnum, __citimap::cached_rfc822_withbody, CC, CITADEL, CitContext::cs_clientname, CtdlGetConfigStr(), IAPrintf(), IAPuts, imap_as_normal, imap_output_capability_string(), IUnbuffer(), CitContext::kill_me, KILLME_NOLOGIN, malloc(), CitContext::nologin, __citimap::Reply, CitContext::session_specific_data, and SIZ.
Referenced by ctdl_module_init_imap(), and imaps_greeting().
void imap_rescan_msgids | ( | void | ) |
Definition at line 294 of file serv_imap.c.
References CC, CCCIMAP, cdb_fetch(), cdb_free(), CDB_MSGLISTS, CtdlGetRoom(), __citimap::flags, free(), IAPrintf(), imap_add_single_msgid(), IMAP_RECENT, imap_set_seen_flags(), __citimap::last_mtime, cdbdata::len, __citimap::msgids, __citimap::num_msgs, cdbdata::ptr, and __citimap::selected.
Referenced by imap_command_loop(), imap_do_expunge(), and imap_do_store().
void registerImapCMD | ( | const char * | First, |
long | FLen, | ||
const char * | Second, | ||
long | SLen, | ||
imap_handler | H, | ||
int | Flags | ||
) |
Definition at line 44 of file serv_imap.c.
References _imap_handler_hook::Flags, _imap_handler_hook::h, ImapCmds, malloc(), and SIZ.