## CamelStore

CamelStore

## Synopsis

    struct              CamelStore;
                        CamelFolderInfo;
    #define             CAMEL_FOLDER_NOSELECT
    #define             CAMEL_FOLDER_NOINFERIORS
    #define             CAMEL_FOLDER_CHILDREN
    #define             CAMEL_FOLDER_NOCHILDREN
    #define             CAMEL_FOLDER_SUBSCRIBED
    #define             CAMEL_FOLDER_VIRTUAL
    #define             CAMEL_FOLDER_SYSTEM
    #define             CAMEL_FOLDER_VTRASH
    #define             CAMEL_FOLDER_SHARED_TO_ME
    #define             CAMEL_FOLDER_SHARED_BY_ME
    #define             CAMEL_FOLDER_TYPE_MASK
    #define             CAMEL_FOLDER_TYPE_BIT
    #define             CAMEL_FOLDER_TYPE_NORMAL
    #define             CAMEL_FOLDER_TYPE_INBOX
    #define             CAMEL_FOLDER_TYPE_OUTBOX
    #define             CAMEL_FOLDER_TYPE_TRASH
    #define             CAMEL_FOLDER_TYPE_JUNK
    #define             CAMEL_FOLDER_TYPE_SENT
    #define             CAMEL_STORE_READ
    #define             CAMEL_STORE_WRITE
                        CamelRenameInfo;
    #define             CAMEL_STORE_SUBSCRIPTIONS
    #define             CAMEL_STORE_VTRASH
    #define             CAMEL_STORE_FILTER_INBOX
    #define             CAMEL_STORE_VJUNK
    #define             CAMEL_STORE_PROXY
    #define             CAMEL_STORE_FOLDER_CREATE
    #define             CAMEL_STORE_FOLDER_EXCL
    #define             CAMEL_STORE_FOLDER_BODY_INDEX
    #define             CAMEL_STORE_FOLDER_PRIVATE
    #define             CAMEL_STORE_FOLDER_CREATE_EXCL
    #define             CAMEL_STORE_FOLDER_INFO_FAST
    #define             CAMEL_STORE_FOLDER_INFO_RECURSIVE
    #define             CAMEL_STORE_FOLDER_INFO_SUBSCRIBED
    #define             CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL
    CamelFolder*        camel_store_get_folder              (CamelStore *store,
                                                             const char *folder_name,
                                                             guint32 flags,
                                                             CamelException *ex);
    CamelFolder*        camel_store_get_inbox               (CamelStore *store,
                                                             CamelException *ex);
    CamelFolder*        camel_store_get_trash               (CamelStore *store,
                                                             CamelException *ex);
    CamelFolder*        camel_store_get_junk                (CamelStore *store,
                                                             CamelException *ex);
    CamelFolderInfo*    camel_store_create_folder           (CamelStore *store,
                                                             const char *parent_name,
                                                             const char *folder_name,
                                                             CamelException *ex);
    void                camel_store_delete_folder           (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);
    void                camel_store_rename_folder           (CamelStore *store,
                                                             const char *old_name,
                                                             const char *new_name,
                                                             CamelException *ex);
    void                camel_store_sync                    (CamelStore *store,
                                                             int expunge,
                                                             CamelException *ex);
    CamelFolderInfo*    camel_store_get_folder_info         (CamelStore *store,
                                                             const char *top,
                                                             guint32 flags,
                                                             CamelException *ex);
    void                camel_store_free_folder_info        (CamelStore *store,
                                                             CamelFolderInfo *fi);
    void                camel_store_free_folder_info_full   (CamelStore *store,
                                                             CamelFolderInfo *fi);
    void                camel_store_free_folder_info_nop    (CamelStore *store,
                                                             CamelFolderInfo *fi);
    CamelFolderInfo*    camel_folder_info_new               (void);
    void                camel_folder_info_free              (CamelFolderInfo *fi);
    CamelFolderInfo*    camel_folder_info_build             (GPtrArray *folders,
                                                             const char *namespace,
                                                             char separator,
                                                             gboolean short_names);
    CamelFolderInfo*    camel_folder_info_clone             (CamelFolderInfo *fi);
    gboolean            camel_store_supports_subscriptions  (CamelStore *store);
    gboolean            camel_store_folder_subscribed       (CamelStore *store,
                                                             const char *folder_name);
    void                camel_store_subscribe_folder        (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);
    void                camel_store_unsubscribe_folder      (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);
    void                camel_store_noop                    (CamelStore *store,
                                                             CamelException *ex);
    int                 camel_store_folder_uri_equal        (CamelStore *store,
                                                             const char *uri0,
                                                             const char *uri1);
    gboolean            camel_store_can_refresh_folder      (CamelStore *store,
                                                             CamelFolderInfo *info,
                                                             CamelException *ex);
                        CamelISubscribe;
    gboolean            camel_isubscribe_subscribed         (CamelStore *store,
                                                             const char *name);
    void                camel_isubscribe_subscribe          (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);
    void                camel_isubscribe_unsubscribe        (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);

## Description

## Details

### struct CamelStore

    struct CamelStore {
    	CamelService parent_object;
    	struct _CamelStorePrivate *priv;

    	CamelObjectBag *folders;

    	guint32 flags;
    	guint32 mode;
    };

### CamelFolderInfo

    typedef struct {
    	struct _CamelFolderInfo *next;
    	struct _CamelFolderInfo *parent;
    	struct _CamelFolderInfo *child;

    	char *uri;
    	char *name;
    	char *full_name;

    	guint32 flags;
    	gint32 unread;
    	gint32 total;
    } CamelFolderInfo;

### CAMEL_FOLDER_NOSELECT

    #define CAMEL_FOLDER_NOSELECT (1<<0)

### CAMEL_FOLDER_NOINFERIORS

    #define CAMEL_FOLDER_NOINFERIORS (1<<1)

### CAMEL_FOLDER_CHILDREN

    #define CAMEL_FOLDER_CHILDREN (1<<2)

### CAMEL_FOLDER_NOCHILDREN

    #define CAMEL_FOLDER_NOCHILDREN (1<<3)

### CAMEL_FOLDER_SUBSCRIBED

    #define CAMEL_FOLDER_SUBSCRIBED (1<<4)

### CAMEL_FOLDER_VIRTUAL

    #define CAMEL_FOLDER_VIRTUAL (1<<5)

### CAMEL_FOLDER_SYSTEM

    #define CAMEL_FOLDER_SYSTEM (1<<6)

### CAMEL_FOLDER_VTRASH

    #define CAMEL_FOLDER_VTRASH (1<<7)

### CAMEL_FOLDER_SHARED_TO_ME

    #define CAMEL_FOLDER_SHARED_TO_ME (1<<8)

### CAMEL_FOLDER_SHARED_BY_ME

    #define CAMEL_FOLDER_SHARED_BY_ME (1<<9)

### CAMEL_FOLDER_TYPE_MASK

    #define CAMEL_FOLDER_TYPE_MASK (7 << 10)

### CAMEL_FOLDER_TYPE_BIT

    #define CAMEL_FOLDER_TYPE_BIT (10)

### CAMEL_FOLDER_TYPE_NORMAL

    #define CAMEL_FOLDER_TYPE_NORMAL (0 << 10)

### CAMEL_FOLDER_TYPE_INBOX

    #define CAMEL_FOLDER_TYPE_INBOX (1 << 10)

### CAMEL_FOLDER_TYPE_OUTBOX

    #define CAMEL_FOLDER_TYPE_OUTBOX (2 << 10)

### CAMEL_FOLDER_TYPE_TRASH

    #define CAMEL_FOLDER_TYPE_TRASH (3 << 10)

### CAMEL_FOLDER_TYPE_JUNK

    #define CAMEL_FOLDER_TYPE_JUNK (4 << 10)

### CAMEL_FOLDER_TYPE_SENT

    #define CAMEL_FOLDER_TYPE_SENT (5 << 10)

### CAMEL_STORE_READ

    #define CAMEL_STORE_READ  (1 << 0)

### CAMEL_STORE_WRITE

    #define CAMEL_STORE_WRITE (1 << 1)

### CamelRenameInfo

    typedef struct {
    	char *old_base;
    	struct _CamelFolderInfo *new;
    } CamelRenameInfo;

### CAMEL_STORE_SUBSCRIPTIONS

    #define CAMEL_STORE_SUBSCRIPTIONS	(1 << 0)

### CAMEL_STORE_VTRASH

    #define CAMEL_STORE_VTRASH		(1 << 1)

### CAMEL_STORE_FILTER_INBOX

    #define CAMEL_STORE_FILTER_INBOX	(1 << 2)

### CAMEL_STORE_VJUNK

    #define CAMEL_STORE_VJUNK		(1 << 3)

### CAMEL_STORE_PROXY

    #define CAMEL_STORE_PROXY		(1 << 4)

### CAMEL_STORE_FOLDER_CREATE

    #define CAMEL_STORE_FOLDER_CREATE (1<<0)

### CAMEL_STORE_FOLDER_EXCL

    #define CAMEL_STORE_FOLDER_EXCL (1<<1)

### CAMEL_STORE_FOLDER_BODY_INDEX

    #define CAMEL_STORE_FOLDER_BODY_INDEX (1<<2)

### CAMEL_STORE_FOLDER_PRIVATE

    #define CAMEL_STORE_FOLDER_PRIVATE (1<<3) /* a private folder, that shouldn't show up in unmatched/folder info's, etc */

### CAMEL_STORE_FOLDER_CREATE_EXCL

    #define CAMEL_STORE_FOLDER_CREATE_EXCL (CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_FOLDER_EXCL)

### CAMEL_STORE_FOLDER_INFO_FAST

    #define CAMEL_STORE_FOLDER_INFO_FAST       (1 << 0)

### CAMEL_STORE_FOLDER_INFO_RECURSIVE

    #define CAMEL_STORE_FOLDER_INFO_RECURSIVE  (1 << 1)

### CAMEL_STORE_FOLDER_INFO_SUBSCRIBED

    #define CAMEL_STORE_FOLDER_INFO_SUBSCRIBED (1 << 2)

### CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL

    #define CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL (1 << 3)  /* don't include vTrash/vJunk folders */

### camel_store_get_folder ()

    CamelFolder*        camel_store_get_folder              (CamelStore *store,
                                                             const char *folder_name,
                                                             guint32 flags,
                                                             CamelException *ex);

`store` : |
`folder_name` : |
`flags` : |
`ex` : |
Returns : |

### camel_store_get_inbox ()

    CamelFolder*        camel_store_get_inbox               (CamelStore *store,
                                                             CamelException *ex);

`store` : |
`ex` : |
Returns : |

### camel_store_get_trash ()

    CamelFolder*        camel_store_get_trash               (CamelStore *store,
                                                             CamelException *ex);

`store` : |
`ex` : |
Returns : |

### camel_store_get_junk ()

    CamelFolder*        camel_store_get_junk                (CamelStore *store,
                                                             CamelException *ex);

`store` : |
`ex` : |
Returns : |

### camel_store_create_folder ()

    CamelFolderInfo*    camel_store_create_folder           (CamelStore *store,
                                                             const char *parent_name,
                                                             const char *folder_name,
                                                             CamelException *ex);

`store` : |
`parent_name` : |
`folder_name` : |
`ex` : |
Returns : |

### camel_store_delete_folder ()

    void                camel_store_delete_folder           (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);

`store` : |
`folder_name` : |
`ex` : |

### camel_store_rename_folder ()

    void                camel_store_rename_folder           (CamelStore *store,
                                                             const char *old_name,
                                                             const char *new_name,
                                                             CamelException *ex);

`store` : |
`old_name` : |
`new_name` : |
`ex` : |

### camel_store_sync ()

    void                camel_store_sync                    (CamelStore *store,
                                                             int expunge,
                                                             CamelException *ex);

`store` : |
`expunge` : |
`ex` : |

### camel_store_get_folder_info ()

    CamelFolderInfo*    camel_store_get_folder_info         (CamelStore *store,
                                                             const char *top,
                                                             guint32 flags,
                                                             CamelException *ex);

`store` : |
`top` : |
`flags` : |
`ex` : |
Returns : |

### camel_store_free_folder_info ()

    void                camel_store_free_folder_info        (CamelStore *store,
                                                             CamelFolderInfo *fi);

`store` : |
`fi` : |

### camel_store_free_folder_info_full ()

    void                camel_store_free_folder_info_full   (CamelStore *store,
                                                             CamelFolderInfo *fi);

`store` : |
`fi` : |

### camel_store_free_folder_info_nop ()

    void                camel_store_free_folder_info_nop    (CamelStore *store,
                                                             CamelFolderInfo *fi);

`store` : |
`fi` : |

### camel_folder_info_new ()

    CamelFolderInfo*    camel_folder_info_new               (void);

Returns : |

### camel_folder_info_free ()

    void                camel_folder_info_free              (CamelFolderInfo *fi);

`fi` : |

### camel_folder_info_build ()

    CamelFolderInfo*    camel_folder_info_build             (GPtrArray *folders,
                                                             const char *namespace,
                                                             char separator,
                                                             gboolean short_names);

`folders` : |
`namespace` : |
`separator` : |
`short_names` : |
Returns : |

### camel_folder_info_clone ()

    CamelFolderInfo*    camel_folder_info_clone             (CamelFolderInfo *fi);

`fi` : |
Returns : |

### camel_store_supports_subscriptions ()

    gboolean            camel_store_supports_subscriptions  (CamelStore *store);

`store` : |
Returns : |

### camel_store_folder_subscribed ()

    gboolean            camel_store_folder_subscribed       (CamelStore *store,
                                                             const char *folder_name);

`store` : |
`folder_name` : |
Returns : |

### camel_store_subscribe_folder ()

    void                camel_store_subscribe_folder        (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);

`store` : |
`folder_name` : |
`ex` : |

### camel_store_unsubscribe_folder ()

    void                camel_store_unsubscribe_folder      (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);

`store` : |
`folder_name` : |
`ex` : |

### camel_store_noop ()

    void                camel_store_noop                    (CamelStore *store,
                                                             CamelException *ex);

`store` : |
`ex` : |

### camel_store_folder_uri_equal ()

    int                 camel_store_folder_uri_equal        (CamelStore *store,
                                                             const char *uri0,
                                                             const char *uri1);

`store` : |
`uri0` : |
`uri1` : |
Returns : |

### camel_store_can_refresh_folder ()

    gboolean            camel_store_can_refresh_folder      (CamelStore *store,
                                                             CamelFolderInfo *info,
                                                             CamelException *ex);

`store` : |
`info` : |
`ex` : |
Returns : |

### CamelISubscribe

    typedef struct {
    	CamelInterface iface;

    	gboolean (*subscribed)(CamelStore *store, const char *folder_name);
    	void (*subscribe)(CamelStore *store, const char *folder_name, CamelException *ex);
    	void (*unsubscribe)(CamelStore *store, const char *folder_name, CamelException *ex);
    } CamelISubscribe;

### camel_isubscribe_subscribed ()

    gboolean            camel_isubscribe_subscribed         (CamelStore *store,
                                                             const char *name);

`store` : |
`name` : |
Returns : |

### camel_isubscribe_subscribe ()

    void                camel_isubscribe_subscribe          (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);

`store` : |
`folder_name` : |
`ex` : |

### camel_isubscribe_unsubscribe ()

    void                camel_isubscribe_unsubscribe        (CamelStore *store,
                                                             const char *folder_name,
                                                             CamelException *ex);

`store` : |
`folder_name` : |
`ex` : |