| Reference Manual of the tinymail framework | ||||
|---|---|---|---|---|
TnyFolderMonitor;
TnyFolderObserver* tny_folder_monitor_new (TnyFolder *folder);
void tny_folder_monitor_poke_status (TnyFolderMonitor *self);
void tny_folder_monitor_add_list (TnyFolderMonitor *self,
TnyList *list);
void tny_folder_monitor_remove_list (TnyFolderMonitor *self,
TnyList *list);
void tny_folder_monitor_stop (TnyFolderMonitor *self);
void tny_folder_monitor_start (TnyFolderMonitor *self);
A TnyFolderObserver implementation that updates TnyList implementations by adding and removing TnyHeader instances
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
TnyFolderObserver* tny_folder_monitor_new (TnyFolder *folder);
Creates a folder monitor for folder
folder : |
a TnyFolder |
| Returns : | (caller-owns): a new TnyFolderMonitor instance |
Since 1.0 audience: application-developer
void tny_folder_monitor_poke_status (TnyFolderMonitor *self);
Invoke the poke method on the folder instance being monitored.
Also take a look at tny_folder_poke_status() in TnyFolder.
self : |
a TnyFolderMonitor |
Since 1.0 audience: application-developer
void tny_folder_monitor_add_list (TnyFolderMonitor *self, TnyList *list);
Add list to the registered lists that are interested in changes. list will
remain referenced until it's unregisterd using tny_folder_monitor_remove_list()
or until self is finalized.
self : |
a TnyFolderChange |
list : |
a TnyList |
Since 1.0 audience: application-developer
void tny_folder_monitor_remove_list (TnyFolderMonitor *self, TnyList *list);
Remove list from the lists that are interested in changes. This will remove
the reference that got added when the tny_folder_monitor_add_list() was used.
self : |
a TnyFolderChange |
list : |
a TnyList |
Since 1.0 audience: application-developer
void tny_folder_monitor_stop (TnyFolderMonitor *self);
Stop monitoring the folder. At some point in time you must perform this
method. But after you used tny_folder_monitor_start() (use it for example
just before unreferencing self).
self : |
a TnyFolderMonitor |
Since 1.0 audience: application-developer
void tny_folder_monitor_start (TnyFolderMonitor *self);
Start monitoring the folder. The starting of a monitor implies that self
will become an observer of the folder instance. At some point in time you
must use tny_folder_monitor_stop() to stop monitoring the folder.
self : |
a TnyFolderMonitor |
Since 1.0 audience: application-developer