## CamelFolder

CamelFolder

## Synopsis

    struct              CamelFolder;
                        CamelFolderChangeInfo;
                        CamelFolderQuotaInfo;
    #define             CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY
    #define             CAMEL_FOLDER_HAS_SEARCH_CAPABILITY
    #define             CAMEL_FOLDER_FILTER_RECENT
    #define             CAMEL_FOLDER_HAS_BEEN_DELETED
    #define             CAMEL_FOLDER_IS_TRASH
    #define             CAMEL_FOLDER_IS_JUNK
    #define             CAMEL_FOLDER_FILTER_JUNK
    void                camel_folder_construct              (CamelFolder *folder,
                                                             CamelStore *parent_store,
                                                             const char *full_name,
                                                             const char *name);
    void                camel_folder_refresh_info           (CamelFolder *folder,
                                                             CamelException *ex);
    void                camel_folder_sync                   (CamelFolder *folder,
                                                             gboolean expunge,
                                                             CamelException *ex);
    CamelStore*         camel_folder_get_parent_store       (CamelFolder *folder);
    void                camel_folder_expunge                (CamelFolder *folder,
                                                             CamelException *ex);
    const char*         camel_folder_get_name               (CamelFolder *folder);
    const char*         camel_folder_get_full_name          (CamelFolder *folder);
    guint32             camel_folder_get_permanent_flags    (CamelFolder *folder);
    guint32             camel_folder_get_message_flags      (CamelFolder *folder,
                                                             const char *uid);
    gboolean            camel_folder_set_message_flags      (CamelFolder *folder,
                                                             const char *uid,
                                                             guint32 flags,
                                                             guint32 set);
    gboolean            camel_folder_get_message_user_flag  (CamelFolder *folder,
                                                             const char *uid,
                                                             const char *name);
    void                camel_folder_set_message_user_flag  (CamelFolder *folder,
                                                             const char *uid,
                                                             const char *name,
                                                             gboolean value);
    const char*         camel_folder_get_message_user_tag   (CamelFolder *folder,
                                                             const char *uid,
                                                             const char *name);
    void                camel_folder_set_message_user_tag   (CamelFolder *folder,
                                                             const char *uid,
                                                             const char *name,
                                                             const char *value);
    void                camel_folder_append_message         (CamelFolder *folder,
                                                             CamelMimeMessage *message,
                                                             const CamelMessageInfo *info,
                                                             char **appended_uid,
                                                             CamelException *ex);
    gboolean            camel_folder_has_summary_capability (CamelFolder *folder);
    int                 camel_folder_get_message_count      (CamelFolder *folder);
    int                 camel_folder_get_unread_message_count
                                                            (CamelFolder *folder);
    int                 camel_folder_get_deleted_message_count
                                                            (CamelFolder *folder);
    GPtrArray*          camel_folder_get_summary            (CamelFolder *folder);
    void                camel_folder_free_summary           (CamelFolder *folder,
                                                             GPtrArray *array);
    CamelMimeMessage*   camel_folder_get_message            (CamelFolder *folder,
                                                             const char *uid,
                                                             CamelException *ex);
    #define             camel_folder_delete_message         (folder, uid)
    GPtrArray*          camel_folder_get_uids               (CamelFolder *folder);
    void                camel_folder_free_uids              (CamelFolder *folder,
                                                             GPtrArray *array);
    gboolean            camel_folder_has_search_capability  (CamelFolder *folder);
    GPtrArray*          camel_folder_search_by_expression   (CamelFolder *folder,
                                                             const char *expr,
                                                             CamelException *ex);
    GPtrArray*          camel_folder_search_by_uids         (CamelFolder *folder,
                                                             const char *expr,
                                                             GPtrArray *uids,
                                                             CamelException *ex);
    void                camel_folder_search_free            (CamelFolder *folder,
                                                             GPtrArray *result);
    CamelMessageInfo*   camel_folder_get_message_info       (CamelFolder *folder,
                                                             const char *uid);
    void                camel_folder_free_message_info      (CamelFolder *folder,
                                                             CamelMessageInfo *info);
    void                camel_folder_ref_message_info       (CamelFolder *folder,
                                                             CamelMessageInfo *info);
    void                camel_folder_transfer_messages_to   (CamelFolder *source,
                                                             GPtrArray *uids,
                                                             CamelFolder *dest,
                                                             GPtrArray **transferred_uids,
                                                             gboolean delete_originals,
                                                             CamelException *ex);
    void                camel_folder_delete                 (CamelFolder *folder);
    void                camel_folder_rename                 (CamelFolder *folder,
                                                             const char *new);
    void                camel_folder_freeze                 (CamelFolder *folder);
    void                camel_folder_thaw                   (CamelFolder *folder);
    gboolean            camel_folder_is_frozen              (CamelFolder *folder);
    CamelFolderQuotaInfo* camel_folder_get_quota_info       (CamelFolder *folder);
    CamelFolderQuotaInfo* camel_folder_quota_info_new       (const char *name,
                                                             guint64 used,
                                                             guint64 total);
    CamelFolderQuotaInfo* camel_folder_quota_info_clone     (const CamelFolderQuotaInfo *info);
    void                camel_folder_quota_info_free        (CamelFolderQuotaInfo *info);
    void                camel_folder_free_nop               (CamelFolder *folder,
                                                             GPtrArray *array);
    void                camel_folder_free_shallow           (CamelFolder *folder,
                                                             GPtrArray *array);
    void                camel_folder_free_deep              (CamelFolder *folder,
                                                             GPtrArray *array);
    CamelFolderChangeInfo* camel_folder_change_info_new     (void);
    void                camel_folder_change_info_clear      (CamelFolderChangeInfo *info);
    void                camel_folder_change_info_free       (CamelFolderChangeInfo *info);
    gboolean            camel_folder_change_info_changed    (CamelFolderChangeInfo *info);
    void                camel_folder_change_info_add_source (CamelFolderChangeInfo *info,
                                                             const char *uid);
    void                camel_folder_change_info_add_source_list
                                                            (CamelFolderChangeInfo *info,
                                                             const GPtrArray *list);
    void                camel_folder_change_info_add_update (CamelFolderChangeInfo *info,
                                                             const char *uid);
    void                camel_folder_change_info_add_update_list
                                                            (CamelFolderChangeInfo *info,
                                                             const GPtrArray *list);
    void                camel_folder_change_info_build_diff (CamelFolderChangeInfo *info);
    void                camel_folder_change_info_cat        (CamelFolderChangeInfo *info,
                                                             CamelFolderChangeInfo *src);
    void                camel_folder_change_info_add_uid    (CamelFolderChangeInfo *info,
                                                             const char *uid);
    void                camel_folder_change_info_remove_uid (CamelFolderChangeInfo *info,
                                                             const char *uid);
    void                camel_folder_change_info_change_uid (CamelFolderChangeInfo *info,
                                                             const char *uid);
    void                camel_folder_change_info_recent_uid (CamelFolderChangeInfo *info,
                                                             const char *uid);

## Description

## Details

### struct CamelFolder

    struct CamelFolder {
    	CamelObject parent_object;

    	struct _CamelFolderPrivate *priv;

    	/* get these via the :get() method, they might not be set otherwise */
    	char *name;
    	char *full_name;
    	char *description;

    	CamelStore *parent_store;
    	CamelFolderSummary *summary;

    	guint32 folder_flags;
    	guint32 permanent_flags;
    };

### CamelFolderChangeInfo

    typedef struct {
    	GPtrArray *uid_added;
    	GPtrArray *uid_removed;
    	GPtrArray *uid_changed;
    	GPtrArray *uid_recent;

    	struct _CamelFolderChangeInfoPrivate *priv;
    } CamelFolderChangeInfo;

### CamelFolderQuotaInfo

    typedef struct {
    	char *name;
    	guint64 used;
    	guint64 total;

    	struct _CamelFolderQuotaInfo *next;
    } CamelFolderQuotaInfo;

### CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY

    #define CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY (1<<0)

### CAMEL_FOLDER_HAS_SEARCH_CAPABILITY

    #define CAMEL_FOLDER_HAS_SEARCH_CAPABILITY  (1<<1)

### CAMEL_FOLDER_FILTER_RECENT

    #define CAMEL_FOLDER_FILTER_RECENT          (1<<2)

### CAMEL_FOLDER_HAS_BEEN_DELETED

    #define CAMEL_FOLDER_HAS_BEEN_DELETED       (1<<3)

### CAMEL_FOLDER_IS_TRASH

    #define CAMEL_FOLDER_IS_TRASH               (1<<4)

### CAMEL_FOLDER_IS_JUNK

    #define CAMEL_FOLDER_IS_JUNK                (1<<5)

### CAMEL_FOLDER_FILTER_JUNK

    #define CAMEL_FOLDER_FILTER_JUNK	    (1<<6)

### camel_folder_construct ()

    void                camel_folder_construct              (CamelFolder *folder,
                                                             CamelStore *parent_store,
                                                             const char *full_name,
                                                             const char *name);

Initalizes the folder by setting the parent store and name.

`folder` : | a CamelFolder object to construct
`parent_store` : | parent CamelStore object of the folder
`full_name` : | full name of the folder
`name` : | short name of the folder

### camel_folder_refresh_info ()

    void                camel_folder_refresh_info           (CamelFolder *folder,
                                                             CamelException *ex);

Updates a folder's summary to be in sync with its backing store.

`folder` : | a CamelFolder object
`ex` : | a CamelException

### camel_folder_sync ()

    void                camel_folder_sync                   (CamelFolder *folder,
                                                             gboolean expunge,
                                                             CamelException *ex);

Sync changes made to a folder to its backing store, possibly expunging deleted messages as well.

`folder` : | a CamelFolder object
`expunge` : | whether or not to expunge deleted messages
`ex` : | a CamelException

### camel_folder_get_parent_store ()

    CamelStore*         camel_folder_get_parent_store       (CamelFolder *folder);

`folder` : | a CamelFolder object
Returns : | the parent CamelStore of the folder

### camel_folder_expunge ()

    void                camel_folder_expunge                (CamelFolder *folder,
                                                             CamelException *ex);

Delete messages which have been marked as "DELETED"

`folder` : | a CamelFolder object
`ex` : | a CamelException

### camel_folder_get_name ()

    const char*         camel_folder_get_name               (CamelFolder *folder);

Get the (short) name of the folder. The fully qualified name can be obtained with the camel_folder_get_full_name method.

`folder` : | a CamelFolder object
Returns : | the short name of the folder

### camel_folder_get_full_name ()

    const char*         camel_folder_get_full_name          (CamelFolder *folder);

Get the full name of the folder.

`folder` : | a CamelFolder object
Returns : | the full name of the folder

### camel_folder_get_permanent_flags ()

    guint32             camel_folder_get_permanent_flags    (CamelFolder *folder);

`folder` : | a CamelFolder object
Returns : | the set of CamelMessageFlags that can be permanently stored on a message between sessions. If it includes CAMEL_FLAG_USER, then user-defined flags will be remembered.

### camel_folder_get_message_flags ()

    guint32             camel_folder_get_message_flags      (CamelFolder *folder,
                                                             const char *uid);

### Warning

`camel_folder_get_message_flags` is deprecated and should not be used in newly-written code. Use camel_folder_get_message_info instead.

`folder` : | a CamelFolder object
`uid` : | the UID of a message in `folder`
Returns : | the CamelMessageFlags that are set on the indicated message.

### camel_folder_set_message_flags ()

    gboolean            camel_folder_set_message_flags      (CamelFolder *folder,
                                                             const char *uid,
                                                             guint32 flags,
                                                             guint32 set);

### Warning

`camel_folder_set_message_flags` is deprecated and should not be used in newly-written code. Use camel_message_info_set_flags on the message info directly (when it works)

Sets those flags specified by `flags` to the values specified by `set` on the indicated message. (This may or may not persist after the folder or store is closed. See camel_folder_get_permanent_flags)

E.g. to set the deleted flag and clear the draft flag, use camel_folder_set_message_flags(folder, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_DRAFT, CAMEL_MESSAGE_DELETED);

`folder` : | a CamelFolder object
`uid` : | the UID of a message in `folder`
`flags` : | a set of CamelMessageFlag values to set
`set` : | the mask of values in `flags` to use.
Returns : | %TRUE if the flags were changed or `FALSE` otherwise

### camel_folder_get_message_user_flag ()

    gboolean            camel_folder_get_message_user_flag  (CamelFolder *folder,
                                                             const char *uid,
                                                             const char *name);

### Warning

`camel_folder_get_message_user_flag` is deprecated and should not be used in newly-written code. Use camel_message_info_get_user_flag on the message info directly

`folder` : | a CamelFolder object
`uid` : | the UID of a message in `folder`
`name` : | the name of a user flag
Returns : | %TRUE if the given user flag is set on the message or `FALSE` otherwise

### camel_folder_set_message_user_flag ()

    void                camel_folder_set_message_user_flag  (CamelFolder *folder,
                                                             const char *uid,
                                                             const char *name,
                                                             gboolean value);

### Warning

`camel_folder_set_message_user_flag` is deprecated and should not be used in newly-written code. Use camel_message_info_set_user_flag on the CamelMessageInfo directly (when it works)

Sets the user flag specified by `name` to the value specified by `value` on the indicated message. (This may or may not persist after the folder or store is closed. See camel_folder_get_permanent_flags)

`folder` : | a CamelFolder object
`uid` : | the UID of a message in `folder`
`name` : | the name of the user flag to set
`value` : | the value to set it to

### camel_folder_get_message_user_tag ()

    const char*         camel_folder_get_message_user_tag   (CamelFolder *folder,
                                                             const char *uid,
                                                             const char *name);

### Warning

`camel_folder_get_message_user_tag` is deprecated and should not be used in newly-written code. Use camel_message_info_get_user_tag on the CamelMessageInfo directly.

`folder` : | a CamelFolder object
`uid` : | the UID of a message in `folder`
`name` : | the name of a user tag
Returns : | the value of the user tag

### camel_folder_set_message_user_tag ()

    void                camel_folder_set_message_user_tag   (CamelFolder *folder,
                                                             const char *uid,
                                                             const char *name,
                                                             const char *value);

### Warning

`camel_folder_set_message_user_tag` is deprecated and should not be used in newly-written code. Use camel_message_info_set_user_tag on the CamelMessageInfo directly (when it works).

Sets the user tag specified by `name` to the value specified by `value` on the indicated message. (This may or may not persist after the folder or store is closed. See camel_folder_get_permanent_flags)

`folder` : | a CamelFolder object
`uid` : | the UID of a message in `folder`
`name` : | the name of the user tag to set
`value` : | the value to set it to

### camel_folder_append_message ()

    void                camel_folder_append_message         (CamelFolder *folder,
                                                             CamelMimeMessage *message,
                                                             const CamelMessageInfo *info,
                                                             char **appended_uid,
                                                             CamelException *ex);

Append `message` to `folder`. Only the flag and tag data from `info` are used. If `info` is `NULL`, no flags or tags will be set.

`folder` : | a CamelFolder object
`message` : | a CamelMimeMessage object
`info` : | a CamelMessageInfo with additional flags/etc to set on new message, or `NULL`
`appended_uid` : | if non-`NULL`, the UID of the appended message will be returned here, if it is known.
`ex` : | a CamelException

### camel_folder_has_summary_capability ()

    gboolean            camel_folder_has_summary_capability (CamelFolder *folder);

Get whether or not the folder has a summary.

`folder` : | a CamelFolder object
Returns : | %TRUE if a summary is available or `FALSE` otherwise

### camel_folder_get_message_count ()

    int                 camel_folder_get_message_count      (CamelFolder *folder);

`folder` : | a CamelFolder object
Returns : | the number of messages in the folder, or `-1` if unknown

### camel_folder_get_unread_message_count ()

    int                 camel_folder_get_unread_message_count
                                                            (CamelFolder *folder);

### Warning

`camel_folder_get_unread_message_count` is deprecated and should not be used in newly-written code. use camel_object_get instead.

`folder` : | a CamelFolder object
Returns : | the number of unread messages in the folder, or `-1` if unknown

### camel_folder_get_deleted_message_count ()

    int                 camel_folder_get_deleted_message_count
                                                            (CamelFolder *folder);

`folder` : | a CamelFolder object
Returns : | the number of deleted messages in the folder, or `-1` if unknown

### camel_folder_get_summary ()

    GPtrArray*          camel_folder_get_summary            (CamelFolder *folder);

This returns the summary information for the folder. This array should not be modified, and must be freed with camel_folder_free_summary.

`folder` : | a CamelFolder object
Returns : | an array of CamelMessageInfo

### camel_folder_free_summary ()

    void                camel_folder_free_summary           (CamelFolder *folder,
                                                             GPtrArray *array);

Frees the summary array returned by camel_folder_get_summary.

`folder` : | a CamelFolder object
`array` : | the summary array to free

### camel_folder_get_message ()

    CamelMimeMessage*   camel_folder_get_message            (CamelFolder *folder,
                                                             const char *uid,
                                                             CamelException *ex);

Get a message from its UID in the folder.

`folder` : | a CamelFolder object
`uid` : | the UID
`ex` : | a CamelException
Returns : | a CamelMimeMessage corresponding to `uid`

### camel_folder_delete_message()

    #define             camel_folder_delete_message(folder, uid)

`folder` : |
`uid` : |

### camel_folder_get_uids ()

    GPtrArray*          camel_folder_get_uids               (CamelFolder *folder);

Get the list of UIDs available in a folder. This routine is useful for finding what messages are available when the folder does not support summaries. The returned array should not be modified, and must be freed by passing it to camel_folder_free_uids.

`folder` : | a CamelFolder object
Returns : | a GPtrArray of UIDs corresponding to the messages available in the folder

### camel_folder_free_uids ()

    void                camel_folder_free_uids              (CamelFolder *folder,
                                                             GPtrArray *array);

Frees the array of UIDs returned by camel_folder_get_uids.

`folder` : | a CamelFolder object
`array` : | the array of uids to free

### camel_folder_has_search_capability ()

    gboolean            camel_folder_has_search_capability  (CamelFolder *folder);

Checks if a folder supports searching.

`folder` : | a CamelFolder object
Returns : | %TRUE if the folder supports searching or `FALSE` otherwise

### camel_folder_search_by_expression ()

    GPtrArray*          camel_folder_search_by_expression   (CamelFolder *folder,
                                                             const char *expr,
                                                             CamelException *ex);

Searches the folder for messages matching the given search expression.

`folder` : | a CamelFolder object
`expr` : | a search expression
`ex` : | a CamelException
Returns : | a GPtrArray of uids of matching messages. The caller must free the list and each of the elements when it is done.

### camel_folder_search_by_uids ()

    GPtrArray*          camel_folder_search_by_uids         (CamelFolder *folder,
                                                             const char *expr,
                                                             GPtrArray *uids,
                                                             CamelException *ex);

Search a subset of uid's for an expression match.

`folder` : | a CamelFolder object
`expr` : | search expression
`uids` : | array of uid's to match against.
`ex` : | a CamelException
Returns : | a GPtrArray of uids of matching messages. The caller must free the list and each of the elements when it is done.

### camel_folder_search_free ()

    void                camel_folder_search_free            (CamelFolder *folder,
                                                             GPtrArray *result);

Free the result of a search as gotten by camel_folder_search or camel_folder_search_by_uids.

`folder` : | a CamelFolder object
`result` : | search results to free

### camel_folder_get_message_info ()

    CamelMessageInfo*   camel_folder_get_message_info       (CamelFolder *folder,
                                                             const char *uid);

Retrieve the CamelMessageInfo for the specified `uid`. This return must be freed using camel_folder_free_message_info.

`folder` : | a CamelFolder object
`uid` : | the uid of a message
Returns : | the summary information for the indicated message, or `NULL` if the uid does not exist

### camel_folder_free_message_info ()

    void                camel_folder_free_message_info      (CamelFolder *folder,
                                                             CamelMessageInfo *info);

Free (unref) a CamelMessageInfo, previously obtained with camel_folder_get_message_info.

`folder` : | a CamelFolder object
`info` : | a CamelMessageInfo

### camel_folder_ref_message_info ()

    void                camel_folder_ref_message_info       (CamelFolder *folder,
                                                             CamelMessageInfo *info);

### Warning

`camel_folder_ref_message_info` is deprecated and should not be used in newly-written code. Use camel_message_info_ref directly.

Ref a CamelMessageInfo, previously obtained with camel_folder_get_message_info.

`folder` : | a CamelFolder object
`info` : | a CamelMessageInfo

### camel_folder_transfer_messages_to ()

    void                camel_folder_transfer_messages_to   (CamelFolder *source,
                                                             GPtrArray *uids,
                                                             CamelFolder *dest,
                                                             GPtrArray **transferred_uids,
                                                             gboolean delete_originals,
                                                             CamelException *ex);

This copies or moves messages from one folder to another. If the `source` and `dest` folders have the same parent_store, this may be more efficient than using camel_folder_append_message.

`source` : | the source CamelFolder object
`uids` : | message UIDs in `source`
`dest` : | the destination CamelFolder object
`transferred_uids` : | if non-`NULL`, the UIDs of the resulting messages in `dest` will be stored here, if known.
`delete_originals` : | whether or not to delete the original messages
`ex` : | a CamelException

### camel_folder_delete ()

    void                camel_folder_delete                 (CamelFolder *folder);

Marks a folder object as deleted and performs any required cleanup.

`folder` : | a CamelFolder object

### camel_folder_rename ()

    void                camel_folder_rename                 (CamelFolder *folder,
                                                             const char *new);

Mark an active folder object as renamed.

NOTE: This is an internal function used by camel stores, no locking is performed on the folder.

`folder` : | a CamelFolder object
`new` : | new name for the folder

### camel_folder_freeze ()

    void                camel_folder_freeze                 (CamelFolder *folder);

Freezes the folder so that a series of operation can be performed without "folder_changed" signals being emitted. When the folder is later thawed with camel_folder_thaw, the suppressed signals will be emitted.

`folder` : | a CamelFolder

### camel_folder_thaw ()

    void                camel_folder_thaw                   (CamelFolder *folder);

Thaws the folder and emits any pending folder_changed signals.

`folder` : | a CamelFolder object

### camel_folder_is_frozen ()

    gboolean            camel_folder_is_frozen              (CamelFolder *folder);

`folder` : | a CamelFolder object
Returns : | whether or not the folder is frozen

### camel_folder_get_quota_info ()

    CamelFolderQuotaInfo* camel_folder_get_quota_info       (CamelFolder *folder);

`folder` : | a CamelFolder object
Returns : | list of known quota(s) for the folder.

### camel_folder_quota_info_new ()

    CamelFolderQuotaInfo* camel_folder_quota_info_new       (const char *name,
                                                             guint64 used,
                                                             guint64 total);

`name` : | Name of the quota.
`used` : | Current usage of the quota.
`total` : | Total available size of the quota.
Returns : | newly allocated CamelFolderQuotaInfo structure with initialized values based on the parameters, with next member set to NULL.

### camel_folder_quota_info_clone ()

    CamelFolderQuotaInfo* camel_folder_quota_info_clone     (const CamelFolderQuotaInfo *info);

Makes a copy of the given info and all next-s.

`info` : | a CamelFolderQuotaInfo object to clone.
Returns : |

### camel_folder_quota_info_free ()

    void                camel_folder_quota_info_free        (CamelFolderQuotaInfo *info);

Frees this and all next objects.

`info` : | a CamelFolderQuotaInfo object to free.

### camel_folder_free_nop ()

    void                camel_folder_free_nop               (CamelFolder *folder,
                                                             GPtrArray *array);

"Frees" the provided array by doing nothing. Used by CamelFolder subclasses as an implementation for free_uids, or free_summary when the returned array is "static" information and should not be freed.

`folder` : | a CamelFolder object
`array` : | an array of uids or CamelMessageInfo

### camel_folder_free_shallow ()

    void                camel_folder_free_shallow           (CamelFolder *folder,
                                                             GPtrArray *array);

Frees the provided array but not its contents. Used by CamelFolder subclasses as an implementation for free_uids or free_summary when the returned array needs to be freed but its contents come from "static" information.

`folder` : | a CamelFolder object
`array` : | an array of uids or CamelMessageInfo

### camel_folder_free_deep ()

    void                camel_folder_free_deep              (CamelFolder *folder,
                                                             GPtrArray *array);

Frees the provided array and its contents. Used by CamelFolder subclasses as an implementation for free_uids when the provided information was created explicitly by the corresponding get_ call.

`folder` : | a CamelFolder object
`array` : | an array of uids

### camel_folder_change_info_new ()

    CamelFolderChangeInfo* camel_folder_change_info_new     (void);

Create a new folder change info structure.

Change info structures are not MT-SAFE and must be locked for exclusive access externally.

Returns : | a new CamelFolderChangeInfo

### camel_folder_change_info_clear ()

    void                camel_folder_change_info_clear      (CamelFolderChangeInfo *info);

Empty out the change info; called after changes have been processed.

`info` : | a CamelFolderChangeInfo

### camel_folder_change_info_free ()

    void                camel_folder_change_info_free       (CamelFolderChangeInfo *info);

Free memory associated with the folder change info lists.

`info` : | a CamelFolderChangeInfo

### camel_folder_change_info_changed ()

    gboolean            camel_folder_change_info_changed    (CamelFolderChangeInfo *info);

Gets whether or not there have been any changes.

`info` : | a CamelFolderChangeInfo
Returns : | %TRUE if the changeset contains any changes or `FALSE` otherwise

### camel_folder_change_info_add_source ()

    void                camel_folder_change_info_add_source (CamelFolderChangeInfo *info,
                                                             const char *uid);

Add a source uid for generating a changeset.

`info` : | a CamelFolderChangeInfo
`uid` : | a uid

### camel_folder_change_info_add_source_list ()

    void                camel_folder_change_info_add_source_list
                                                            (CamelFolderChangeInfo *info,
                                                             const GPtrArray *list);

Add a list of source uid's for generating a changeset.

`info` : | a CamelFolderChangeInfo
`list` : | a list of uids

### camel_folder_change_info_add_update ()

    void                camel_folder_change_info_add_update (CamelFolderChangeInfo *info,
                                                             const char *uid);

Add a uid from the updated list, used to generate a changeset diff.

`info` : | a CamelFolderChangeInfo
`uid` : | a uid

### camel_folder_change_info_add_update_list ()

    void                camel_folder_change_info_add_update_list
                                                            (CamelFolderChangeInfo *info,
                                                             const GPtrArray *list);

Add a list of uid's from the updated list.

`info` : | a CamelFolderChangeInfo
`list` : | a list of uids

### camel_folder_change_info_build_diff ()

    void                camel_folder_change_info_build_diff (CamelFolderChangeInfo *info);

Compare the source uid set to the updated uid set and generate the differences into the added and removed lists.

`info` : | a CamelFolderChangeInfo

### camel_folder_change_info_cat ()

    void                camel_folder_change_info_cat        (CamelFolderChangeInfo *info,
                                                             CamelFolderChangeInfo *src);

Concatenate one change info onto antoher. Can be used to copy them too.

`info` : | a CamelFolderChangeInfo to append to
`src` : | a CamelFolderChangeInfo to append from

### camel_folder_change_info_add_uid ()

    void                camel_folder_change_info_add_uid    (CamelFolderChangeInfo *info,
                                                             const char *uid);

Add a new uid to the changeinfo.

`info` : | a CamelFolderChangeInfo
`uid` : | a uid

### camel_folder_change_info_remove_uid ()

    void                camel_folder_change_info_remove_uid (CamelFolderChangeInfo *info,
                                                             const char *uid);

Add a uid to the removed uid list.

`info` : | a CamelFolderChangeInfo
`uid` : | a uid

### camel_folder_change_info_change_uid ()

    void                camel_folder_change_info_change_uid (CamelFolderChangeInfo *info,
                                                             const char *uid);

Add a uid to the changed uid list.

`info` : | a CamelFolderChangeInfo
`uid` : | a uid

### camel_folder_change_info_recent_uid ()

    void                camel_folder_change_info_recent_uid (CamelFolderChangeInfo *info,
                                                             const char *uid);

Add a recent uid to the changedinfo. This will also add the uid to the uid_filter array for potential filtering

`info` : | a CamelFolderChangeInfo
`uid` : | a uid