CamelIMAPXServer

CamelIMAPXServer

Synopsis

                    CamelIMAPXServer;
                    CamelIMAPXServerClass;
#define             IMAPX_MODE_READ
#define             IMAPX_MODE_WRITE

Description

Details

CamelIMAPXServer

typedef struct {
	CamelObject cobject;

	struct _CamelStore *store;
	struct _CamelSession *session;

	/* Info about the current connection */
	struct _CamelURL *url;
	struct _CamelIMAPXStream *stream;
	struct _capability_info *cinfo;
	gboolean is_ssl_stream;
	gboolean is_process_stream;

	CamelIMAPXNamespaceList *nsl;

	/* incoming jobs */
	CamelMsgPort *port;
	CamelDList jobs;
	/* in micro seconds */
	guint job_timeout;

	gchar tagprefix;
	gint state:4;

	/* Current command/work queue.  All commands are stored in one list,
	   all the time, so they can be cleaned up in exception cases */
	GStaticRecMutex queue_lock;
	struct _CamelIMAPXCommand *literal;
	CamelDList queue;
	CamelDList active;
	CamelDList done;

	/* info on currently selected folder */
	struct _CamelFolder *select_folder;
	struct _CamelFolderChangeInfo *changes;
	struct _CamelFolder *select_pending;
	guint32 permanentflags;
	guint32 unseen;
	guint64 uidvalidity;
	guint64 highestmodseq;
	guint32 uidnext;
	guint32 exists;
	guint32 recent;
	guint32 mode;

	/* any expunges that happened from the last command, they are
	   processed after the command completes. */
	GSList *expunged;

	GThread *parser_thread;
	/* Protects the output stream between parser thread (which can disconnect from server) and other threads that issue
	   commands. Input stream does not require a lock since only parser_thread can operate on it */
	GStaticRecMutex ostream_lock;
	/* Used for canceling operations as well as signaling parser thread to disconnnect/quit */
	CamelOperation *op;
	gboolean parser_quit;

	/* Idle */
	struct _CamelIMAPXIdle *idle;
	gboolean use_idle;

	gboolean use_qresync;

	/* used for storing eflags to syncronize duplicate get_message requests */
	GHashTable *uid_eflags;

	/* used for binding the handlers for untagged responses */
	GHashTable *untagged_handlers;

	/* ANNOTATEMORE / METADATA (RFC 5464) */
	/* TODO check whether this is the right place to keep this data */
        struct _CamelIMAPXMetaData *metadata; /* for CamelIMAPXMetaData, keyed by path */
} CamelIMAPXServer;

CamelIMAPXServerClass

typedef struct {
	CamelObjectClass cclass;

	gchar tagprefix;
} CamelIMAPXServerClass;

IMAPX_MODE_READ

#define IMAPX_MODE_READ (1<<0)

IMAPX_MODE_WRITE

#define IMAPX_MODE_WRITE (1<<1)