![]() |
![]() |
![]() |
Reference Manual of the tinymail framework | ![]() |
---|---|---|---|---|
#define tny_debug #define TNY_PRIORITY_LOWER_THAN_GTK_REDRAWS TnyStatus; TnyAccountStore; TnyAccountStoreIface; TnyList; TnyIterator; TnyListIface; TnyIteratorIface; TnyMsg; TnyMsgIface; TnyFolder; TnyFolderIface; TnyHeader; TnyHeaderIface; TnyMimePart; TnyMimePartIface; TnyAccount; TnyAccountIface; TnyDevice; TnyDeviceIface; TnyStoreAccount; TnyStoreAccountIface; TnyTransportAccount; TnyTransportAccountIface; TnyStream; TnyStreamIface; TnySimpleList; TnySimpleListClass; TnyFsStream; TnyFsStreamClass; TnyFolderStore; TnyFolderStoreIface; TnyFolderStoreQuery; TnyFolderStoreQueryClass; TnyFolderStoreQueryItem; TnyFolderStoreQueryItemClass; TnyMsgRemoveStrategy; TnyMsgRemoveStrategyIface; TnySendQueue; TnySendQueueIface; TnyMsgReceiveStrategy; TnyMsgReceiveStrategyIface; TnyPair; TnyPairClass; TnyLockable; TnyLockableIface; TnyNoopLockable; TnyNoopLockableClass; TnyFolderObserver; TnyFolderObserverIface; TnyFolderChange; TnyFolderChangeClass; TnyFolderMonitor; TnyFolderMonitorClass; TnyFolderStoreChange; TnyFolderStoreChangeClass; TnyFolderStoreObserver; TnyFolderStoreObserverIface; TnyFolderStats; TnyFolderStatsClass; TnyPasswordGetter; TnyPasswordGetterIface; TnyCombinedAccount; TnyCombinedAccountClass; TnyConnectionPolicy; TnyConnectionPolicyIface; gchar* (*TnyGetPassFunc) (TnyAccount *self, const gchar *prompt, gboolean *cancel); void (*TnyForgetPassFunc) (TnyAccount *self); void (*TnyFolderCallback) (TnyFolder *self, gboolean cancelled, GError *err, gpointer user_data); void (*TnyCreateFolderCallback) (TnyFolderStore *self, gboolean cancelled, TnyFolder *new_folder, GError *err, gpointer user_data); void (*TnyMimePartCallback) (TnyMimePart *self, gboolean cancelled, TnyStream *stream, GError *err, gpointer user_data); void (*TnyGetHeadersCallback) (TnyFolder *self, gboolean cancelled, TnyList *headers, GError *err, gpointer user_data); void (*TnyGetMsgCallback) (TnyFolder *folder, gboolean cancelled, TnyMsg *msg, GError *err, gpointer user_data); void (*TnyTransferMsgsCallback) (TnyFolder *folder, gboolean cancelled, GError *err, gpointer user_data); void (*TnyStatusCallback) (GObject *self, TnyStatus *status, gpointer user_data); void (*TnyGetFoldersCallback) (TnyFolderStore *self, gboolean cancelled, TnyList *list, GError *err, gpointer user_data); void (*TnyCopyFolderCallback) (TnyFolder *self, gboolean cancelled, TnyFolderStore *into, TnyFolder *new_folder, GError *err, gpointer user_data); void (*TnySendQueueAddCallback) (TnySendQueue *self, gboolean cancelled, TnyMsg *msg, GError *err, gpointer user_data);
GInterface +----TnyAccountStore
GInterface +----TnyList
GInterface +----TnyIterator
GInterface +----TnyMsg
GInterface +----TnyFolder
GInterface +----TnyHeader
GInterface +----TnyMimePart
GInterface +----TnyAccount
GInterface +----TnyDevice
GInterface +----TnyStoreAccount
GInterface +----TnyTransportAccount
GInterface +----TnyStream
GObject +----TnySimpleList
GObject +----TnyFsStream
GInterface +----TnyFolderStore
GObject +----TnyFolderStoreQuery
GObject +----TnyFolderStoreQueryItem
GInterface +----TnyMsgRemoveStrategy
GInterface +----TnySendQueue
GInterface +----TnyMsgReceiveStrategy
GObject +----TnyPair
GInterface +----TnyLockable
GObject +----TnyNoopLockable
GInterface +----TnyFolderObserver
GObject +----TnyFolderChange
GObject +----TnyFolderMonitor
GObject +----TnyFolderStoreChange
GInterface +----TnyFolderStoreObserver
GObject +----TnyFolderStats
GInterface +----TnyPasswordGetter
GObject +----TnyCombinedAccount
GInterface +----TnyConnectionPolicy
TnyAccountStore requires GObject.
TnyMsg requires TnyMimePart and GObject.
TnyFolder requires GObject.
TnyHeader requires GObject.
TnyAccount requires GObject.
TnyDevice requires GObject.
TnyStoreAccount requires TnyFolderStore, TnyAccount and GObject.
TnyTransportAccount requires TnyAccount and GObject.
TnySendQueue requires GObject.
TnyMimePart is required by TnyMsg.
TnyAccount is required by TnyStoreAccount and TnyTransportAccount.
TnyFolderStore is required by TnyStoreAccount.
TnySimpleList implements TnyList.
TnyFsStream implements TnyStream and TnySeekable.
TnyNoopLockable implements TnyLockable.
TnyFolderMonitor implements TnyFolderObserver.
TnyCombinedAccount implements TnyFolderStore, TnyAccount, TnyStoreAccount and TnyTransportAccount.
TnyList is implemented by TnySimpleList, TnyGtkHeaderListModel, TnyGtkFolderStoreTreeModel, TnyGtkAccountListModel and TnyGtkAttachListModel.
TnyMsg is implemented by TnyCamelBsMsg and TnyCamelMsg.
TnyFolder is implemented by TnyCamelFolder, TnyCamelIMAPFolder, TnyCamelNNTPFolder, TnyCamelPOPFolder and TnyMergeFolder.
TnyHeader is implemented by TnyCamelHeader, TnyCamelBsMsgHeader and TnyCamelMsgHeader.
TnyMimePart is implemented by TnyCamelMimePart, TnyCamelBsMsg, TnyCamelMsg and TnyCamelBsMimePart.
TnyAccount is implemented by TnyCamelAccount, TnyCamelNNTPStoreAccount, TnyCamelIMAPStoreAccount, TnyCamelStoreAccount, TnyCamelTransportAccount, TnyCombinedAccount and TnyCamelPOPStoreAccount.
TnyStoreAccount is implemented by TnyCamelNNTPStoreAccount, TnyCamelIMAPStoreAccount, TnyCamelStoreAccount, TnyCombinedAccount and TnyCamelPOPStoreAccount.
TnyTransportAccount is implemented by TnyCamelTransportAccount and TnyCombinedAccount.
TnyStream is implemented by TnyCamelStream, TnyFsStream, TnyMozEmbedStream, TnyCamelMemStream, TnyVfsStream, TnyGtkPixbufStream and TnyGtkTextBufferStream.
TnyFolderStore is implemented by TnyCamelFolder, TnyCamelNNTPStoreAccount, TnyCamelIMAPStoreAccount, TnyCamelIMAPFolder, TnyCamelStoreAccount, TnyCamelNNTPFolder, TnyCombinedAccount, TnyCamelPOPFolder and TnyCamelPOPStoreAccount.
TnyMsgRemoveStrategy is implemented by TnyCamelPopRemoteMsgRemoveStrategy and TnyCamelMsgRemoveStrategy.
TnySendQueue is implemented by TnyCamelSendQueue.
TnyMsgReceiveStrategy is implemented by TnyCamelFullMsgReceiveStrategy, TnyCamelPartialMsgReceiveStrategy and TnyCamelBsMsgReceiveStrategy.
TnyLockable is implemented by TnyNoopLockable and TnyGtkLockable.
TnyFolderObserver is implemented by TnyGtkFolderStoreTreeModel, TnyCamelSendQueue, TnyMergeFolder and TnyFolderMonitor.
TnyFolderStoreObserver is implemented by TnyGtkFolderStoreTreeModel.
TnyPasswordGetter is implemented by TnyGtkPasswordDialog.
TnyConnectionPolicy is implemented by TnyCamelRecoverConnectionPolicy and TnyCamelDefaultConnectionPolicy.
"connecting-started" : Run First "changed" : Run First "connection-status-changed" : Run First "connection-changed" : Run First "subscription-changed" : Run First "error-happened" : Run First "msg-sending" : Run First "msg-sent" : Run First "queue-start" : Run First "queue-stop" : Run First
#define TNY_PRIORITY_LOWER_THAN_GTK_REDRAWS G_PRIORITY_HIGH_IDLE + 30
typedef struct { GQuark domain; gint code; gchar *message; guint position; guint of_total; } TnyStatus;
A progress status
free-function: tny_status_free
typedef struct _TnyAccountStore TnyAccountStore;
A account store, holding a list of accounts
free-function: g_object_unref
typedef struct { GTypeInterface parent; /* Methods */ void (*get_accounts) (TnyAccountStore *self, TnyList *list, TnyGetAccountsRequestType types); const gchar* (*get_cache_dir) (TnyAccountStore *self); TnyDevice* (*get_device) (TnyAccountStore *self); gboolean (*alert) (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, GError *error); TnyAccount* (*find_account) (TnyAccountStore *self, const gchar *url_string); /* Signals */ void (*connecting_started) (TnyAccountStore *self); } TnyAccountStoreIface;
typedef struct _TnyList TnyList;
A list of things
free-function: g_object_unref type-parameter: G
typedef struct _TnyIterator TnyIterator;
A position indicator for a TnyList
free-function: g_object_unref
typedef struct { GTypeInterface parent; guint (*get_length) (TnyList *self); void (*prepend) (TnyList *self, GObject* item); void (*append) (TnyList *self, GObject* item); void (*remove) (TnyList *self, GObject* item); void (*foreach) (TnyList *self, GFunc func, gpointer user_data); TnyList* (*copy) (TnyList *self); TnyIterator* (*create_iterator) (TnyList *self); void (*remove_matches) (TnyList *self, TnyListMatcher matcher, gpointer match_data); } TnyListIface;
typedef struct { GTypeInterface parent; void (*next) (TnyIterator *self); void (*prev) (TnyIterator *self); void (*first) (TnyIterator *self); void (*nth) (TnyIterator *self, guint nth); GObject* (*get_current) (TnyIterator *self); gboolean (*is_done) (TnyIterator *self); TnyList* (*get_list) (TnyIterator *self); } TnyIteratorIface;
typedef struct _TnyMsg TnyMsg;
A special kind of TnyMimePart that has a header
free-function: g_object_free
typedef struct { GTypeInterface parent; TnyHeader* (*get_header) (TnyMsg *self); TnyFolder* (*get_folder) (TnyMsg *self); gchar* (*get_url_string) (TnyMsg *self); void (*uncache_attachments) (TnyMsg *self); void (*rewrite_cache) (TnyMsg *self); } TnyMsgIface;
typedef struct _TnyFolder TnyFolder;
A folder, or a mailbox depending on what you prefer to call it
free-function: g_object_unref
typedef struct { GTypeInterface parent; /* Methods */ void (*remove_msg) (TnyFolder *self, TnyHeader *header, GError **err); void (*remove_msgs) (TnyFolder *self, TnyList *headers, GError **err); void (*add_msg) (TnyFolder *self, TnyMsg *msg, GError **err); void (*add_msg_async) (TnyFolder *self, TnyMsg *msg, TnyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data); void (*sync) (TnyFolder *self, gboolean expunge, GError **err); void (*sync_async) (TnyFolder *self, gboolean expunge, TnyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data); TnyMsgRemoveStrategy* (*get_msg_remove_strategy) (TnyFolder *self); void (*set_msg_remove_strategy) (TnyFolder *self, TnyMsgRemoveStrategy *st); TnyMsgReceiveStrategy* (*get_msg_receive_strategy) (TnyFolder *self); void (*set_msg_receive_strategy) (TnyFolder *self, TnyMsgReceiveStrategy *st); TnyMsg* (*get_msg) (TnyFolder *self, TnyHeader *header, GError **err); TnyMsg* (*find_msg) (TnyFolder *self, const gchar *url_string, GError **err); void (*get_msg_async) (TnyFolder *self, TnyHeader *header, TnyGetMsgCallback callback, TnyStatusCallback status_callback, gpointer user_data); void (*get_headers) (TnyFolder *self, TnyList *headers, gboolean refresh, GError **err); void (*get_headers_async) (TnyFolder *self, TnyList *headers, gboolean refresh, TnyGetHeadersCallback callback, TnyStatusCallback status_callback, gpointer user_data); const gchar* (*get_name) (TnyFolder *self); const gchar* (*get_id) (TnyFolder *self); TnyAccount* (*get_account) (TnyFolder *self); TnyFolderType (*get_folder_type) (TnyFolder *self); guint (*get_all_count) (TnyFolder *self); guint (*get_unread_count) (TnyFolder *self); guint (*get_local_size) (TnyFolder *self); gboolean (*is_subscribed) (TnyFolder *self); void (*refresh_async) (TnyFolder *self, TnyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data); void (*refresh) (TnyFolder *self, GError **err); void (*transfer_msgs) (TnyFolder *self, TnyList *header_list, TnyFolder *folder_dst, gboolean delete_originals, GError **err); void (*transfer_msgs_async) (TnyFolder *self, TnyList *header_list, TnyFolder *folder_dst, gboolean delete_originals, TnyTransferMsgsCallback callback, TnyStatusCallback status_callback, gpointer user_data); TnyFolder* (*copy) (TnyFolder *self, TnyFolderStore *into, const gchar *new_name, gboolean del, GError **err); void (*copy_async) (TnyFolder *self, TnyFolderStore *into, const gchar *new_name, gboolean del, TnyCopyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data); void (*poke_status) (TnyFolder *self); void (*add_observer) (TnyFolder *self, TnyFolderObserver *observer); void (*remove_observer) (TnyFolder *self, TnyFolderObserver *observer); TnyFolderStore* (*get_folder_store) (TnyFolder *self); TnyFolderStats* (*get_stats) (TnyFolder *self); gchar* (*get_url_string) (TnyFolder *self); TnyFolderCaps (*get_caps) (TnyFolder *self); void (*remove_msgs_async) (TnyFolder *self, TnyList *headers, TnyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data); } TnyFolderIface;
typedef struct _TnyHeader TnyHeader;
A summary item, envelope or group of E-mail headers. Depending on how you like to call it.
free-function: g_object_unref
typedef struct { GTypeInterface g; gchar* (*dup_uid) (TnyHeader *self); gchar* (*dup_bcc) (TnyHeader *self); gchar* (*dup_cc) (TnyHeader *self); gchar* (*dup_subject) (TnyHeader *self); gchar* (*dup_to) (TnyHeader *self); gchar* (*dup_from) (TnyHeader *self); gchar* (*dup_replyto) (TnyHeader *self); gchar* (*dup_message_id) (TnyHeader *self); guint (*get_message_size) (TnyHeader *self); time_t (*get_date_received) (TnyHeader *self); time_t (*get_date_sent) (TnyHeader *self); void (*set_bcc) (TnyHeader *self, const gchar *bcc); void (*set_cc) (TnyHeader *self, const gchar *cc); void (*set_from) (TnyHeader *self, const gchar *from); void (*set_subject) (TnyHeader *self, const gchar *subject); void (*set_to) (TnyHeader *self, const gchar *to); void (*set_replyto) (TnyHeader *self, const gchar *to); TnyFolder* (*get_folder) (TnyHeader *self); TnyHeaderFlags (*get_flags) (TnyHeader *self); void (*set_flag) (TnyHeader *self, TnyHeaderFlags mask); void (*unset_flag) (TnyHeader *self, TnyHeaderFlags mask); } TnyHeaderIface;
typedef struct _TnyMimePart TnyMimePart;
A part of a message, like the text of the message or like an attachment
free-function: g_object_unref
typedef struct { GTypeInterface parent; const gchar* (*get_content_type) (TnyMimePart *self); gboolean (*content_type_is) (TnyMimePart *self, const gchar *content_type); TnyStream* (*get_stream) (TnyMimePart *self); TnyStream* (*get_decoded_stream) (TnyMimePart *self); gssize (*decode_to_stream) (TnyMimePart *self, TnyStream *stream, GError **err); gssize (*write_to_stream) (TnyMimePart *self, TnyStream *stream, GError **err); gint (*construct) (TnyMimePart *self, TnyStream *stream, const gchar *mime_type, const gchar *transfer_encoding); const gchar* (*get_filename) (TnyMimePart *self); const gchar* (*get_content_id) (TnyMimePart *self); const gchar* (*get_description) (TnyMimePart *self); const gchar* (*get_content_location) (TnyMimePart *self); gboolean (*is_purged) (TnyMimePart *self); void (*set_content_location) (TnyMimePart *self, const gchar *content_location); void (*set_description) (TnyMimePart *self, const gchar *description); void (*set_content_id) (TnyMimePart *self, const gchar *content_id); void (*set_filename) (TnyMimePart *self, const gchar *filename); void (*set_content_type) (TnyMimePart *self, const gchar *contenttype); void (*set_purged) (TnyMimePart *self); gboolean (*is_attachment) (TnyMimePart *self); void (*get_parts) (TnyMimePart *self, TnyList *list); void (*del_part) (TnyMimePart *self, TnyMimePart *part); gint (*add_part) (TnyMimePart *self, TnyMimePart *part); void (*get_header_pairs) (TnyMimePart *self, TnyList *list); void (*set_header_pair) (TnyMimePart *self, const gchar *name, const gchar *value); void (*decode_to_stream_async) (TnyMimePart *self, TnyStream *stream, TnyMimePartCallback callback, TnyStatusCallback status_callback, gpointer user_data); const gchar* (*get_transfer_encoding) (TnyMimePart *self); void (*set_transfer_encoding) (TnyMimePart *self, const gchar *transfer_encoding); } TnyMimePartIface;
typedef struct _TnyAccount TnyAccount;
A abstract account type with API shared between TnyStoreAccount and TnyTransportAccount.
free-function: g_object_unref
typedef struct { GTypeInterface parent; /* Methods */ TnyConnectionStatus (*get_connection_status)(TnyAccount *self); void (*set_id) (TnyAccount *self, const gchar *id); void (*set_name) (TnyAccount *self, const gchar *name); void (*set_secure_auth_mech) (TnyAccount *self, const gchar *mech); void (*set_proto) (TnyAccount *self, const gchar *proto); void (*set_user) (TnyAccount *self, const gchar *user); void (*set_hostname) (TnyAccount *self, const gchar *host); void (*set_port) (TnyAccount *self, guint port); void (*set_url_string) (TnyAccount *self, const gchar *url_string); void (*set_pass_func) (TnyAccount *self, TnyGetPassFunc get_pass_func); void (*set_forget_pass_func) (TnyAccount *self, TnyForgetPassFunc get_forget_pass_func); TnyGetPassFunc (*get_pass_func) (TnyAccount *self); TnyForgetPassFunc (*get_forget_pass_func) (TnyAccount *self); const gchar* (*get_id) (TnyAccount *self); const gchar* (*get_name) (TnyAccount *self); const gchar* (*get_secure_auth_mech) (TnyAccount *self); const gchar* (*get_proto) (TnyAccount *self); const gchar* (*get_user) (TnyAccount *self); const gchar* (*get_hostname) (TnyAccount *self); guint (*get_port) (TnyAccount *self); gchar* (*get_url_string) (TnyAccount *self); TnyAccountType (*get_account_type) (TnyAccount *self); void (*cancel) (TnyAccount *self); gboolean (*matches_url_string) (TnyAccount *self, const gchar *url_string); void (*start_operation) (TnyAccount *self, TnyStatusDomain domain, TnyStatusCode code, TnyStatusCallback status_callback, gpointer status_user_data); void (*stop_operation) (TnyAccount *self, gboolean *cancelled); gboolean (*is_ready) (TnyAccount *self); TnyConnectionPolicy* (*get_connection_policy) (TnyAccount *self); void (*set_connection_policy) (TnyAccount *self, TnyConnectionPolicy *policy); /* Signals*/ void (*connection_status_changed) (TnyAccount *self, TnyConnectionStatus status); void (*changed) (TnyAccount *self); } TnyAccountIface;
typedef struct _TnyDevice TnyDevice;
A device, with online and offline state
free-function: g_object_unref
typedef struct { GTypeInterface parent; gboolean (*is_online) (TnyDevice *self); void (*force_online) (TnyDevice *self); void (*force_offline) (TnyDevice *self); void (*reset) (TnyDevice *self); /* Signals */ void (*connection_changed) (TnyDevice *self, gboolean online); } TnyDeviceIface;
typedef struct _TnyStoreAccount TnyStoreAccount;
A account that contains folders
free-function: g_object_unref
typedef struct { GTypeInterface parent; /* Signals */ void (*subscription_changed) (TnyStoreAccount *self, TnyFolder *folder); /* Methods */ void (*subscribe) (TnyStoreAccount *self, TnyFolder *folder); void (*unsubscribe) (TnyStoreAccount *self, TnyFolder *folder); TnyFolder * (*find_folder) (TnyStoreAccount *self, const gchar *url_string, GError **err); void (*delete_cache) (TnyStoreAccount *self); } TnyStoreAccountIface;
typedef struct _TnyTransportAccount TnyTransportAccount;
A account to send E-mails with
free-function: g_object_unref
typedef struct { GTypeInterface parent; void (*send) (TnyTransportAccount *self, TnyMsg *msg, GError **err); } TnyTransportAccountIface;
typedef struct { GTypeInterface parent; gssize (*read) (TnyStream *self, char *buffer, gsize n); gssize (*write) (TnyStream *self, const char *buffer, gsize n); gint (*flush) (TnyStream *self); gint (*close) (TnyStream *self); gboolean (*is_eos) (TnyStream *self); gint (*reset) (TnyStream *self); gssize (*write_to_stream) (TnyStream *self, TnyStream *output); } TnyStreamIface;
typedef struct _TnySimpleList TnySimpleList;
A simple list
free-function: g_object_unref
typedef struct _TnyFsStream TnyFsStream;
A stream that adapts a filedescriptor to the TnyStream API
free-function: g_object_unref
typedef struct _TnyFolderStore TnyFolderStore;
A store with folders
free-function: g_object_unref
typedef struct { GTypeInterface parent; void (*remove_folder) (TnyFolderStore *self, TnyFolder *folder, GError **err); TnyFolder* (*create_folder) (TnyFolderStore *self, const gchar *name, GError **err); void (*create_folder_async) (TnyFolderStore *self, const gchar *name, TnyCreateFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data); void (*get_folders) (TnyFolderStore *self, TnyList *list, TnyFolderStoreQuery *query, GError **err); void (*get_folders_async) (TnyFolderStore *self, TnyList *list, TnyFolderStoreQuery *query, TnyGetFoldersCallback callback, TnyStatusCallback status_callback, gpointer user_data); void (*add_observer) (TnyFolderStore *self, TnyFolderStoreObserver *observer); void (*remove_observer) (TnyFolderStore *self, TnyFolderStoreObserver *observer); } TnyFolderStoreIface;
typedef struct _TnyFolderStoreQuery TnyFolderStoreQuery;
A query for filtering folders when getting them from a store
free-function: g_object_unref
typedef struct _TnyMsgRemoveStrategy TnyMsgRemoveStrategy;
A strategy for removing messages
free-function: g_object_unref
typedef struct { GTypeInterface parent; void (*perform_remove) (TnyMsgRemoveStrategy *self, TnyFolder *folder, TnyHeader *header, GError **err); } TnyMsgRemoveStrategyIface;
typedef struct _TnySendQueue TnySendQueue;
A queue for sending messages
free-function: g_object_unref
typedef struct { GTypeInterface parent; /* Signals */ void (*msg_sending) (TnySendQueue *self, TnyHeader *header, TnyMsg *msg, guint nth, guint total); void (*msg_sent) (TnySendQueue *self, TnyHeader *header, TnyMsg *msg, guint nth, guint total); void (*error_happened) (TnySendQueue *self, TnyHeader *header, TnyMsg *msg, GError *err, gpointer user_data); void (*queue_start) (TnySendQueue *self, gpointer user_data); void (*queue_stop) (TnySendQueue *self, gpointer user_data); /* methods */ void (*add) (TnySendQueue *self, TnyMsg *msg, GError **err); void (*add_async) (TnySendQueue *self, TnyMsg *msg, TnySendQueueAddCallback callback, TnyStatusCallback status_callback, gpointer user_data); TnyFolder* (*get_sentbox) (TnySendQueue *self); TnyFolder* (*get_outbox) (TnySendQueue *self); void (*cancel) (TnySendQueue *self, TnySendQueueCancelAction cancel_action, GError **err); } TnySendQueueIface;
typedef struct _TnyMsgReceiveStrategy TnyMsgReceiveStrategy;
A strategy for receiving messages
free-function: g_object_unref
typedef struct { GTypeInterface parent; TnyMsg * (*perform_get_msg) (TnyMsgReceiveStrategy *self, TnyFolder *folder, TnyHeader *header, GError **err); } TnyMsgReceiveStrategyIface;
typedef struct _TnyLockable TnyLockable;
A type for locking and unlocking things
free-function: g_object_unref
typedef struct { GTypeInterface parent; void (*lock) (TnyLockable *self); void (*unlock) (TnyLockable *self); } TnyLockableIface;
typedef struct _TnyNoopLockable TnyNoopLockable;
A lockable that does nothing
free-functions: g_object_unref
typedef struct _TnyFolderObserver TnyFolderObserver;
A event observer for a TnyFolder
free-function: g_object_unref
typedef struct { GTypeInterface parent; void (*update) (TnyFolderObserver *self, TnyFolderChange *change); } TnyFolderObserverIface;
typedef struct _TnyFolderChange TnyFolderChange;
A delta of changes, used by TnyFolderObserver
free-functions: g_object_unref
typedef struct _TnyFolderMonitor TnyFolderMonitor;
A publisher subscriber that subscribes as TnyFolderObserver to a folder, and publishes to a list of TnyList instances.
free-function: g_object_unref
typedef struct { GObjectClass parent; /* virtuals */ void (*update) (TnyFolderObserver *self, TnyFolderChange *change); void (*poke_status) (TnyFolderMonitor *self); void (*add_list) (TnyFolderMonitor *self, TnyList *list); void (*remove_list) (TnyFolderMonitor *self, TnyList *list); void (*stop) (TnyFolderMonitor *self); void (*start) (TnyFolderMonitor *self); } TnyFolderMonitorClass;
typedef struct _TnyFolderStoreChange TnyFolderStoreChange;
A delta of changes, used by TnyFolderStoreObserver
free-function: g_object_unref
typedef struct _TnyFolderStoreObserver TnyFolderStoreObserver;
A event observer for a TnyFolderStore
free-function: g_object_unref
typedef struct { GTypeInterface parent; void (*update) (TnyFolderStoreObserver *self, TnyFolderStoreChange *change); } TnyFolderStoreObserverIface;
typedef struct _TnyFolderStats TnyFolderStats;
Some statistics about a TnyFolder
free-function: g_object_unref
typedef struct _TnyPasswordGetter TnyPasswordGetter;
Gets a password
free-function: g_object_unref
typedef struct { GTypeInterface parent; const gchar* (*get_password) (TnyPasswordGetter *self, const gchar *aid, const gchar *prompt, gboolean *cancel); void (*forget_password) (TnyPasswordGetter *self, const gchar *aid); } TnyPasswordGetterIface;
typedef struct _TnyCombinedAccount TnyCombinedAccount;
A combined account
free-function: g_object_unref
typedef struct _TnyConnectionPolicy TnyConnectionPolicy;
A connection policy. For example to attempt to reconnect or to fail in case of connectivity problems.
free-function: g_object_unref
typedef struct { GTypeInterface parent; void (*on_connect) (TnyConnectionPolicy *self, TnyAccount *account); void (*on_connection_broken) (TnyConnectionPolicy *self, TnyAccount *account); void (*on_disconnect) (TnyConnectionPolicy *self, TnyAccount *account); void (*set_current) (TnyConnectionPolicy *self, TnyAccount *account, TnyFolder *folder); } TnyConnectionPolicyIface;
gchar* (*TnyGetPassFunc) (TnyAccount *self, const gchar *prompt, gboolean *cancel);
This method happens whenever the password must be requested from the user. You must return the password for TnyAccount self.
self : |
The TnyAccount instance for which the password is needed |
prompt : |
A prompt that you can display to the user. This is a human-readable password question, possibly containing an untranslated error message directly from the server. This should be ignored by most implementations, so NULL is an acceptable value. |
cancel : |
A by-ref boolean for if the user wants to cancel the connection request |
Returns : | Return the password for TnyAccount self entered by the user. |
void (*TnyForgetPassFunc) (TnyAccount *self);
This method happens in case the password was wrong. Also take a look at tny_account_set_forget_pass_func
self : |
the TnyAccount instance of which the password was wrong |
void (*TnyFolderCallback) (TnyFolder *self, gboolean cancelled, GError *err, gpointer user_data);
A generic folder callback. If allocated, you must cleanup user_data
at the
end of your implementation of the callback. All other fields in the parameters
of the callback are read-only.
self : |
a TnyFolder that caused the callback |
cancelled : |
if the operation got cancelled |
err : |
(null-ok): if an error occurred |
user_data : |
(null-ok): user data that was passed to the callbacks |
Since 1.0 audience: application-developer
void (*TnyCreateFolderCallback) (TnyFolderStore *self, gboolean cancelled, TnyFolder *new_folder, GError *err, gpointer user_data);
A folder store callback for when a folder creation was requested. If allocated,
you must cleanup user_data
at the end of your implementation of the callback.
All other fields in the parameters of the callback are read-only.
When cancelled, cancelled
will be TRUE while err
might nonetheless be NULL.
If err
is not NULL, an error occurred that you should handle gracefully.
The new_folder
folder parameter will only not be NULL if the creation of the
folder in self
was considered successful.
self : |
a TnyFolderStore that caused the callback |
cancelled : |
if the operation got cancelled |
new_folder : |
(null-ok): a newly created TnyFolder or NULL |
err : |
(null-ok): if an error occurred |
user_data : |
(null-ok): user data that was passed to the callbacks |
Since 1.0 audience: application-developer
void (*TnyMimePartCallback) (TnyMimePart *self, gboolean cancelled, TnyStream *stream, GError *err, gpointer user_data);
A MIME part callback for when a MIME part decode was requested. If allocated,
you must cleanup user_data
at the end of your implementation of the callback.
All other fields in the parameters of the callback are read-only.
When cancelled, cancelled
will be TRUE while err
might nonetheless be NULL.
If err
is not NULL, an error occurred that you should handle gracefully.
The stream
parameter will contain the stream that you passed but will now be
written, if the operation succeeded.
self : |
a TnyFolderStore that caused the callback |
cancelled : |
if the operation got cancelled |
stream : |
the stream you passed |
err : |
(null-ok): if an error occurred |
user_data : |
(null-ok): user data that was passed to the callbacks |
Since 1.0 audience: application-developer
void (*TnyGetHeadersCallback) (TnyFolder *self, gboolean cancelled, TnyList *headers, GError *err, gpointer user_data);
A folder callback for when headers where requested. If allocated, you must
cleanup user_data
at the end of your implementation of the callback. All
other fields in the parameters of the callback are read-only.
When cancelled, cancelled
will be TRUE while err
might nonetheless be NULL.
If err
is not NULL, an error occurred that you should handle gracefully.
The headers
parameter might be NULL in case of error or cancellation.
self : |
a TnyFolder that caused the callback |
cancelled : |
if the operation got cancelled |
headers : |
(null-ok): a TnyList with fetched TnyHeader instances or NULL |
err : |
(null-ok): if an error occurred |
user_data : |
(null-ok): user data that was passed to the callbacks |
Since 1.0 audience: application-developer
void (*TnyGetMsgCallback) (TnyFolder *folder, gboolean cancelled, TnyMsg *msg, GError *err, gpointer user_data);
A folder callback for when a message fetch was requested. If allocated, you
must cleanup user_data
at the end of your implementation of the callback. All
other fields in the parameters of the callback are read-only.
When cancelled, cancelled
will be TRUE while err
might nonetheless be NULL.
If err
is not NULL, an error occurred that you should handle gracefully.
The msg
parameter might be NULL in case of error or cancellation.
A method that gets called after tny_folder_get_msg_async is finished getting the message or in case there was an error.
folder : |
a TnyFolder that caused the callback |
cancelled : |
if the operation got cancelled |
msg : |
(null-ok): a TnyMsg with the fetched message or NULL |
err : |
(null-ok): if an error occurred |
user_data : |
(null-ok): user data that was passed to the callbacks |
Since 1.0 audience: application-developer
void (*TnyTransferMsgsCallback) (TnyFolder *folder, gboolean cancelled, GError *err, gpointer user_data);
A folder callback for when a transfer of messages was requested. If allocated,
you must cleanup user_data
at the end of your implementation of the callback.
All other fields in the parameters of the callback are read-only.
When cancelled, cancelled
will be TRUE while err
might nonetheless be NULL.
If err
is not NULL, an error occurred that you should handle gracefully.
A method that gets called after tny_folder_transfer_msgs_async is finished transferring the messages.
folder : |
a TnyFolder that caused the callback |
cancelled : |
if the operation got cancelled |
err : |
(null-ok): if an error occurred |
user_data : |
(null-ok): user data that was passed to the callbacks |
Since 1.0 audience: application-developer
void (*TnyStatusCallback) (GObject *self, TnyStatus *status, gpointer user_data);
A method that gets called whenever there's a status event
self : |
The sender of the status |
status : |
a TnyStatus object |
user_data : |
user data passed by the caller |
void (*TnyGetFoldersCallback) (TnyFolderStore *self, gboolean cancelled, TnyList *list, GError *err, gpointer user_data);
A folder store callback for when a list of folders was requested. If allocated,
you must cleanup user_data
at the end of your implementation of the callback.
All other fields in the parameters of the callback are read-only.
When cancelled, cancelled
will be TRUE while err
might nonetheless be NULL.
If err
is not NULL, an error occurred that you should handle gracefully.
The list
parameter might be NULL in case of cancellation or error. If not
NULL it contains the list of folders in self
that got fetched during the
request.
A method that happens after tny_folder_store_get_folders_async is finished
self : |
a TnyFolderStore that caused the callback |
cancelled : |
if the operation got cancelled |
list : |
(null-ok): a TnyList with fetched TnyFolder instances or NULL |
err : |
(null-ok): if an error occurred |
user_data : |
(null-ok): user data that was passed to the callbacks |
Since 1.0 audience: application-developer
void (*TnyCopyFolderCallback) (TnyFolder *self, gboolean cancelled, TnyFolderStore *into, TnyFolder *new_folder, GError *err, gpointer user_data);
A folder callback for when a copy of a folder was requested. If allocated,
you must cleanup user_data
at the end of your implementation of the callback.
All other fields in the parameters of the callback are read-only.
When cancelled, cancelled
will be TRUE while err
might nonetheless be NULL.
If err
is not NULL, an error occurred that you should handle gracefully.
The parameter into
is the TnyFolderStore where you copied self
to. The
parameter new_folder
is the folder instance in into
that got created by
copying self
into it.
Note that you should not use self
without care. It's possible that when you
requested tny_folder_copy_async()
, you specified to delete the original folder.
Therefore will self
point to an instance that is about to be removed as an
instance locally, and of which the remote folder has already been removed in
case the copy was indeed successful and the request included deleting the
original. In such a case is self
as a folder not to be trusted any longer.
In this case wont self
be NULL, but any operation that you'll do on it will
yield unexpected and more importantly unspecified results. Please do not
ignore this warning.
self : |
a TnyFolder that caused the callback |
cancelled : |
if the operation got cancelled |
into : |
(null-ok): where self got copied to
|
new_folder : |
(null-ok): the new folder in into
|
err : |
(null-ok): if an error occurred |
user_data : |
(null-ok): user data that was passed to the callbacks |
Since 1.0 audience: application-developer
void (*TnySendQueueAddCallback) (TnySendQueue *self, gboolean cancelled, TnyMsg *msg, GError *err, gpointer user_data);
self : |
|
cancelled : |
|
msg : |
|
err : |
|
user_data : |
void user_function (TnyAccountStore *self, gpointer user_data) : Run First
Emitted when the store starts trying to connect the accounts. Usage of this signal is not recommended as it's a candidate for API changes.
self : |
the object on which the signal is emitted |
user_data : |
(null-ok): user data set when the signal handler was connected. |
user_data : |
user data set when the signal handler was connected. |
Since 1.0
void user_function (TnyAccount *self, gpointer user_data) : Run First
Emitted when one of the account's properties changes.
@:
self : |
the object on which the signal is emitted |
user_data : |
(null-ok): user data set when the signal handler was connected. |
user_data : |
user data set when the signal handler was connected. |
Since 1.0 audience: application-developer
void user_function (TnyAccount *self, gint status, gpointer user_data) : Run First
Emitted when the connection status of an account changes.
@:
self : |
the object on which the signal is emitted |
status : |
the TnyConnectionStatus |
user_data : |
(null-ok): user data set when the signal handler was connected. |
user_data : |
user data set when the signal handler was connected. |
Since 1.0 audience: application-developer
void user_function (TnyDevice *self, gboolean arg1, gpointer user_data) : Run First
Emitted when the connection status of a device changes.
This signal will not be emitted in response to actual connection changes
while the status is forced with tny_device_force_online()
or
tny_device_force_offline()
.
self : |
the object on which the signal is emitted |
arg1 : |
Whether or not the device is now online |
user_data : |
(null-ok): user data set when the signal handler was connected. |
user_data : |
user data set when the signal handler was connected. |
Since 1.0 audience: platform-developer, type-implementer
void user_function (TnyStoreAccount *self, TnyFolder *arg1, gpointer user_data) : Run First
Emitted when the subscription of a folder change
@: @:
self : |
the object on which the signal is emitted |
arg1 : |
the TnyFolder of the folder whose subscription has changed |
user_data : |
(null-ok): user data set when the signal handler was connected |
user_data : |
user data set when the signal handler was connected. |
Since 1.0 audience: application-developer
void user_function (TnySendQueue *self, TnyHeader *arg1, TnyMsg *arg2, gpointer arg3, gpointer user_data) : Run First
Emitted when a message didn't get sent because of an error
@: @: @: @:
self : |
the object on which the signal is emitted |
arg1 : |
(null-ok): The header of the message that was supposed to be sent or NULL |
arg2 : |
(null-ok): The message that was supposed to be sent or NULL |
arg3 : |
a GError containing the error that happened |
arg4 : |
(null-ok): user data |
user_data : |
user data set when the signal handler was connected. |
void user_function (TnySendQueue *self, TnyHeader *arg1, TnyMsg *arg2, guint arg3, guint arg4, gpointer user_data) : Run First
API WARNING: This API might change
Emitted when a message is being sent.
@: @: @: @: @:
self : |
the object on which the signal is emitted |
arg1 : |
The message that is being sent |
arg2 : |
The current nth number of the message that is being sent |
arg3 : |
The total amount of messages currently being processed |
user_data : |
user data set when the signal handler was connected. |
void user_function (TnySendQueue *self, TnyHeader *arg1, TnyMsg *arg4, guint arg3, guint arg4, gpointer user_data) : Run First
Emitted when a message got sent
@: @: @: @: @:
self : |
the object on which the signal is emitted |
arg1 : |
The message that got sent |
arg4 : |
(null-ok): user data |
user_data : |
user data set when the signal handler was connected. |
void user_function (TnySendQueue *self, gpointer user_data) : Run First
Emitted when the queue starts to process messages
self : |
a TnySendQueue, the object on which the signal is emitted |
user_data : |
user data set when the signal handler was connected. |
void user_function (TnySendQueue *self, gpointer user_data) : Run First
Emitted when the queue stops to process messages
self : |
a TnySendQueue, the object on which the signal is emitted |
user_data : |
user data set when the signal handler was connected. |