## CamelSubscribable CamelSubscribable |

## Functions

gboolean | camel_subscribable_folder_is_subscribed ()
gboolean | camel_subscribable_subscribe_folder_sync ()
void | camel_subscribable_subscribe_folder ()
gboolean | camel_subscribable_subscribe_folder_finish ()
gboolean | camel_subscribable_unsubscribe_folder_sync ()
void | camel_subscribable_unsubscribe_folder ()
gboolean | camel_subscribable_unsubscribe_folder_finish ()
void | camel_subscribable_folder_subscribed ()
void | camel_subscribable_folder_unsubscribed ()

## Signals

void | folder-subscribed | Run First
void | folder-unsubscribed | Run First

## Types and Values

| CamelSubscribable

## Object Hierarchy

        GInterface
        ╰── CamelSubscribable

## Prerequisites

CamelSubscribable requires CamelStore.

## Known Implementations

CamelSubscribable is implemented by CamelIMAPXStore and CamelNNTPStore.

## Description

## Functions

### camel_subscribable_folder_is_subscribed ()

    gboolean
    camel_subscribable_folder_is_subscribed
                                   (CamelSubscribable *subscribable,
                                    const gchar *folder_name);

Find out if a folder has been subscribed to.

#### Parameters

subscribable | a CamelSubscribable |
folder_name | full path of the folder |

#### Returns

`TRUE` if the folder has been subscribed to or `FALSE` otherwise

Since 3.2

### camel_subscribable_subscribe_folder_sync ()

    gboolean
    camel_subscribable_subscribe_folder_sync
                                   (CamelSubscribable *subscribable,
                                    const gchar *folder_name,
                                    GCancellable *cancellable,
                                    GError **error);

Subscribes to the folder described by `folder_name` .

#### Parameters

subscribable | a CamelSubscribable |
folder_name | full path of the folder |
cancellable | optional GCancellable object, or `NULL` |
error | return location for a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` on error

Since 3.2

### camel_subscribable_subscribe_folder ()

    void
    camel_subscribable_subscribe_folder (CamelSubscribable *subscribable,
                                         const gchar *folder_name,
                                         gint io_priority,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Asynchronously subscribes to the folder described by `folder_name` .

When the operation is finished, `callback` will be called. You can then call `camel_subscribable_subscribe_folder_finish()` to get the result of the operation.

#### Parameters

subscribable | a CamelSubscribable |
folder_name | full path of the folder |
io_priority | the I/O priority of the request |
cancellable | optional GCancellable object, or `NULL` |
callback | a GAsyncReadyCallback to call when the request is satisfied |
user_data | data to pass to the callback function |

Since 3.2

### camel_subscribable_subscribe_folder_finish ()

    gboolean
    camel_subscribable_subscribe_folder_finish
                                   (CamelSubscribable *subscribable,
                                    GAsyncResult *result,
                                    GError **error);

Finishes the operation started with `camel_subscribable_subscribe_folder()`.

#### Parameters

subscribable | a CamelSubscribable |
result | a GAsyncResult |
error | return location for a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` on error

Since 3.2

### camel_subscribable_unsubscribe_folder_sync ()

    gboolean
    camel_subscribable_unsubscribe_folder_sync
                                   (CamelSubscribable *subscribable,
                                    const gchar *folder_name,
                                    GCancellable *cancellable,
                                    GError **error);

Unsubscribes from the folder described by `folder_name` .

#### Parameters

subscribable | a CamelSubscribable |
folder_name | full path of the folder |
cancellable | optional GCancellable object, or `NULL` |
error | return location for a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` on error

Since 3.2

### camel_subscribable_unsubscribe_folder ()

    void
    camel_subscribable_unsubscribe_folder (CamelSubscribable *subscribable,
                                           const gchar *folder_name,
                                           gint io_priority,
                                           GCancellable *cancellable,
                                           GAsyncReadyCallback callback,
                                           gpointer user_data);

Asynchronously unsubscribes from the folder described by `folder_name` .

When the operation is finished, `callback` will be called. You can then call `camel_subscribable_unsubscribe_folder_finish()` to get the result of the operation.

#### Parameters

subscribable | a CamelSubscribable |
folder_name | full path of the folder |
io_priority | the I/O priority of the request |
cancellable | optional GCancellable object, or `NULL` |
callback | a GAsyncReadyCallback to call when the request is satisfied |
user_data | data to pass to the callback function |

Since 3.2

### camel_subscribable_unsubscribe_folder_finish ()

    gboolean
    camel_subscribable_unsubscribe_folder_finish
                                   (CamelSubscribable *subscribable,
                                    GAsyncResult *result,
                                    GError **error);

Finishes the operation started with `camel_subscribable_unsubscribe_folder()`.

#### Parameters

subscribable | a CamelSubscribable |
result | a GAsyncResult |
error | return location for a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` on error

Since 3.2

### camel_subscribable_folder_subscribed ()

    void
    camel_subscribable_folder_subscribed (CamelSubscribable *subscribable,
                                          CamelFolderInfo *folder_info);

Emits the “folder-subscribed” signal from an idle source on the main loop. The idle source's priority is G_PRIORITY_HIGH_IDLE.

This function is only intended for Camel providers.

#### Parameters

subscribable | a CamelSubscribable |
folder_info | information about the subscribed folder |

Since 3.2

### camel_subscribable_folder_unsubscribed ()

    void
    camel_subscribable_folder_unsubscribed
                                   (CamelSubscribable *subscribable,
                                    CamelFolderInfo *folder_info);

Emits the “folder-unsubscribed” signal from an idle source on the main loop. The idle source's priority is G_PRIORITY_HIGH_IDLE.

This function is only intended for Camel providers.

#### Parameters

subscribable | a CamelSubscribable |
folder_info | information about the unsubscribed folder |

Since 3.2

## Types and Values

### CamelSubscribable

    typedef struct _CamelSubscribable CamelSubscribable;

Since 3.2

## Signal Details

### The `“folder-subscribed”` signal

    void
    user_function (CamelSubscribable *camelsubscribable,
                   gpointer           arg1,
                   gpointer           user_data)

Flags: Run First

### The `“folder-unsubscribed”` signal

    void
    user_function (CamelSubscribable *camelsubscribable,
                   gpointer           arg1,
                   gpointer           user_data)

Flags: Run First