CamelDiscoFolder
3
CAMEL Library

# CamelDiscoFolder

## Synopsis

    struct              CamelDiscoFolder;
    void                camel_disco_folder_expunge_uids     (CamelFolder *folder,
                                                             GPtrArray *uids,
                                                             CamelException *ex);
    void                camel_disco_folder_cache_message    (CamelDiscoFolder *disco_folder,
                                                             const char *uid,
                                                             CamelException *ex);
    void                camel_disco_folder_prepare_for_offline
                                                            (CamelDiscoFolder *disco_folder,
                                                             const char *expression,
                                                             CamelException *ex);

## Description

## Details

### struct CamelDiscoFolder

    struct CamelDiscoFolder {
    	CamelFolder parent_object;

    	unsigned int offline_sync:1;
    };

### camel_disco_folder_expunge_uids ()

    void                camel_disco_folder_expunge_uids     (CamelFolder *folder,
                                                             GPtrArray *uids,
                                                             CamelException *ex);

This expunges the messages in `uids` from `folder`. It should take whatever steps are needed to avoid expunging any other messages, although in some cases it may not be possible to avoid expunging messages that are marked deleted by another client at the same time as the expunge_uids call is running.

`folder` :

  a (disconnectable) folder

`uids` :

  array of UIDs to expunge

`ex` :

  a CamelException

### camel_disco_folder_cache_message ()

    void                camel_disco_folder_cache_message    (CamelDiscoFolder *disco_folder,
                                                             const char *uid,
                                                             CamelException *ex);

Requests that `disco_folder` cache message `uid` to disk.

`disco_folder` :

  the folder

`uid` :

  the UID of the message to cache

`ex` :

  a CamelException

### camel_disco_folder_prepare_for_offline ()

    void                camel_disco_folder_prepare_for_offline
                                                            (CamelDiscoFolder *disco_folder,
                                                             const char *expression,
                                                             CamelException *ex);

This prepares `disco_folder` for offline operation, by downloading the bodies of all messages described by `expression` (using the same syntax as `camel_folder_search_by_expression()` ).

`disco_folder` :

  the folder

`expression` :

  an expression describing messages to synchronize, or `NULL` if all messages should be sync'ed.

`ex` :

  a CamelException