![]() |
![]() |
![]() |
Reference Manual of the tinymail framework | ![]() |
---|---|---|---|---|
#define TNY_TYPE_FOLDER_CHANGE_CHANGED TnyFolderChange; GType tny_folder_change_changed_get_type (void); TnyFolderChange* tny_folder_change_new (TnyFolder *folder); const gchar* tny_folder_change_get_rename (TnyFolderChange *self, const gchar **oldname); void tny_folder_change_set_rename (TnyFolderChange *self, const gchar *newname); void tny_folder_change_set_received_msg (TnyFolderChange *self, TnyMsg *msg); TnyMsg* tny_folder_change_get_received_msg (TnyFolderChange *self); void tny_folder_change_set_new_all_count (TnyFolderChange *self, guint new_all_count); void tny_folder_change_set_new_unread_count (TnyFolderChange *self, guint new_unread_count); guint tny_folder_change_get_new_unread_count (TnyFolderChange *self); guint tny_folder_change_get_new_all_count (TnyFolderChange *self); void tny_folder_change_add_added_header (TnyFolderChange *self, TnyHeader *header); void tny_folder_change_add_expunged_header (TnyFolderChange *self, TnyHeader *header); void tny_folder_change_get_added_headers (TnyFolderChange *self, TnyList *headers); void tny_folder_change_get_expunged_headers (TnyFolderChange *self, TnyList *headers); void tny_folder_change_reset (TnyFolderChange *self); TnyFolder* tny_folder_change_get_folder (TnyFolderChange *self); TnyFolderChangeChanged tny_folder_change_get_changed (TnyFolderChange *self);
A type with the delta or changes between two states of a TnyFolder. The TnyFolderObserver will receive instances of this type as information about what got changed.
#define TNY_TYPE_FOLDER_CHANGE_CHANGED (tny_folder_change_changed_get_type())
typedef struct _TnyFolderChange TnyFolderChange;
A delta of changes, used by TnyFolderObserver
free-functions: g_object_unref
GType tny_folder_change_changed_get_type (void);
GType system helper function
Returns : | a GType |
TnyFolderChange* tny_folder_change_new (TnyFolder *folder);
Creates a changeset for folder
folder : |
a TnyFolder |
Returns : | (caller-owns): a new TnyFolderChange instance |
Since 1.0 audience: application-developer
const gchar* tny_folder_change_get_rename (TnyFolderChange *self, const gchar **oldname);
Get the new name of the folder in case of a rename. This will return NULL if no rename happened. You can pass a pointer if you need the old name of the folder too, else pass NULL.
You must not free the returned value nor the oldname
pointer.
return: (null-ok): The new folder name or NULL
self : |
a TnyFolderChange instance |
oldname : |
(null-ok) (out): a byref string or NULL |
Returns : |
Since 1.0 audience: application-developer
void tny_folder_change_set_rename (TnyFolderChange *self, const gchar *newname);
Mark the change in such a way that the user can know that a rename has happened. This is an internal function not intended for application developers to alter.
self : |
a TnyFolderChange instance |
newname : |
the new name of the folder |
Since 1.0 audience: tinymail-developer
void tny_folder_change_set_received_msg (TnyFolderChange *self, TnyMsg *msg);
Set the message that got received in self
. This is an internal function not
intended for application developers to alter. Default value is FALSE.
self : |
a TnyFolderChange |
msg : |
a TnyMsg |
Since 1.0 audience: tinymail-developer
TnyMsg* tny_folder_change_get_received_msg (TnyFolderChange *self);
Get the message that got received, if the change includes receiving a message. If no message was received, NULL will be returned. If not NULL, the returned value must be unreferenced after use.
self : |
a TnyFolderChange |
Returns : | (null-ok) (caller-owns): received message or NULL |
Since 1.0 audience: application-developer
void tny_folder_change_set_new_all_count (TnyFolderChange *self, guint new_all_count);
Set the all count of self
. This is an internal function not intended for
application developers to alter.
self : |
a TnyFolderChange |
new_all_count : |
all count |
Since 1.0 audience: tinymail-developer
void tny_folder_change_set_new_unread_count (TnyFolderChange *self, guint new_unread_count);
Set the unread count. This is an internal function not intended for application developers to alter.
self : |
a TnyFolderChange |
new_unread_count : |
unread count |
Since 1.0 audience: tinymail-developer
guint tny_folder_change_get_new_unread_count (TnyFolderChange *self);
Get the unread count of self
.
self : |
a TnyFolderChange |
Returns : | unread count |
Since 1.0 audience: application-developer
guint tny_folder_change_get_new_all_count (TnyFolderChange *self);
Get the all count of self
self : |
a TnyFolderChange |
Returns : | all count |
Since 1.0 audience: application-developer
void tny_folder_change_add_added_header (TnyFolderChange *self, TnyHeader *header);
Add header
to self
. This is an internal function not intended for
application developers to alter.
self : |
a TnyFolderChange |
header : |
a TnyHeader |
Since 1.0 audience: tinymail-developer
void tny_folder_change_add_expunged_header (TnyFolderChange *self, TnyHeader *header);
Add header
to self
. This is an internal function not intended for
application developers to alter.
self : |
a TnyFolderChange instance |
header : |
a TnyHeader |
Since 1.0 audience: tinymail-developer
void tny_folder_change_get_added_headers (TnyFolderChange *self, TnyList *headers);
Get the added headers in self
.
self : |
a TnyFolderChange |
headers : |
a TnyList where the added headers will be prepended to |
Since 1.0 audience: application-developer
void tny_folder_change_get_expunged_headers (TnyFolderChange *self, TnyList *headers);
Get the removed headers in self
.
self : |
a TnyFolderChange |
headers : |
a TnyList where the removed headers will be prepended to |
Since 1.0 audience: application-developer
void tny_folder_change_reset (TnyFolderChange *self);
Reset the state of self
. This is an internal function not intended for
application developers to alter.
self : |
a TnyFolderChange |
Since 1.0 audience: tinymail-developer
TnyFolder* tny_folder_change_get_folder (TnyFolderChange *self);
Get the folder of self
. The return value of this method must be unreferenced
after use.
self : |
a TnyFolderChange instance |
Returns : | (caller-owns): the TnyFolder of this changeset |
Since 1.0 audience: application-developer
TnyFolderChangeChanged tny_folder_change_get_changed (TnyFolderChange *self);
Get a flags field with all the changed things
self : |
a TnyFolderChange |
Returns : | the changed items as a flags field |
Since 1.0 audience: application-developer