camel-imapx-utils

camel-imapx-utils

Synopsis

enum                camel_imapx_id_t;
struct              capability_info;
struct              fetch_info;
#define             FETCH_BODY
#define             FETCH_TEXT
#define             FETCH_HEADER
#define             FETCH_MINFO
#define             FETCH_CINFO
#define             FETCH_SIZE
#define             FETCH_OFFSET
#define             FETCH_FLAGS
#define             FETCH_DATE
#define             FETCH_SECTION
#define             FETCH_UID
#define             FETCH_MODSEQ
struct              status_info;
struct              state_info;
struct              list_info;
#define             IMAPX_TYPE_CHAR
#define             IMAPX_TYPE_TEXT_CHAR
#define             IMAPX_TYPE_QUOTED_CHAR
#define             IMAPX_TYPE_ATOM_CHAR
#define             IMAPX_TYPE_TOKEN_CHAR
#define             IMAPX_TYPE_NOTID_CHAR
#define             imapx_is_text_char                  (c)
#define             imapx_is_quoted_char                (c)
#define             imapx_is_atom_char                  (c)
#define             imapx_is_token_char                 (c)
#define             imapx_is_notid_char                 (c)
#define             imapx_is_atom                       (s)
#define             CAMEL_IMAPX_DEBUG_command
#define             CAMEL_IMAPX_DEBUG_debug
#define             CAMEL_IMAPX_DEBUG_extra
#define             CAMEL_IMAPX_DEBUG_io
#define             CAMEL_IMAPX_DEBUG_token
#define             CAMEL_IMAPX_DEBUG_parse
#define             CAMEL_IMAPX_DEBUG_ALL
#define             camel_imapx_debug                   (type,
                                                         ...)

Description

Details

enum camel_imapx_id_t

typedef enum _camel_imapx_id_t {
	IMAPX_UNKNOWN = 0,
	IMAPX_ALERT,
	IMAPX_ANNOTATEMORE,
	IMAPX_ANNOTATION,
	IMAPX_APPENDUID,
	IMAPX_BAD,
	IMAPX_BODY,
	IMAPX_BODYSTRUCTURE,
	IMAPX_BYE,
	IMAPX_CAPABILITY,
	IMAPX_CLOSED,
	IMAPX_COPYUID,
	IMAPX_ENVELOPE,
	IMAPX_EXISTS,
	IMAPX_EXPUNGE,
	IMAPX_FETCH,
	IMAPX_FLAGS,
	IMAPX_GETANNOTATION,
	IMAPX_HIGHESTMODSEQ,
	IMAPX_INTERNALDATE,
	IMAPX_LIST,
	IMAPX_LSUB,
	IMAPX_MESSAGES,
	IMAPX_MODSEQ,
	IMAPX_NAMESPACE,
	IMAPX_NEWNAME,
	IMAPX_NO,
	IMAPX_NOMODSEQ,
	IMAPX_OK,
	IMAPX_PARSE,
	IMAPX_PERMANENTFLAGS,
	IMAPX_PREAUTH,
	IMAPX_READ_ONLY,
	IMAPX_READ_WRITE,
	IMAPX_RECENT,
	IMAPX_RFC822_HEADER,
	IMAPX_RFC822_SIZE,
	IMAPX_RFC822_TEXT,
	IMAPX_SETANNOTATION,
	IMAPX_STATUS,
	IMAPX_TRYCREATE,
	IMAPX_UID,
	IMAPX_UIDVALIDITY,
	IMAPX_UNSEEN,
	IMAPX_UIDNEXT,
	IMAPX_VANISHED,
} camel_imapx_id_t;

struct capability_info

struct capability_info {
	guint32 capa;
	GHashTable *auth_types;
};

struct fetch_info

struct fetch_info {
	guint32 got;		/* what we got, see below */
	CamelStream *body; /* BODY[.*](<.*>)? */
	CamelStream *text; /* RFC822.TEXT */
	CamelStream *header; /* RFC822.HEADER */
	struct _CamelMessageInfo *minfo; /* ENVELOPE */
	struct _CamelMessageContentInfo *cinfo; /* BODYSTRUCTURE,BODY */
	guint32 size;		/* RFC822.SIZE */
	guint32 offset;		/* start offset of a BODY[]<offset.length> request */
	guint32 flags;		/* FLAGS */
	guint64 modseq;		/* MODSEQ */
	struct _CamelFlag *user_flags;
	gchar *date;		/* INTERNALDATE */
	gchar *section;		/* section for a BODY[section] request */
	gchar *uid;		/* UID */
};

FETCH_BODY

#define FETCH_BODY (1<<0)

FETCH_TEXT

#define FETCH_TEXT (1<<1)

FETCH_HEADER

#define FETCH_HEADER (1<<2)

FETCH_MINFO

#define FETCH_MINFO (1<<3)

FETCH_CINFO

#define FETCH_CINFO (1<<4)

FETCH_SIZE

#define FETCH_SIZE (1<<5)

FETCH_OFFSET

#define FETCH_OFFSET (1<<6)

FETCH_FLAGS

#define FETCH_FLAGS (1<<7)

FETCH_DATE

#define FETCH_DATE (1<<8)

FETCH_SECTION

#define FETCH_SECTION (1<<9)

FETCH_UID

#define FETCH_UID (1<<10)

FETCH_MODSEQ

#define FETCH_MODSEQ (1<<11)

struct status_info

struct status_info {
	camel_imapx_id_t result; /* ok/no/bad/preauth only, user_cancel - client response */
	camel_imapx_id_t condition; /* read-only/read-write/alert/parse/trycreate/newname/permanentflags/uidvalidity/unseen/highestmodseq */

	union {
		struct {
			gchar *oldname;
			gchar *newname;
		} newname;
		guint32 permanentflags;
		guint64 uidvalidity;
		guint32 uidnext;
		guint32 unseen;
		guint64 highestmodseq;
		struct {
			guint64 uidvalidity;
			guint32 uid;
		} appenduid;
		struct {
			guint64 uidvalidity;
			GPtrArray *uids;
			GPtrArray *copied_uids;
		} copyuid;
		struct _capability_info *cinfo;
};

struct state_info

struct state_info {
	gchar *name;
	guint32 messages;
	guint32 recent;
	guint32 uidnext;
	guint32 unseen;
	guint64 uidvalidity;
	guint64 highestmodseq;
};

struct list_info

struct list_info {
	guint32 flags:24;
	gchar separator;
	gchar *name;
};

IMAPX_TYPE_CHAR

#define IMAPX_TYPE_CHAR (1<<0)

IMAPX_TYPE_TEXT_CHAR

#define IMAPX_TYPE_TEXT_CHAR (1<<1)

IMAPX_TYPE_QUOTED_CHAR

#define IMAPX_TYPE_QUOTED_CHAR (1<<2)

IMAPX_TYPE_ATOM_CHAR

#define IMAPX_TYPE_ATOM_CHAR (1<<3)

IMAPX_TYPE_TOKEN_CHAR

#define IMAPX_TYPE_TOKEN_CHAR (1<<4)

IMAPX_TYPE_NOTID_CHAR

#define IMAPX_TYPE_NOTID_CHAR (1<<5)

imapx_is_text_char()

#define imapx_is_text_char(c) ((__KOLAB_imapx_specials[((unsigned char)(c))&0xff] & IMAPX_TYPE_TEXT_CHAR) != 0)

imapx_is_quoted_char()

#define imapx_is_quoted_char(c) ((__KOLAB_imapx_specials[((unsigned char)(c))&0xff] & IMAPX_TYPE_QUOTED_CHAR) != 0)

imapx_is_atom_char()

#define imapx_is_atom_char(c) ((__KOLAB_imapx_specials[((unsigned char)(c))&0xff] & IMAPX_TYPE_ATOM_CHAR) != 0)

imapx_is_token_char()

#define imapx_is_token_char(c) ((__KOLAB_imapx_specials[((unsigned char)(c))&0xff] & IMAPX_TYPE_TOKEN_CHAR) != 0)

imapx_is_notid_char()

#define imapx_is_notid_char(c) ((__KOLAB_imapx_specials[((unsigned char)(c))&0xff] & IMAPX_TYPE_NOTID_CHAR) != 0)

imapx_is_atom()

#define imapx_is_atom(s) (__KOLAB_imapx_is_mask(s) & IMAPX_TYPE_ATOM_CHAR)

CAMEL_IMAPX_DEBUG_command

#define CAMEL_IMAPX_DEBUG_command (1<<0)

CAMEL_IMAPX_DEBUG_debug

#define CAMEL_IMAPX_DEBUG_debug		(1<<1)

CAMEL_IMAPX_DEBUG_extra

#define CAMEL_IMAPX_DEBUG_extra		(1<<2)

CAMEL_IMAPX_DEBUG_io

#define CAMEL_IMAPX_DEBUG_io		(1<<3)

CAMEL_IMAPX_DEBUG_token

#define CAMEL_IMAPX_DEBUG_token		(1<<4)

CAMEL_IMAPX_DEBUG_parse

#define CAMEL_IMAPX_DEBUG_parse		(1<<5)

CAMEL_IMAPX_DEBUG_ALL

#define CAMEL_IMAPX_DEBUG_ALL		((1<<6)-1)

camel_imapx_debug()

#define camel_imapx_debug(type, ...) do { if (__KOLAB_camel_imapx_debug_flags & CAMEL_IMAPX_DEBUG_ALL & CAMEL_IMAPX_DEBUG_ ## type) { __VA_ARGS__ ; } } while (0)