CamelIMAPPDriver
3
CAMEL Library

# CamelIMAPPDriver

## Synopsis

                        CamelIMAPPDriver;
                        CamelIMAPPFetch;
    int                 (*CamelIMAPPDriverFunc)             (struct _CamelIMAPPDriver *driver,
                                                             void *data);
    void                (*CamelIMAPPLoginFunc)              (struct _CamelIMAPPDriver *driver,
                                                             char **login,
                                                             char **pass,
                                                             void *data);
    void                (*CamelIMAPPFetchFunc)              (struct _CamelIMAPPDriver *driver,
                                                             CamelIMAPPFetch *);
    CamelIMAPPDriver*   camel_imapp_driver_new              (CamelIMAPPStream *stream);
    void                camel_imapp_driver_set_sasl_factory (CamelIMAPPDriver *id,
                                                             CamelIMAPPSASLFunc get_sasl,
                                                             void *sasl_data);
    void                camel_imapp_driver_set_login_query  (CamelIMAPPDriver *id,
                                                             CamelIMAPPLoginFunc get_login,
                                                             void *login_data);
    void                camel_imapp_driver_login            (CamelIMAPPDriver *id);
    void                camel_imapp_driver_select           (CamelIMAPPDriver *id,
                                                             struct _CamelIMAPPFolder *folder);
    void                camel_imapp_driver_update           (CamelIMAPPDriver *id,
                                                             struct _CamelIMAPPFolder *folder);
    void                camel_imapp_driver_sync             (CamelIMAPPDriver *id,
                                                             gboolean expunge,
                                                             struct _CamelIMAPPFolder *folder);

## Description

## Details

### CamelIMAPPDriver

    typedef struct {
    	CamelObject parent_object;

    	struct _CamelIMAPPEngine *engine;

    	struct _CamelIMAPPFolder *folder;

    	/* current folder stuff */
    	GPtrArray *summary;
    	guint32 uidvalidity;
    	guint32 exists;
    	guint32 recent;
    	guint32 unseen;
    	guint32 permanentflags;

    	/* list stuff */
    	GPtrArray *list_result;
    	GSList *list_commands;
    	guint32 list_flags;

    	/* sem_t list_sem; for controlled access to list variables */

    	/* this is so the node is always in a list - easier exception management */
    	EDList body_fetch;
    	EDList body_fetch_done;

    	/* factory to get an appropriate sasl mech */
    	CamelIMAPPSASLFunc get_sasl;
    	void *get_sasl_data;

    	/* callbacks, get login username/pass */
    	CamelIMAPPLoginFunc get_login;
    	void *get_login_data;
    } CamelIMAPPDriver;

### CamelIMAPPFetch

    typedef struct {
    	struct _CamelIMAPPFetch *next;
    	struct _CamelIMAPPFetch *prev;

    	CamelStream *body;	/* the content fetched */

    	struct _CamelIMAPPFolder *folder;
    	char *uid;
    	char *section;

    	CamelIMAPPFetchFunc done;
    	void *data;
    } CamelIMAPPFetch;

### CamelIMAPPDriverFunc ()

    int                 (*CamelIMAPPDriverFunc)             (struct _CamelIMAPPDriver *driver,
                                                             void *data);

`driver` :

`data` :

Returns :

### CamelIMAPPLoginFunc ()

    void                (*CamelIMAPPLoginFunc)              (struct _CamelIMAPPDriver *driver,
                                                             char **login,
                                                             char **pass,
                                                             void *data);

`driver` :

`login` :

`pass` :

`data` :

### CamelIMAPPFetchFunc ()

    void                (*CamelIMAPPFetchFunc)              (struct _CamelIMAPPDriver *driver,
                                                             CamelIMAPPFetch *);

`driver` :

`Param2` :

### camel_imapp_driver_new ()

    CamelIMAPPDriver*   camel_imapp_driver_new              (CamelIMAPPStream *stream);

`stream` :

Returns :

### camel_imapp_driver_set_sasl_factory ()

    void                camel_imapp_driver_set_sasl_factory (CamelIMAPPDriver *id,
                                                             CamelIMAPPSASLFunc get_sasl,
                                                             void *sasl_data);

`id` :

`get_sasl` :

`sasl_data` :

### camel_imapp_driver_set_login_query ()

    void                camel_imapp_driver_set_login_query  (CamelIMAPPDriver *id,
                                                             CamelIMAPPLoginFunc get_login,
                                                             void *login_data);

`id` :

`get_login` :

`login_data` :

### camel_imapp_driver_login ()

    void                camel_imapp_driver_login            (CamelIMAPPDriver *id);

`id` :

### camel_imapp_driver_select ()

    void                camel_imapp_driver_select           (CamelIMAPPDriver *id,
                                                             struct _CamelIMAPPFolder *folder);

`id` :

`folder` :

### camel_imapp_driver_update ()

    void                camel_imapp_driver_update           (CamelIMAPPDriver *id,
                                                             struct _CamelIMAPPFolder *folder);

`id` :

`folder` :

### camel_imapp_driver_sync ()

    void                camel_imapp_driver_sync             (CamelIMAPPDriver *id,
                                                             gboolean expunge,
                                                             struct _CamelIMAPPFolder *folder);

`id` :

`expunge` :

`folder` :