CamelIMAPXServer

CamelIMAPXServer

Functions

GQuark camel_imapx_server_error_quark ()
typedef gboolean ()
CamelIMAPXServer * camel_imapx_server_new ()
struct _CamelIMAPXStore * camel_imapx_server_ref_store ()
struct _CamelIMAPXSettings * camel_imapx_server_ref_settings ()
GInputStream * camel_imapx_server_ref_input_stream ()
GOutputStream * camel_imapx_server_ref_output_stream ()
CamelIMAPXMailbox * camel_imapx_server_ref_selected ()
CamelIMAPXMailbox * camel_imapx_server_ref_pending_or_selected ()
const struct _capability_info * camel_imapx_server_get_capability_info ()
gboolean camel_imapx_server_have_capability ()
gboolean camel_imapx_server_lack_capability ()
gchar camel_imapx_server_get_tagprefix ()
void camel_imapx_server_set_tagprefix ()
CamelIMAPXCommand * camel_imapx_server_ref_current_command ()
gboolean camel_imapx_server_connect_sync ()
gboolean camel_imapx_server_disconnect_sync ()
gboolean camel_imapx_server_is_connected ()
CamelAuthenticationResult camel_imapx_server_authenticate_sync ()
gboolean camel_imapx_server_query_auth_types_sync ()
gboolean camel_imapx_server_mailbox_selected ()
gboolean camel_imapx_server_ensure_selected_sync ()
gboolean camel_imapx_server_process_command_sync ()
gboolean camel_imapx_server_list_sync ()
gboolean camel_imapx_server_refresh_info_sync ()
gboolean camel_imapx_server_sync_changes_sync ()
gboolean camel_imapx_server_expunge_sync ()
gboolean camel_imapx_server_noop_sync ()
CamelStream * camel_imapx_server_get_message_sync ()
gboolean camel_imapx_server_copy_message_sync ()
gboolean camel_imapx_server_append_message_sync ()
gboolean camel_imapx_server_sync_message_sync ()
gboolean camel_imapx_server_create_mailbox_sync ()
gboolean camel_imapx_server_delete_mailbox_sync ()
gboolean camel_imapx_server_rename_mailbox_sync ()
gboolean camel_imapx_server_subscribe_mailbox_sync ()
gboolean camel_imapx_server_unsubscribe_mailbox_sync ()
gboolean camel_imapx_server_update_quota_info_sync ()
GPtrArray * camel_imapx_server_uid_search_sync ()
gboolean camel_imapx_server_can_use_idle ()
gboolean camel_imapx_server_is_in_idle ()
CamelIMAPXMailbox * camel_imapx_server_ref_idle_mailbox ()
gboolean camel_imapx_server_schedule_idle_sync ()
gboolean camel_imapx_server_stop_idle_sync ()
const CamelIMAPXUntaggedRespHandlerDesc * camel_imapx_server_register_untagged_handler ()

Properties

CamelIMAPXStore * store Read / Write / Construct Only

Signals

Object Hierarchy

    GObject
    ╰── CamelIMAPXServer

Description

Functions

camel_imapx_server_error_quark ()

GQuark
camel_imapx_server_error_quark (void);

gboolean ()

typedef
gboolean ();

camel_imapx_server_new ()

CamelIMAPXServer *
camel_imapx_server_new (struct _CamelIMAPXStore *store);

camel_imapx_server_ref_store ()

struct _CamelIMAPXStore *
camel_imapx_server_ref_store (CamelIMAPXServer *is);

camel_imapx_server_ref_settings ()

struct _CamelIMAPXSettings *
camel_imapx_server_ref_settings (CamelIMAPXServer *is);

camel_imapx_server_ref_input_stream ()

GInputStream *
camel_imapx_server_ref_input_stream (CamelIMAPXServer *is);

Returns the GInputStream for is , which is owned by either a GTcpConnection or a GSubprocess. If the CamelIMAPXServer is not yet connected or has lost its connection, the function returns NULL.

The returned GInputStream is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

Parameters

Returns

a GInputStream, or NULL

Since: 3.12


camel_imapx_server_ref_output_stream ()

GOutputStream *
camel_imapx_server_ref_output_stream (CamelIMAPXServer *is);

Returns the GOutputStream for is , which is owned by either a GTcpConnection or a GSubprocess. If the CamelIMAPXServer is not yet connected or has lost its connection, the function returns NULL.

The returned GOutputStream is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.

Parameters

Returns

a GOutputStream, or NULL

Since: 3.12


camel_imapx_server_ref_selected ()

CamelIMAPXMailbox *
camel_imapx_server_ref_selected (CamelIMAPXServer *is);

Returns the CamelIMAPXMailbox representing the currently selected mailbox (or mailbox being selected if a SELECT command is in progress) on the IMAP server, or NULL if no mailbox is currently selected or being selected on the server.

The returned CamelIMAPXMailbox is reference for thread-safety and should be unreferenced with g_object_unref() when finished with it.

Parameters

Returns

a CamelIMAPXMailbox, or NULL

Since: 3.12


camel_imapx_server_ref_pending_or_selected ()

CamelIMAPXMailbox *
camel_imapx_server_ref_pending_or_selected
                               (CamelIMAPXServer *is);

camel_imapx_server_get_capability_info ()

const struct _capability_info *
camel_imapx_server_get_capability_info
                               (CamelIMAPXServer *is);

camel_imapx_server_have_capability ()

gboolean
camel_imapx_server_have_capability (CamelIMAPXServer *is,
                                    guint32 capability);

camel_imapx_server_lack_capability ()

gboolean
camel_imapx_server_lack_capability (CamelIMAPXServer *is,
                                    guint32 capability);

camel_imapx_server_get_tagprefix ()

gchar
camel_imapx_server_get_tagprefix (CamelIMAPXServer *is);

camel_imapx_server_set_tagprefix ()

void
camel_imapx_server_set_tagprefix (CamelIMAPXServer *is,
                                  gchar tagprefix);

camel_imapx_server_ref_current_command ()

CamelIMAPXCommand *
camel_imapx_server_ref_current_command
                               (CamelIMAPXServer *is);

camel_imapx_server_connect_sync ()

gboolean
camel_imapx_server_connect_sync (CamelIMAPXServer *is,
                                 GCancellable *cancellable,
                                 GError **error);

camel_imapx_server_disconnect_sync ()

gboolean
camel_imapx_server_disconnect_sync (CamelIMAPXServer *is,
                                    GCancellable *cancellable,
                                    GError **error);

camel_imapx_server_is_connected ()

gboolean
camel_imapx_server_is_connected (CamelIMAPXServer *imapx_server);

camel_imapx_server_authenticate_sync ()

CamelAuthenticationResult
camel_imapx_server_authenticate_sync (CamelIMAPXServer *is,
                                      const gchar *mechanism,
                                      GCancellable *cancellable,
                                      GError **error);

camel_imapx_server_query_auth_types_sync ()

gboolean
camel_imapx_server_query_auth_types_sync
                               (CamelIMAPXServer *is,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_mailbox_selected ()

gboolean
camel_imapx_server_mailbox_selected (CamelIMAPXServer *is,
                                     CamelIMAPXMailbox *mailbox);

camel_imapx_server_ensure_selected_sync ()

gboolean
camel_imapx_server_ensure_selected_sync
                               (CamelIMAPXServer *is,
                                CamelIMAPXMailbox *mailbox,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_process_command_sync ()

gboolean
camel_imapx_server_process_command_sync
                               (CamelIMAPXServer *is,
                                CamelIMAPXCommand *ic,
                                const gchar *error_prefix,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_list_sync ()

gboolean
camel_imapx_server_list_sync (CamelIMAPXServer *is,
                              const gchar *pattern,
                              CamelStoreGetFolderInfoFlags flags,
                              GCancellable *cancellable,
                              GError **error);

camel_imapx_server_refresh_info_sync ()

gboolean
camel_imapx_server_refresh_info_sync (CamelIMAPXServer *is,
                                      CamelIMAPXMailbox *mailbox,
                                      GCancellable *cancellable,
                                      GError **error);

camel_imapx_server_sync_changes_sync ()

gboolean
camel_imapx_server_sync_changes_sync (CamelIMAPXServer *is,
                                      CamelIMAPXMailbox *mailbox,
                                      gboolean can_influence_flags,
                                      GCancellable *cancellable,
                                      GError **error);

camel_imapx_server_expunge_sync ()

gboolean
camel_imapx_server_expunge_sync (CamelIMAPXServer *is,
                                 CamelIMAPXMailbox *mailbox,
                                 GCancellable *cancellable,
                                 GError **error);

camel_imapx_server_noop_sync ()

gboolean
camel_imapx_server_noop_sync (CamelIMAPXServer *is,
                              CamelIMAPXMailbox *mailbox,
                              GCancellable *cancellable,
                              GError **error);

camel_imapx_server_get_message_sync ()

CamelStream *
camel_imapx_server_get_message_sync (CamelIMAPXServer *is,
                                     CamelIMAPXMailbox *mailbox,
                                     CamelFolderSummary *summary,
                                     CamelDataCache *message_cache,
                                     const gchar *message_uid,
                                     GCancellable *cancellable,
                                     GError **error);

camel_imapx_server_copy_message_sync ()

gboolean
camel_imapx_server_copy_message_sync (CamelIMAPXServer *is,
                                      CamelIMAPXMailbox *mailbox,
                                      CamelIMAPXMailbox *destination,
                                      GPtrArray *uids,
                                      gboolean delete_originals,
                                      gboolean remove_deleted_flags,
                                      GCancellable *cancellable,
                                      GError **error);

camel_imapx_server_append_message_sync ()

gboolean
camel_imapx_server_append_message_sync
                               (CamelIMAPXServer *is,
                                CamelIMAPXMailbox *mailbox,
                                CamelFolderSummary *summary,
                                CamelDataCache *message_cache,
                                CamelMimeMessage *message,
                                const CamelMessageInfo *mi,
                                gchar **append_uid,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_sync_message_sync ()

gboolean
camel_imapx_server_sync_message_sync (CamelIMAPXServer *is,
                                      CamelIMAPXMailbox *mailbox,
                                      CamelFolderSummary *summary,
                                      CamelDataCache *message_cache,
                                      const gchar *message_uid,
                                      GCancellable *cancellable,
                                      GError **error);

camel_imapx_server_create_mailbox_sync ()

gboolean
camel_imapx_server_create_mailbox_sync
                               (CamelIMAPXServer *is,
                                const gchar *mailbox_name,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_delete_mailbox_sync ()

gboolean
camel_imapx_server_delete_mailbox_sync
                               (CamelIMAPXServer *is,
                                CamelIMAPXMailbox *mailbox,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_rename_mailbox_sync ()

gboolean
camel_imapx_server_rename_mailbox_sync
                               (CamelIMAPXServer *is,
                                CamelIMAPXMailbox *mailbox,
                                const gchar *new_mailbox_name,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_subscribe_mailbox_sync ()

gboolean
camel_imapx_server_subscribe_mailbox_sync
                               (CamelIMAPXServer *is,
                                CamelIMAPXMailbox *mailbox,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_unsubscribe_mailbox_sync ()

gboolean
camel_imapx_server_unsubscribe_mailbox_sync
                               (CamelIMAPXServer *is,
                                CamelIMAPXMailbox *mailbox,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_update_quota_info_sync ()

gboolean
camel_imapx_server_update_quota_info_sync
                               (CamelIMAPXServer *is,
                                CamelIMAPXMailbox *mailbox,
                                GCancellable *cancellable,
                                GError **error);

camel_imapx_server_uid_search_sync ()

GPtrArray *
camel_imapx_server_uid_search_sync (CamelIMAPXServer *is,
                                    CamelIMAPXMailbox *mailbox,
                                    const gchar *criteria_prefix,
                                    const gchar *search_key,
                                    const gchar * const *words,
                                    GCancellable *cancellable,
                                    GError **error);

camel_imapx_server_can_use_idle ()

gboolean
camel_imapx_server_can_use_idle (CamelIMAPXServer *is);

camel_imapx_server_is_in_idle ()

gboolean
camel_imapx_server_is_in_idle (CamelIMAPXServer *is);

camel_imapx_server_ref_idle_mailbox ()

CamelIMAPXMailbox *
camel_imapx_server_ref_idle_mailbox (CamelIMAPXServer *is);

camel_imapx_server_schedule_idle_sync ()

gboolean
camel_imapx_server_schedule_idle_sync (CamelIMAPXServer *is,
                                       CamelIMAPXMailbox *mailbox,
                                       GCancellable *cancellable,
                                       GError **error);

camel_imapx_server_stop_idle_sync ()

gboolean
camel_imapx_server_stop_idle_sync (CamelIMAPXServer *is,
                                   GCancellable *cancellable,
                                   GError **error);

camel_imapx_server_register_untagged_handler ()

const CamelIMAPXUntaggedRespHandlerDesc *
camel_imapx_server_register_untagged_handler
                               (CamelIMAPXServer *is,
                                const gchar *untagged_response,
                                const CamelIMAPXUntaggedRespHandlerDesc *desc);

Register a new handler function for IMAP untagged responses. Pass in a NULL descriptor to delete an existing handler (the untagged response will remain known, but will no longer be acted upon if the handler is deleted). The return value is intended to be used in cases where e.g. an extension to existing handler code is implemented with just some new code to be run before or after the original handler code

Parameters

is

a CamelIMAPXServer instance

 

untagged_response

a string representation of the IMAP untagged response code. Must be all-uppercase with underscores allowed (see RFC 3501)

 

desc

a CamelIMAPXUntaggedRespHandlerDesc handler description structure. The descriptor structure is expected to remain stable over the lifetime of the CamelIMAPXServer instance it was registered with. It is the responsibility of the caller to ensure this

 

Returns

the CamelIMAPXUntaggedRespHandlerDesc previously registered for this untagged response, if any, NULL otherwise.

Since: 3.6

Types and Values

CAMEL_IMAPX_SERVER_ERROR

#define CAMEL_IMAPX_SERVER_ERROR (camel_imapx_server_error_quark ())

enum CamelIMAPXServerError

Members

CAMEL_IMAPX_SERVER_ERROR_CONCURRENT_CONNECT_FAILED

   

CAMEL_IMAPX_SERVER_ERROR_TRY_RECONNECT

   

struct CamelIMAPXUntaggedRespHandlerDesc

struct CamelIMAPXUntaggedRespHandlerDesc {
	const gchar *untagged_response;
	const CamelIMAPXUntaggedRespHandler handler;
	const gchar *next_response;
	gboolean skip_stream_when_done;
};

IMAP untagged response handler function descriptor. Use in conjunction with camel_imapx_server_register_untagged_handler() to register a new handler function for a given untagged response code

Members

const gchar *untagged_response;

a string representation of the IMAP untagged response code. Must be all-uppercase with underscores allowed (see RFC 3501)

 

const CamelIMAPXUntaggedRespHandler handler;

an untagged response handler function for CamelIMAPXServer

 

const gchar *next_response;

the IMAP untagged code to call a registered handler for directly after successfully running handler . If not NULL, skip_stream_when_done for the current handler has no effect

 

gboolean skip_stream_when_done;

whether or not to skip the current IMAP untagged response in the GInputStream. Set to TRUE if your handler does not eat the stream up to the next response token

 

Since: 3.6

Property Details

The “store” property

  “store”                    CamelIMAPXStore *

IMAPX store for this server.

Flags: Read / Write / Construct Only

Signal Details

The “refresh-mailbox” signal

void
user_function (CamelIMAPXServer  *camelimapxserver,
               CamelIMAPXMailbox *arg1,
               gpointer           user_data)

Flags: Run Last