tny-shared.h

tny-shared.h — Shared include file with forward typedefs

Synopsis




#define             tny_debug
                    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;
gchar*              (*TnyGetPassFunc)                   (TnyAccount *self,
                                                         const gchar *prompt,
                                                         gboolean *cancel);
void                (*TnyForgetPassFunc)                (TnyAccount *self);
void                (*TnyGetHeadersCallback)            (TnyFolder *self,
                                                         gboolean canceled,
                                                         TnyList *headers,
                                                         GError *err,
                                                         gpointer user_data);
void                (*TnyGetMsgCallback)                (TnyFolder *folder,
                                                         gboolean canceled,
                                                         TnyMsg *msg,
                                                         GError *err,
                                                         gpointer user_data);
void                (*TnyTransferMsgsCallback)          (TnyFolder *folder,
                                                         gboolean canceled,
                                                         GError *err,
                                                         gpointer user_data);
void                (*TnyStatusCallback)                (GObject *self,
                                                         TnyStatus *status,
                                                         gpointer user_data);
                    TnySimpleList;
                    TnySimpleListClass;
                    TnyFsStream;
                    TnyFsStreamClass;
                    TnyFolderStore;
                    TnyFolderStoreIface;
                    TnyFolderStoreQuery;
                    TnyFolderStoreQueryClass;
                    TnyFolderStoreQueryItem;
                    TnyFolderStoreQueryItemClass;
void                (*TnyGetFoldersCallback)            (TnyFolderStore *self,
                                                         gboolean canceled,
                                                         TnyList *list,
                                                         GError *err,
                                                         gpointer user_data);
void                (*TnyCopyFolderCallback)            (TnyFolder *self,
                                                         gboolean canceled,
                                                         TnyFolderStore *into,
                                                         TnyFolder *new_folder,
                                                         GError *err,
                                                         gpointer user_data);
                    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;

Object Hierarchy


  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

Prerequisites

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.

Known Derived Interfaces

TnyMimePart is required by TnyMsg.

TnyAccount is required by TnyStoreAccount and TnyTransportAccount.

TnyFolderStore is required by TnyStoreAccount.

Implemented Interfaces

TnySimpleList implements TnyList.

TnyFsStream implements TnyStream.

TnyNoopLockable implements TnyLockable.

TnyFolderMonitor implements TnyFolderObserver.

TnyCombinedAccount implements TnyFolderStore, TnyAccount, TnyStoreAccount and TnyTransportAccount.

Known Implementations

TnyList is implemented by TnySimpleList, TnyGtkHeaderListModel, TnyGtkFolderStoreTreeModel, TnyGtkAccountListModel and TnyGtkAttachListModel.

TnyMsg is implemented by TnyCamelMsg.

TnyFolder is implemented by TnyCamelFolder, TnyCamelIMAPFolder, TnyCamelNNTPFolder, TnyCamelPOPFolder and TnyMergeFolder.

TnyHeader is implemented by TnyCamelHeader and TnyCamelMsgHeader.

TnyMimePart is implemented by TnyCamelMimePart and TnyCamelMsg.

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 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 and TnyGenericSendQueue.

TnyMsgReceiveStrategy is implemented by TnyCamelFullMsgReceiveStrategy and TnyCamelPartialMsgReceiveStrategy.

TnyLockable is implemented by TnyNoopLockable and TnyGtkLockable.

TnyFolderObserver is implemented by TnyGtkFolderStoreTreeModel, TnyCamelSendQueue, TnyMergeFolder, TnyFolderMonitor and TnyGenericSendQueue.

TnyFolderStoreObserver is implemented by TnyGtkFolderStoreTreeModel.

TnyPasswordGetter is implemented by TnyGtkPasswordDialog.

Signals


  "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

Description

Details

tny_debug

#define             tny_debug


TnyStatus

typedef struct {
	GQuark domain;
	gint code;
	gchar *message;
	guint position;
	guint of_total;
} TnyStatus;


TnyAccountStore

typedef struct _TnyAccountStore TnyAccountStore;


TnyAccountStoreIface

typedef struct {
	GTypeInterface parent;

	/* Methods */
	void (*get_accounts_func) (TnyAccountStore *self, TnyList *list, TnyGetAccountsRequestType types);
	const gchar* (*get_cache_dir_func) (TnyAccountStore *self);
	TnyDevice* (*get_device_func) (TnyAccountStore *self);
	gboolean (*alert_func) (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error);
	TnyAccount* (*find_account_func) (TnyAccountStore *self, const gchar *url_string);

	/* Signals */
	void (*connecting_started) (TnyAccountStore *self);
} TnyAccountStoreIface;


TnyList

typedef struct _TnyList TnyList;


TnyIterator

typedef struct _TnyIterator TnyIterator;


TnyListIface

typedef struct {
	GTypeInterface parent;

	guint (*get_length_func) (TnyList *self);
	void (*prepend_func) (TnyList *self, GObject* item);
	void (*append_func) (TnyList *self, GObject* item);
	void (*remove_func) (TnyList *self, GObject* item);
	void (*foreach_func) (TnyList *self, GFunc func, gpointer user_data);
	TnyList* (*copy_func) (TnyList *self);
	TnyIterator* (*create_iterator_func) (TnyList *self);
} TnyListIface;


TnyIteratorIface

typedef struct {
	GTypeInterface parent;

	void (*next_func) (TnyIterator *self);
	void (*prev_func) (TnyIterator *self);
	void (*first_func) (TnyIterator *self);
	void (*nth_func) (TnyIterator *self, guint nth);
	GObject* (*get_current_func) (TnyIterator *self);

	gboolean (*is_done) (TnyIterator *self);
	TnyList* (*get_list_func) (TnyIterator *self);
} TnyIteratorIface;


TnyMsg

typedef struct _TnyMsg TnyMsg;


TnyMsgIface

typedef struct {
	GTypeInterface parent;

	TnyHeader* (*get_header_func) (TnyMsg *self);
	TnyFolder* (*get_folder_func) (TnyMsg *self);
	gchar* (*get_url_string_func) (TnyMsg *self);
	void (*uncache_attachments_func) (TnyMsg *self);
	void (*rewrite_cache_func) (TnyMsg *self);
} TnyMsgIface;


TnyFolder

typedef struct _TnyFolder TnyFolder;


TnyFolderIface

typedef struct {
	GTypeInterface parent;
	
	/* Methods */
	void (*remove_msg_func) (TnyFolder *self, TnyHeader *header, GError **err);
	void (*remove_msgs_func) (TnyFolder *self, TnyList *headers, GError **err);
	void (*add_msg_func) (TnyFolder *self, TnyMsg *msg, GError **err);
	void (*add_msg_async_func) (TnyFolder *self, TnyMsg *msg, TnyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data);
	void (*sync_func) (TnyFolder *self, gboolean expunge, GError **err);
	void (*sync_async_func) (TnyFolder *self, gboolean expunge, TnyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data);
	TnyMsgRemoveStrategy* (*get_msg_remove_strategy_func) (TnyFolder *self);
	void (*set_msg_remove_strategy_func) (TnyFolder *self, TnyMsgRemoveStrategy *st);
	TnyMsgReceiveStrategy* (*get_msg_receive_strategy_func) (TnyFolder *self);
	void (*set_msg_receive_strategy_func) (TnyFolder *self, TnyMsgReceiveStrategy *st);
	TnyMsg* (*get_msg_func) (TnyFolder *self, TnyHeader *header, GError **err);
	TnyMsg* (*find_msg_func) (TnyFolder *self, const gchar *url_string, GError **err);
	void (*get_msg_async_func) (TnyFolder *self, TnyHeader *header, TnyGetMsgCallback callback, TnyStatusCallback status_callback, gpointer user_data);
	void (*get_headers_func) (TnyFolder *self, TnyList *headers, gboolean refresh, GError **err);
	void (*get_headers_async_func) (TnyFolder *self, TnyList *headers, gboolean refresh, TnyGetHeadersCallback callback, TnyStatusCallback status_callback, gpointer user_data);
	const gchar* (*get_name_func) (TnyFolder *self);
	const gchar* (*get_id_func) (TnyFolder *self);
	TnyAccount* (*get_account_func) (TnyFolder *self);
	TnyFolderType (*get_folder_type_func) (TnyFolder *self);
	guint (*get_all_count_func) (TnyFolder *self);
	guint (*get_unread_count_func) (TnyFolder *self);
	guint (*get_local_size_func) (TnyFolder *self);
	gboolean (*is_subscribed_func) (TnyFolder *self);
	void (*refresh_async_func) (TnyFolder *self, TnyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data);
	void (*refresh_func) (TnyFolder *self, GError **err);
	void (*transfer_msgs_func) (TnyFolder *self, TnyList *header_list, TnyFolder *folder_dst, gboolean delete_originals, GError **err);
	void (*transfer_msgs_async_func) (TnyFolder *self, TnyList *header_list, TnyFolder *folder_dst, gboolean delete_originals, TnyTransferMsgsCallback callback, TnyStatusCallback status_callback, gpointer user_data);
	TnyFolder* (*copy_func) (TnyFolder *self, TnyFolderStore *into, const gchar *new_name, gboolean del, GError **err);
	void (*copy_async_func) (TnyFolder *self, TnyFolderStore *into, const gchar *new_name, gboolean del, TnyCopyFolderCallback callback, TnyStatusCallback status_callback, gpointer user_data);
	void (*poke_status_func) (TnyFolder *self);
	void (*add_observer_func) (TnyFolder *self, TnyFolderObserver *observer);
	void (*remove_observer_func) (TnyFolder *self, TnyFolderObserver *observer);
	TnyFolderStore* (*get_folder_store_func) (TnyFolder *self);
	TnyFolderStats* (*get_stats_func) (TnyFolder *self);
	gchar* (*get_url_string_func) (TnyFolder *self);
	TnyFolderCaps (*get_caps_func) (TnyFolder *self);
} TnyFolderIface;


TnyHeader

typedef struct _TnyHeader TnyHeader;


TnyHeaderIface

typedef struct {
	GTypeInterface g;

	const gchar* (*get_uid_func) (TnyHeader *self);
	const gchar* (*get_bcc_func) (TnyHeader *self);
	const gchar* (*get_cc_func) (TnyHeader *self);
	const gchar* (*get_subject_func) (TnyHeader *self);
	const gchar* (*get_to_func) (TnyHeader *self);
	const gchar* (*get_from_func) (TnyHeader *self);
	const gchar* (*get_replyto_func) (TnyHeader *self);
	const gchar* (*get_message_id_func) (TnyHeader *self);
	guint (*get_message_size_func) (TnyHeader *self);
	time_t (*get_date_received_func) (TnyHeader *self);
	time_t (*get_date_sent_func) (TnyHeader *self);
	void (*set_bcc_func) (TnyHeader *self, const gchar *bcc);
	void (*set_cc_func) (TnyHeader *self, const gchar *cc);
	void (*set_from_func) (TnyHeader *self, const gchar *from);
	void (*set_subject_func) (TnyHeader *self, const gchar *subject);
	void (*set_to_func) (TnyHeader *self, const gchar *to);
	void (*set_replyto_func) (TnyHeader *self, const gchar *to);
        TnyFolder* (*get_folder_func) (TnyHeader *self);
	TnyHeaderFlags (*get_flags_func) (TnyHeader *self);
	void (*set_flags_func) (TnyHeader *self, TnyHeaderFlags mask);
	void (*unset_flags_func) (TnyHeader *self, TnyHeaderFlags mask);
} TnyHeaderIface;


TnyMimePart

typedef struct _TnyMimePart TnyMimePart;


TnyMimePartIface

typedef struct {
	GTypeInterface parent;

	const gchar* (*get_content_type_func) (TnyMimePart *self);
	gboolean (*content_type_is_func) (TnyMimePart *self, const gchar *content_type);
	TnyStream* (*get_stream_func) (TnyMimePart *self);
	void (*decode_to_stream_func) (TnyMimePart *self, TnyStream *stream);
	void (*write_to_stream_func) (TnyMimePart *self, TnyStream *stream);
	gint (*construct_from_stream_func) (TnyMimePart *self, TnyStream *stream, const gchar *type);
	const gchar* (*get_filename_func) (TnyMimePart *self);
	const gchar* (*get_content_id_func) (TnyMimePart *self);
	const gchar* (*get_description_func) (TnyMimePart *self);
	const gchar* (*get_content_location_func) (TnyMimePart *self);
	gboolean (*is_purged_func) (TnyMimePart *self);
  
	void (*set_content_location_func) (TnyMimePart *self, const gchar *content_location); 
	void (*set_description_func) (TnyMimePart *self, const gchar *description); 
	void (*set_content_id_func) (TnyMimePart *self, const gchar *content_id); 
	void (*set_filename_func) (TnyMimePart *self, const gchar *filename);
	void (*set_content_type_func) (TnyMimePart *self, const gchar *contenttype);
	void (*set_purged_func) (TnyMimePart *self);
	gboolean (*is_attachment_func) (TnyMimePart *self);
	void (*get_parts_func) (TnyMimePart *self, TnyList *list);
	void (*del_part_func) (TnyMimePart *self, TnyMimePart *part);
	gint (*add_part_func) (TnyMimePart *self, TnyMimePart *part);
	void (*get_header_pairs_func) (TnyMimePart *self, TnyList *list);
	void (*set_header_pair_func) (TnyMimePart *self, const gchar *name, const gchar *value);
} TnyMimePartIface;


TnyAccount

typedef struct _TnyAccount TnyAccount;


TnyAccountIface

typedef struct {
	GTypeInterface parent;

	/* Methods */
	TnyConnectionStatus (*get_connection_status_func)(TnyAccount *self);
	void (*set_id_func) (TnyAccount *self, const gchar *id);
	void (*set_name_func) (TnyAccount *self, const gchar *name);
	void (*set_secure_auth_mech_func) (TnyAccount *self, const gchar *mech);
	void (*set_proto_func) (TnyAccount *self, const gchar *proto);
	void (*set_user_func) (TnyAccount *self, const gchar *user);
	void (*set_hostname_func) (TnyAccount *self, const gchar *host);
	void (*set_port_func) (TnyAccount *self, guint port);
	void (*set_url_string_func) (TnyAccount *self, const gchar *url_string);
	void (*set_pass_func_func) (TnyAccount *self, TnyGetPassFunc get_pass_func);
	void (*set_forget_pass_func_func) (TnyAccount *self, TnyForgetPassFunc get_forget_pass_func);
	TnyGetPassFunc (*get_pass_func_func) (TnyAccount *self);
	TnyForgetPassFunc (*get_forget_pass_func_func) (TnyAccount *self);
	const gchar* (*get_id_func) (TnyAccount *self);
	const gchar* (*get_name_func) (TnyAccount *self);
	const gchar* (*get_secure_auth_mech_func) (TnyAccount *self);
	const gchar* (*get_proto_func) (TnyAccount *self);
	const gchar* (*get_user_func) (TnyAccount *self);
	const gchar* (*get_hostname_func) (TnyAccount *self);
	guint (*get_port_func) (TnyAccount *self);
	gchar* (*get_url_string_func) (TnyAccount *self);
	TnyAccountType (*get_account_type_func) (TnyAccount *self);
	void (*cancel_func) (TnyAccount *self);
	gboolean (*matches_url_string_func) (TnyAccount *self, const gchar *url_string);
	void (*start_operation_func) (TnyAccount *self, TnyStatusDomain domain, TnyStatusCode code, TnyStatusCallback status_callback, gpointer status_user_data);
	void (*stop_operation_func) (TnyAccount *self, gboolean *canceled);
	gboolean (*is_ready_func) (TnyAccount *self);

	/* Signals*/
	void (*connection_status_changed) (TnyAccount *self, TnyConnectionStatus status);
	void (*changed) (TnyAccount *self);
} TnyAccountIface;


TnyDevice

typedef struct _TnyDevice TnyDevice;


TnyDeviceIface

typedef struct {
	GTypeInterface parent;

	gboolean (*is_online_func) (TnyDevice *self);

	void (*force_online_func) (TnyDevice *self);
	void (*force_offline_func) (TnyDevice *self);
	void (*reset_func) (TnyDevice *self);

	/* Signals */
	void (*connection_changed) (TnyDevice *self, gboolean online);
} TnyDeviceIface;


TnyStoreAccount

typedef struct _TnyStoreAccount TnyStoreAccount;


TnyStoreAccountIface

typedef struct {
	GTypeInterface parent;

	/* Signals */
	void (*subscription_changed) (TnyStoreAccount *self, TnyFolder *folder);

	/* Methods */
	void (*subscribe_func) (TnyStoreAccount *self, TnyFolder *folder);
	void (*unsubscribe_func) (TnyStoreAccount *self, TnyFolder *folder);
	TnyFolder * (*find_folder_func) (TnyStoreAccount *self, const gchar *url_string, GError **err);
	void (*delete_cache_func) (TnyStoreAccount *self);
} TnyStoreAccountIface;


TnyTransportAccount

typedef struct _TnyTransportAccount TnyTransportAccount;


TnyTransportAccountIface

typedef struct {
	GTypeInterface parent;

	void (*send_func) (TnyTransportAccount *self, TnyMsg *msg, GError **err);
} TnyTransportAccountIface;


TnyStream

typedef struct _TnyStream TnyStream;


TnyStreamIface

typedef struct {
	GTypeInterface parent;

	gssize (*read_func) (TnyStream *self, char *buffer, gsize n);
	gssize (*write_func) (TnyStream *self, const char *buffer, gsize n);
	gint (*flush_func) (TnyStream *self);
	gint (*close_func) (TnyStream *self);
	gboolean (*is_eos_func) (TnyStream *self);
	gint (*reset_func) (TnyStream *self);
	gssize (*write_to_stream_func) (TnyStream *self, TnyStream *output);
} TnyStreamIface;


TnyGetPassFunc ()

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.

TnyForgetPassFunc ()

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

TnyGetHeadersCallback ()

void                (*TnyGetHeadersCallback)            (TnyFolder *self,
                                                         gboolean canceled,
                                                         TnyList *headers,
                                                         GError *err,
                                                         gpointer user_data);

self :
canceled :
headers :
err :
user_data :

TnyGetMsgCallback ()

void                (*TnyGetMsgCallback)                (TnyFolder *folder,
                                                         gboolean canceled,
                                                         TnyMsg *msg,
                                                         GError *err,
                                                         gpointer user_data);

A method that gets called after tny_folder_get_msg_async is finished getting the message or in case there was an error.

folder : the TnyFolder instance from which the message was requested
canceled :
msg : the TnyMsg instance that was requested
err : in case there was an error, this !GError instance is not NULL
user_data : user data passed at the caller

TnyTransferMsgsCallback ()

void                (*TnyTransferMsgsCallback)          (TnyFolder *folder,
                                                         gboolean canceled,
                                                         GError *err,
                                                         gpointer user_data);

A method that gets called after tny_folder_transfer_msgs_async is finished transferring the messages.

folder : the TnyFolder instance from which the messages where transferred
canceled :
err : in case there was an error, this !GError instance is not NULL
user_data : user data passed at the caller

TnyStatusCallback ()

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

TnySimpleList

typedef struct _TnySimpleList TnySimpleList;


TnySimpleListClass

typedef struct {
	GObjectClass parent;
} TnySimpleListClass;


TnyFsStream

typedef struct _TnyFsStream TnyFsStream;


TnyFsStreamClass

typedef struct {
	GObjectClass parent;
} TnyFsStreamClass;


TnyFolderStore

typedef struct _TnyFolderStore TnyFolderStore;


TnyFolderStoreIface

typedef struct {
   GTypeInterface parent;

   void (*remove_folder_func) (TnyFolderStore *self, TnyFolder *folder, GError **err);
   TnyFolder* (*create_folder_func) (TnyFolderStore *self, const gchar *name, GError **err);
   void (*get_folders_func) (TnyFolderStore *self, TnyList *list, TnyFolderStoreQuery *query, GError **err);
	void (*get_folders_async_func) (TnyFolderStore *self, TnyList *list, TnyGetFoldersCallback callback, TnyFolderStoreQuery *query, TnyStatusCallback status_callback, gpointer user_data);
   void (*add_observer_func) (TnyFolderStore *self, TnyFolderStoreObserver *observer);
   void (*remove_observer_func) (TnyFolderStore *self, TnyFolderStoreObserver *observer);
} TnyFolderStoreIface;


TnyFolderStoreQuery

typedef struct _TnyFolderStoreQuery TnyFolderStoreQuery;


TnyFolderStoreQueryClass

typedef struct {
	GObjectClass parent;
} TnyFolderStoreQueryClass;


TnyFolderStoreQueryItem

typedef struct _TnyFolderStoreQueryItem TnyFolderStoreQueryItem;


TnyFolderStoreQueryItemClass

typedef struct {
	GObjectClass parent;
} TnyFolderStoreQueryItemClass;


TnyGetFoldersCallback ()

void                (*TnyGetFoldersCallback)            (TnyFolderStore *self,
                                                         gboolean canceled,
                                                         TnyList *list,
                                                         GError *err,
                                                         gpointer user_data);

A method that happens after tny_folder_store_get_folders_async is finished

self : the TnyFolderStore from which the child folders where requested
canceled :
list : a TnyList with TnyFolder instances (the requested children of self)
err : in case there was an error, this !GError instance is not NULL
user_data : user data passed at the caller

TnyCopyFolderCallback ()

void                (*TnyCopyFolderCallback)            (TnyFolder *self,
                                                         gboolean canceled,
                                                         TnyFolderStore *into,
                                                         TnyFolder *new_folder,
                                                         GError *err,
                                                         gpointer user_data);

self :
canceled :
into :
new_folder :
err :
user_data :

TnyMsgRemoveStrategy

typedef struct _TnyMsgRemoveStrategy TnyMsgRemoveStrategy;


TnyMsgRemoveStrategyIface

typedef struct {
	GTypeInterface parent;

	void (*perform_remove_func) (TnyMsgRemoveStrategy *self, TnyFolder *folder, TnyHeader *header, GError **err);
} TnyMsgRemoveStrategyIface;


TnySendQueue

typedef struct _TnySendQueue TnySendQueue;


TnySendQueueIface

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);

	/* methods */
	void (*add_func) (TnySendQueue *self, TnyMsg *msg, GError **err);
	TnyFolder* (*get_sentbox_func) (TnySendQueue *self);
	TnyFolder* (*get_outbox_func) (TnySendQueue *self);
	void (*cancel_func) (TnySendQueue *self, gboolean remove, GError **err);
} TnySendQueueIface;


TnyMsgReceiveStrategy

typedef struct _TnyMsgReceiveStrategy TnyMsgReceiveStrategy;


TnyMsgReceiveStrategyIface

typedef struct {
	GTypeInterface parent;

	TnyMsg * (*perform_get_msg_func) (TnyMsgReceiveStrategy *self, TnyFolder *folder, TnyHeader *header, GError **err);
} TnyMsgReceiveStrategyIface;


TnyPair

typedef struct _TnyPair TnyPair;


TnyPairClass

typedef struct {
	GObjectClass parent;
} TnyPairClass;


TnyLockable

typedef struct _TnyLockable TnyLockable;


TnyLockableIface

typedef struct {
	GTypeInterface parent;

	void (*lock_func) (TnyLockable *self);
	void (*unlock_func) (TnyLockable *self);
} TnyLockableIface;


TnyNoopLockable

typedef struct _TnyNoopLockable TnyNoopLockable;


TnyNoopLockableClass

typedef struct {
	GObjectClass parent;
} TnyNoopLockableClass;


TnyFolderObserver

typedef struct _TnyFolderObserver TnyFolderObserver;


TnyFolderObserverIface

typedef struct {
	GTypeInterface parent;

	void (*update_func) (TnyFolderObserver *self, TnyFolderChange *change);
} TnyFolderObserverIface;


TnyFolderChange

typedef struct _TnyFolderChange TnyFolderChange;


TnyFolderChangeClass

typedef struct {
	GObjectClass parent;
} TnyFolderChangeClass;


TnyFolderMonitor

typedef struct _TnyFolderMonitor TnyFolderMonitor;


TnyFolderMonitorClass

typedef struct {
	GObjectClass parent;

	/* virtuals */
	void (*update_func) (TnyFolderObserver *self, TnyFolderChange *change);
	void (*poke_status_func) (TnyFolderMonitor *self);
	void (*add_list_func) (TnyFolderMonitor *self, TnyList *list);
	void (*remove_list_func) (TnyFolderMonitor *self, TnyList *list);
	void (*stop_func) (TnyFolderMonitor *self);
	void (*start_func) (TnyFolderMonitor *self);
} TnyFolderMonitorClass;


TnyFolderStoreChange

typedef struct _TnyFolderStoreChange TnyFolderStoreChange;


TnyFolderStoreChangeClass

typedef struct {
	GObjectClass parent;
} TnyFolderStoreChangeClass;


TnyFolderStoreObserver

typedef struct _TnyFolderStoreObserver TnyFolderStoreObserver;


TnyFolderStoreObserverIface

typedef struct {
	GTypeInterface parent;

	void (*update_func) (TnyFolderStoreObserver *self, TnyFolderStoreChange *change);
} TnyFolderStoreObserverIface;


TnyFolderStats

typedef struct _TnyFolderStats TnyFolderStats;


TnyFolderStatsClass

typedef struct {
	GObjectClass parent;
} TnyFolderStatsClass;


TnyPasswordGetter

typedef struct _TnyPasswordGetter TnyPasswordGetter;


TnyPasswordGetterIface

typedef struct {
	GTypeInterface parent;

	const gchar* (*get_password_func) (TnyPasswordGetter *self, const gchar *aid, const gchar *prompt, gboolean *cancel);
	void (*forget_password_func) (TnyPasswordGetter *self, const gchar *aid);
} TnyPasswordGetterIface;


TnyCombinedAccount

typedef struct _TnyCombinedAccount TnyCombinedAccount;


TnyCombinedAccountClass

typedef struct {
	GObjectClass parent;
} TnyCombinedAccountClass;

Signal Details

The "connecting-started" signal

void                user_function                      (TnyAccountStore *self,
                                                        gpointer         user_data)      : Run First

Emitted when the store starts trying to connect the accounts

self : the object on which the signal is emitted
user_data : user data set when the signal handler was connected.
user_data : user data set when the signal handler was connected.

The "changed" signal

void                user_function                      (TnyAccount *self,
                                                        gpointer    user_data)      : Run First

Emitted when the account changes.

@:
self : the object on which the signal is emitted
user_data : user data set when the signal handler was connected.
user_data : user data set when the signal handler was connected.

The "connection-status-changed" signal

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 : user data set when the signal handler was connected.
user_data : user data set when the signal handler was connected.

The "connection-changed" signal

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().

Implementors must make sure that the emissions of this signal always happen in the mainloop.

self : the object on which the signal is emitted
arg1 : Whether or not the device is now online
user_data : user data set when the signal handler was connected.
user_data : user data set when the signal handler was connected.

The "subscription-changed" signal

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 : user data set when the signal handler was connected
user_data : user data set when the signal handler was connected.

The "error-happened" signal

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 : The header of the message that was supposed to be sent or NULL
arg2 : The message that was supposed to be sent or NULL
arg3 : a GError containing the error that happened
arg4 : user data
user_data : user data set when the signal handler was connected.

The "msg-sending" signal

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 proccessed to sending it

@: @: @: @: @:
self : the object on which the signal is emitted
arg1 : The message that is being
arg2 : The current nth number of the message that is being sending
arg3 : The total amount of messages currently being processed
user_data : user data set when the signal handler was connected.

The "msg-sent" signal

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 : user data
user_data : user data set when the signal handler was connected.