![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
struct CamelIMAPXServer; CamelIMAPXServer * camel_imapx_server_new (struct _CamelIMAPXStore *store
); struct _CamelIMAPXStore * camel_imapx_server_ref_store (CamelIMAPXServer *is
); struct _CamelIMAPXSettings * camel_imapx_server_ref_settings (CamelIMAPXServer *is
); GInputStream * camel_imapx_server_ref_input_stream (CamelIMAPXServer *is
); GOutputStream * camel_imapx_server_ref_output_stream (CamelIMAPXServer *is
); CamelIMAPXNamespaceResponse * camel_imapx_server_ref_namespaces (CamelIMAPXServer *is
); CamelIMAPXMailbox * camel_imapx_server_ref_mailbox (CamelIMAPXServer *is
,const gchar *mailbox_name
); CamelIMAPXMailbox * camel_imapx_server_ref_selected (CamelIMAPXServer *is
); GList * camel_imapx_server_list_mailboxes (CamelIMAPXServer *is
,CamelIMAPXNamespace *namespace_
,const gchar *pattern
); gboolean camel_imapx_server_connect (CamelIMAPXServer *is
,GCancellable *cancellable
,GError **error
); CamelAuthenticationResult camel_imapx_server_authenticate (CamelIMAPXServer *is
,const gchar *mechanism
,GCancellable *cancellable
,GError **error
); void camel_imapx_server_shutdown (CamelIMAPXServer *is
); gboolean camel_imapx_server_list (CamelIMAPXServer *is
,const gchar *pattern
,CamelStoreGetFolderInfoFlags flags
,GCancellable *cancellable
,GError **error
); CamelFolderChangeInfo * camel_imapx_server_refresh_info (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_sync_changes (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_expunge (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_noop (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
); CamelStream * camel_imapx_server_get_message (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,CamelFolderSummary *summary
,CamelDataCache *message_cache
,const gchar *message_uid
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_copy_message (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,CamelIMAPXMailbox *destination
,GPtrArray *uids
,gboolean delete_originals
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_append_message (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,CamelFolderSummary *summary
,CamelDataCache *message_cache
,CamelMimeMessage *message
,const CamelMessageInfo *mi
,gchar **append_uid
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_sync_message (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,CamelFolderSummary *summary
,CamelDataCache *message_cache
,const gchar *message_uid
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_create_mailbox (CamelIMAPXServer *is
,const gchar *mailbox_name
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_delete_mailbox (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_rename_mailbox (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,const gchar *new_mailbox_name
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_subscribe_mailbox (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_unsubscribe_mailbox (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
); gboolean camel_imapx_server_update_quota_info (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
); GPtrArray * camel_imapx_server_uid_search (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,const gchar *criteria
,GCancellable *cancellable
,GError **error
); struct CamelIMAPXUntaggedRespHandlerDesc; const CamelIMAPXUntaggedRespHandlerDesc * camel_imapx_server_register_untagged_handler (CamelIMAPXServer *is
,const gchar *untagged_response
,const CamelIMAPXUntaggedRespHandlerDesc *desc
);
"namespaces" CamelIMAPXNamespaceResponse* : Read "store" CamelIMAPXStore* : Read / Write / Construct Only
"mailbox-closed" :Run Last
"mailbox-created" :Run First
"mailbox-renamed" :Run First
"mailbox-select" :Run Last
"mailbox-updated" :Run First
CamelIMAPXServer * camel_imapx_server_new (struct _CamelIMAPXStore *store
);
struct _CamelIMAPXStore * camel_imapx_server_ref_store (CamelIMAPXServer *is
);
struct _CamelIMAPXSettings * camel_imapx_server_ref_settings
(CamelIMAPXServer *is
);
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.
|
a CamelIMAPXServer |
Returns : |
a GInputStream, or NULL
|
Since 3.12
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.
|
a CamelIMAPXServer |
Returns : |
a GOutputStream, or NULL
|
Since 3.12
CamelIMAPXNamespaceResponse * camel_imapx_server_ref_namespaces
(CamelIMAPXServer *is
);
Returns the CamelIMAPXNamespaceResponse for is
. This is obtained
during the connection phase if the IMAP server lists the "NAMESPACE"
keyword in its CAPABILITY response, or else is fabricated from the
first LIST response.
The returned CamelIMAPXNamespaceResponse is reference for thread-safety
and must be unreferenced with g_object_unref()
when finished with it.
|
a CamelIMAPXServer |
Returns : |
a CamelIMAPXNamespaceResponse |
Since 3.12
CamelIMAPXMailbox * camel_imapx_server_ref_mailbox (CamelIMAPXServer *is
,const gchar *mailbox_name
);
Looks up a CamelMailbox by its name. If no match is found, the function
returns NULL
.
The returned CamelIMAPXMailbox is referenced for thread-safety and
should be unreferenced with g_object_unref()
when finished with it.
|
a CamelIMAPXServer |
|
a mailbox name |
Returns : |
a CamelIMAPXMailbox, or NULL
|
Since 3.12
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.
|
a CamelIMAPXServer |
Returns : |
a CamelIMAPXMailbox, or NULL
|
Since 3.12
GList * camel_imapx_server_list_mailboxes (CamelIMAPXServer *is
,CamelIMAPXNamespace *namespace_
,const gchar *pattern
);
Returns a list of CamelIMAPXMailbox instances which match namespace
and
pattern
. The pattern
may contain wildcard characters '*' and '%', which
are interpreted similar to the IMAP LIST command. A NULL
pattern
lists
all mailboxes in namespace
; equivalent to passing "*".
The mailboxes returned in the list are referenced for thread-safety.
They must each be unreferenced with g_object_unref()
when finished with
them. Free the returned list itself with g_list_free()
.
An easy way to free the list properly in one step is as follows:
1 |
g_list_free_full (list, g_object_unref); |
|
a CamelIMAPXServer |
|
a CamelIMAPXNamespace |
|
mailbox name with possible wildcards, or NULL
|
Returns : |
a list of CamelIMAPXMailbox instances |
Since 3.12
gboolean camel_imapx_server_connect (CamelIMAPXServer *is
,GCancellable *cancellable
,GError **error
);
CamelAuthenticationResult camel_imapx_server_authenticate (CamelIMAPXServer *is
,const gchar *mechanism
,GCancellable *cancellable
,GError **error
);
void camel_imapx_server_shutdown (CamelIMAPXServer *is
);
Signals the server to shut down command processing. CamelIMAPXStore should call this immediately before unreferencing its server instance. Note, the server instance may linger a short time after this function
|
a CamelIMAPXServer |
Returns : |
as its own worker threads finish. |
Since 3.12
gboolean camel_imapx_server_list (CamelIMAPXServer *is
,const gchar *pattern
,CamelStoreGetFolderInfoFlags flags
,GCancellable *cancellable
,GError **error
);
CamelFolderChangeInfo * camel_imapx_server_refresh_info (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_sync_changes (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_expunge (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_noop (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
);
CamelStream * camel_imapx_server_get_message (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,CamelFolderSummary *summary
,CamelDataCache *message_cache
,const gchar *message_uid
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_copy_message (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,CamelIMAPXMailbox *destination
,GPtrArray *uids
,gboolean delete_originals
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_append_message (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,CamelFolderSummary *summary
,CamelDataCache *message_cache
,CamelMimeMessage *message
,const CamelMessageInfo *mi
,gchar **append_uid
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_sync_message (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,CamelFolderSummary *summary
,CamelDataCache *message_cache
,const gchar *message_uid
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_create_mailbox (CamelIMAPXServer *is
,const gchar *mailbox_name
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_delete_mailbox (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_rename_mailbox (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,const gchar *new_mailbox_name
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_subscribe_mailbox (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_unsubscribe_mailbox (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
);
gboolean camel_imapx_server_update_quota_info (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,GCancellable *cancellable
,GError **error
);
GPtrArray * camel_imapx_server_uid_search (CamelIMAPXServer *is
,CamelIMAPXMailbox *mailbox
,const gchar *criteria
,GCancellable *cancellable
,GError **error
);
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
a string representation of the IMAP untagged response code. Must be all-uppercase with underscores allowed (see RFC 3501) | |
an untagged response handler function for CamelIMAPXServer | |
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 |
|
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
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
|
a CamelIMAPXServer instance |
|
a string representation of the IMAP untagged response code. Must be all-uppercase with underscores allowed (see RFC 3501) |
|
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
"store"
property"store" CamelIMAPXStore* : Read / Write / Construct Only
IMAPX store for this server.
"mailbox-closed"
signalvoid user_function (CamelIMAPXServer *camelimapxserver,
CamelIMAPXMailbox *arg1,
gpointer user_data) : Run Last
"mailbox-created"
signalvoid user_function (CamelIMAPXServer *camelimapxserver,
CamelIMAPXMailbox *arg1,
gpointer user_data) : Run First
"mailbox-renamed"
signalvoid user_function (CamelIMAPXServer *camelimapxserver,
CamelIMAPXMailbox *arg1,
gchar *arg2,
gpointer user_data) : Run First
"mailbox-select"
signalvoid user_function (CamelIMAPXServer *camelimapxserver,
CamelIMAPXMailbox *arg1,
gpointer user_data) : Run Last
"mailbox-updated"
signalvoid user_function (CamelIMAPXServer *camelimapxserver,
CamelIMAPXMailbox *arg1,
gpointer user_data) : Run First