Changeset 906
- Timestamp:
- 09/08/06 17:36:59
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/bindings/python/tinymail.override (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/libtinymail-unused.sgml (modified) (5 diffs)
- trunk/docs/devel/reference/tmpl/tny-account-store.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-account.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-device.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-folder-store.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-folder.sgml (modified) (2 diffs)
- trunk/docs/devel/reference/tmpl/tny-header.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-iterator.sgml (modified) (3 diffs)
- trunk/docs/devel/reference/tmpl/tny-list.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-mime-part.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-msg.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-shared.sgml (modified) (11 diffs)
- trunk/docs/devel/reference/tmpl/tny-store-account.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-stream.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-transport-account.sgml (modified) (1 diff)
- trunk/libtinymail-camel/tny-camel-common.c (modified) (1 diff)
- trunk/libtinymail-camel/tny-session-camel.c (modified) (3 diffs)
- trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c (modified) (1 diff)
- trunk/libtinymail-gpe/tny-gpe-account-store.c (modified) (1 diff)
- trunk/libtinymail-maemo/tny-maemo-account-store.c (modified) (1 diff)
- trunk/libtinymail-olpc/tny-olpc-account-store.c (modified) (1 diff)
- trunk/libtinymail-test/tny-account-test.c (modified) (1 diff)
- trunk/libtinymail-test/tny-folder-store-query-test.c (modified) (5 diffs)
- trunk/libtinymail-test/tny-folder-test.c (modified) (3 diffs)
- trunk/libtinymail-test/tny-list-test.c (modified) (6 diffs)
- trunk/libtinymail/tny-account-store.c (modified) (5 diffs)
- trunk/libtinymail/tny-account.c (modified) (3 diffs)
- trunk/libtinymail/tny-device.c (modified) (1 diff)
- trunk/libtinymail/tny-folder-store-query.c (modified) (4 diffs)
- trunk/libtinymail/tny-folder-store.c (modified) (1 diff)
- trunk/libtinymail/tny-iterator.c (modified) (3 diffs)
- trunk/libtinymail/tny-iterator.h (modified) (2 diffs)
- trunk/libtinymail/tny-shared.h (modified) (2 diffs)
- trunk/libtinymail/tny-simple-list-iterator.c (modified) (2 diffs)
- trunk/libtinymailui-gtk/tny-gtk-account-tree-model-iterator.c (modified) (2 diffs)
- trunk/libtinymailui-gtk/tny-gtk-account-tree-model.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-attach-list-model-iterator.c (modified) (2 diffs)
- trunk/libtinymailui-gtk/tny-gtk-header-list-iterator-priv.h (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-header-list-iterator.c (modified) (3 diffs)
- trunk/libtinymailui-gtk/tny-gtk-header-list-model.c (modified) (4 diffs)
- trunk/libtinymailui-gtk/tny-gtk-msg-view.c (modified) (1 diff)
- trunk/libtinymailui-mozembed/tny-moz-embed-msg-view.c (modified) (1 diff)
- trunk/tests/functional/folder-lister-async.c (modified) (2 diffs)
- trunk/tests/functional/folder-lister.c (modified) (2 diffs)
- trunk/tests/memory/memory-test.c (modified) (2 diffs)
- trunk/tests/shared/account-store.c (modified) (1 diff)
- trunk/tinymail/tny-demoui-summary-view.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r905 r906 2 2 3 3 * Fixed the Python bindings 4 4 * Fixed the TnyIterator API (current -> get_current, as it's a 5 property like any other property) 6 * Added lots of samples to the API reference documentation 7 8 * This was a major API change in all libraries 9 5 10 2006-09-06 Philip Van Hoof <pvanhoof@gnome.org> 6 11 trunk/bindings/python/tinymail.override
r900 r906 135 135 136 136 tny_iterator_nth (iter, index); 137 ret = tny_iterator_ current (iter);137 ret = tny_iterator_get_current (iter); 138 138 g_object_unref (G_OBJECT (ret)); 139 139 g_object_unref (G_OBJECT (iter)); trunk/docs/devel/reference/tmpl/libtinymail-unused.sgml
r904 r906 213 213 <!-- ##### SECTION ./tmpl/tny-password-dialog.sgml:Title ##### --> 214 214 TnyPasswordDialog 215 216 217 <!-- ##### SECTION ./tmpl/tny-shared.sgml:Long_Description ##### -->218 <para>219 220 </para>221 222 223 <!-- ##### SECTION ./tmpl/tny-shared.sgml:See_Also ##### -->224 <para>225 226 </para>227 228 229 <!-- ##### SECTION ./tmpl/tny-shared.sgml:Short_Description ##### -->230 Shared include file with forward typedefs231 232 233 <!-- ##### SECTION ./tmpl/tny-shared.sgml:Stability_Level ##### -->234 235 236 237 <!-- ##### SECTION ./tmpl/tny-shared.sgml:Title ##### -->238 tny-shared239 215 240 216 … … 698 674 @get_folders_async_func: 699 675 700 <!-- ##### STRUCT TnyFolderStoreQueryClass ##### -->701 <para>702 703 </para>704 705 @parent:706 707 <!-- ##### STRUCT TnyFolderStoreQueryItemClass ##### -->708 <para>709 710 </para>711 712 @parent:713 714 676 <!-- ##### USER_FUNCTION TnyForgetPassFunc ##### --> 715 677 <para> … … 721 683 722 684 @self: The #TnyAccount instance of which the password was not accepted 723 724 <!-- ##### STRUCT TnyFsStreamClass ##### -->725 <para>726 727 </para>728 729 @parent:730 685 731 686 <!-- ##### USER_FUNCTION TnyGetFoldersCallback ##### --> … … 1053 1008 @user_data: user data 1054 1009 1055 <!-- ##### STRUCT TnySimpleListClass ##### -->1056 <para>1057 1058 </para>1059 1060 @parent:1061 1062 1010 <!-- ##### STRUCT TnyStoreAccountClass ##### --> 1063 1011 <para> … … 1365 1313 @folder: 1366 1314 1315 <!-- ##### FUNCTION tny_iterator_current ##### --> 1316 <para> 1317 1318 </para> 1319 1320 @self: 1321 @Returns: 1322 1367 1323 <!-- ##### FUNCTION tny_iterator_has_first ##### --> 1368 1324 <para> trunk/docs/devel/reference/tmpl/tny-account-store.sgml
r904 r906 33 33 34 34 <!-- ##### VARIABLE tny_account_store_signals ##### --> 35 <para>36 37 </para>38 39 40 <!-- ##### STRUCT TnyAccountStore ##### -->41 35 <para> 42 36 trunk/docs/devel/reference/tmpl/tny-account.sgml
r904 r906 23 23 </para> 24 24 25 26 27 <!-- ##### STRUCT TnyAccount ##### -->28 <para>29 30 </para>31 25 32 26 trunk/docs/devel/reference/tmpl/tny-device.sgml
r904 r906 20 20 21 21 <!-- ##### VARIABLE tny_device_signals ##### --> 22 <para>23 24 </para>25 26 27 <!-- ##### STRUCT TnyDevice ##### -->28 22 <para> 29 23 trunk/docs/devel/reference/tmpl/tny-folder-store.sgml
r904 r906 16 16 17 17 <!-- ##### SECTION Stability_Level ##### --> 18 19 20 <!-- ##### STRUCT TnyFolderStore ##### -->21 <para>22 23 </para>24 18 25 19 trunk/docs/devel/reference/tmpl/tny-folder.sgml
r904 r906 31 31 32 32 33 <!-- ##### STRUCT TnyFolder ##### --> 34 <para> 35 36 </para> 37 38 39 <!-- ##### SIGNAL TnyFolder::folder-inserted ##### --> 40 <para> 41 42 </para> 43 44 @tnyfolderiface: the object which received the signal. 45 @arg1: 46 47 <!-- ##### SIGNAL TnyFolder::folders-reloaded ##### --> 48 <para> 49 50 </para> 51 52 @tnyfolderiface: the object which received the signal. 33 <!-- ##### MACRO TNY_TYPE_FOLDER_TYPE ##### --> 34 <para> 35 36 </para> 37 38 53 39 54 40 <!-- ##### STRUCT TnyFolderIface ##### --> … … 76 62 @refresh_func: 77 63 78 <!-- ##### MACRO TNY_TYPE_FOLDER_TYPE ##### -->79 <para>80 81 </para>82 83 84 85 64 <!-- ##### FUNCTION tny_folder_type_get_type ##### --> 86 65 <para> trunk/docs/devel/reference/tmpl/tny-header.sgml
r904 r906 25 25 </para> 26 26 27 28 29 <!-- ##### STRUCT TnyHeader ##### -->30 <para>31 32 </para>33 27 34 28 trunk/docs/devel/reference/tmpl/tny-iterator.sgml
r904 r906 18 18 19 19 20 <!-- ##### STRUCT TnyIterator ##### -->21 <para>22 23 </para>24 25 26 20 <!-- ##### STRUCT TnyIteratorIface ##### --> 27 21 <para> … … 34 28 @first_func: 35 29 @nth_func: 36 @ current_func:30 @get_current_func: 37 31 @is_done: 38 32 @get_list_func: … … 71 65 72 66 73 <!-- ##### FUNCTION tny_iterator_current ##### -->74 <para>75 76 </para>77 78 @self:79 @Returns:80 81 82 67 <!-- ##### FUNCTION tny_iterator_is_done ##### --> 83 68 <para> trunk/docs/devel/reference/tmpl/tny-list.sgml
r904 r906 16 16 17 17 <!-- ##### SECTION Stability_Level ##### --> 18 19 20 <!-- ##### STRUCT TnyList ##### -->21 <para>22 23 </para>24 18 25 19 trunk/docs/devel/reference/tmpl/tny-mime-part.sgml
r904 r906 16 16 17 17 <!-- ##### SECTION Stability_Level ##### --> 18 19 20 <!-- ##### STRUCT TnyMimePart ##### -->21 <para>22 23 </para>24 18 25 19 trunk/docs/devel/reference/tmpl/tny-msg.sgml
r904 r906 17 17 18 18 <!-- ##### SECTION Stability_Level ##### --> 19 20 21 <!-- ##### STRUCT TnyMsg ##### -->22 <para>23 24 </para>25 19 26 20 trunk/docs/devel/reference/tmpl/tny-shared.sgml
r903 r906 16 16 17 17 <!-- ##### SECTION Stability_Level ##### --> 18 19 20 <!-- ##### STRUCT TnyList ##### --> 21 <para> 22 23 </para> 24 25 26 <!-- ##### STRUCT TnyIterator ##### --> 27 <para> 28 29 </para> 18 30 19 31 … … 42 54 @first_func: 43 55 @nth_func: 44 @ current_func:56 @get_current_func: 45 57 @is_done: 46 58 @get_list_func: 59 60 <!-- ##### STRUCT TnyMsg ##### --> 61 <para> 62 63 </para> 64 47 65 48 66 <!-- ##### STRUCT TnyMsgIface ##### --> … … 58 76 @del_part_func: 59 77 @add_part_func: 78 79 <!-- ##### STRUCT TnyFolder ##### --> 80 <para> 81 82 </para> 83 84 85 <!-- ##### SIGNAL TnyFolder::folder-inserted ##### --> 86 <para> 87 88 </para> 89 90 @tnyfolderiface: the object which received the signal. 91 @arg1: 92 93 <!-- ##### SIGNAL TnyFolder::folders-reloaded ##### --> 94 <para> 95 96 </para> 97 98 @tnyfolderiface: the object which received the signal. 60 99 61 100 <!-- ##### STRUCT TnyFolderIface ##### --> … … 82 121 @refresh_async_func: 83 122 @refresh_func: 123 124 <!-- ##### STRUCT TnyHeader ##### --> 125 <para> 126 127 </para> 128 84 129 85 130 <!-- ##### STRUCT TnyHeaderIface ##### --> … … 110 155 @unset_flags_func: 111 156 157 <!-- ##### STRUCT TnyMimePart ##### --> 158 <para> 159 160 </para> 161 162 112 163 <!-- ##### STRUCT TnyMimePartIface ##### --> 113 164 <para> … … 132 183 @set_content_type_func: 133 184 @is_attachment_func: 185 186 <!-- ##### STRUCT TnyAccount ##### --> 187 <para> 188 189 </para> 190 134 191 135 192 <!-- ##### STRUCT TnyAccountIface ##### --> … … 158 215 @get_account_type_func: 159 216 217 <!-- ##### STRUCT TnyDevice ##### --> 218 <para> 219 220 </para> 221 222 160 223 <!-- ##### STRUCT TnyDeviceIface ##### --> 161 224 <para> … … 170 233 @connection_changed: 171 234 235 <!-- ##### STRUCT TnyStoreAccount ##### --> 236 <para> 237 238 </para> 239 240 172 241 <!-- ##### STRUCT TnyStoreAccountIface ##### --> 173 242 <para> … … 179 248 @unsubscribe_func: 180 249 250 <!-- ##### STRUCT TnyTransportAccount ##### --> 251 <para> 252 253 </para> 254 255 181 256 <!-- ##### STRUCT TnyTransportAccountIface ##### --> 182 257 <para> … … 188 263 189 264 <!-- ##### STRUCT TnyAccountStore ##### --> 265 <para> 266 267 </para> 268 269 270 <!-- ##### STRUCT TnyStream ##### --> 190 271 <para> 191 272 … … 243 324 244 325 245 <!-- ##### STRUCT TnyFsStreamClass ##### --> 246 <para> 247 248 </para> 249 250 @parent: 326 <!-- ##### TYPEDEF TnyFsStreamClass ##### --> 327 <para> 328 329 </para> 330 331 332 <!-- ##### STRUCT TnyFolderStore ##### --> 333 <para> 334 335 </para> 336 251 337 252 338 <!-- ##### STRUCT TnyFolderStoreIface ##### --> trunk/docs/devel/reference/tmpl/tny-store-account.sgml
r904 r906 16 16 17 17 <!-- ##### SECTION Stability_Level ##### --> 18 19 20 <!-- ##### STRUCT TnyStoreAccount ##### -->21 <para>22 23 </para>24 18 25 19 trunk/docs/devel/reference/tmpl/tny-stream.sgml
r904 r906 16 16 17 17 <!-- ##### SECTION Stability_Level ##### --> 18 19 20 <!-- ##### STRUCT TnyStream ##### -->21 <para>22 23 </para>24 18 25 19 trunk/docs/devel/reference/tmpl/tny-transport-account.sgml
r904 r906 18 18 19 19 20 <!-- ##### STRUCT TnyTransportAccount ##### -->21 <para>22 23 </para>24 25 26 20 <!-- ##### STRUCT TnyTransportAccountIface ##### --> 27 21 <para> trunk/libtinymail-camel/tny-camel-common.c
r900 r906 39 39 while (!tny_iterator_is_done (iterator)) 40 40 { 41 TnyFolderStoreQueryItem *item = (TnyFolderStoreQueryItem*) tny_iterator_ current (iterator);41 TnyFolderStoreQueryItem *item = (TnyFolderStoreQueryItem*) tny_iterator_get_current (iterator); 42 42 TnyFolderStoreQueryOption options = tny_folder_store_query_item_get_options (item); 43 43 regex_t *regex = tny_folder_store_query_item_get_regex (item); trunk/libtinymail-camel/tny-session-camel.c
r900 r906 466 466 while (!tny_iterator_is_done (iterator)) 467 467 { 468 TnyStoreAccount *account = (TnyStoreAccount*)tny_iterator_ current (iterator);468 TnyStoreAccount *account = (TnyStoreAccount*)tny_iterator_get_current (iterator); 469 469 470 470 tny_camel_account_set_online_status (TNY_CAMEL_ACCOUNT (account), !online); … … 526 526 CamelSession *session = (CamelSession*) self; 527 527 TnyDevice *device = (TnyDevice*)tny_account_store_get_device (account_store); 528 529 self->account_store = (gpointer)account_store; 530 531 gchar *base_directory = g_strdup (tny_account_store_get_cache_dir (account_store)); 528 gchar *base_directory = NULL; 532 529 gchar *camel_dir = NULL; 530 531 self->account_store = (gpointer)account_store; 532 base_directory = g_strdup (tny_account_store_get_cache_dir (account_store)); 533 533 534 534 if (G_LIKELY (camel_init (base_directory, TRUE) != 0)) 535 535 { 536 536 g_error (_("Critical ERROR: Cannot init %s as camel directory\n"), base_directory); 537 g_object_unref (G_OBJECT (device)); 537 538 exit (1); 538 539 } … … 552 553 553 554 tny_session_camel_set_device (self, device); 555 556 g_object_unref (G_OBJECT (device)); 554 557 555 558 return; trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c
r900 r906 590 590 TnyGnomeAccountStorePriv *priv = TNY_GNOME_ACCOUNT_STORE_GET_PRIVATE (self); 591 591 592 return priv->device;592 return g_object_ref (G_OBJECT (priv->device)); 593 593 } 594 594 trunk/libtinymail-gpe/tny-gpe-account-store.c
r900 r906 477 477 TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 478 478 479 return priv->device;479 return g_object_ref (G_OBJECT (priv->device)); 480 480 } 481 481 trunk/libtinymail-maemo/tny-maemo-account-store.c
r900 r906 479 479 TnyMaemoAccountStorePriv *priv = TNY_MAEMO_ACCOUNT_STORE_GET_PRIVATE (self); 480 480 481 return priv->device;481 return g_object_ref (G_OBJECT (priv->device)); 482 482 } 483 483 trunk/libtinymail-olpc/tny-olpc-account-store.c
r900 r906 351 351 TnyOlpcAccountStorePriv *priv = TNY_OLPC_ACCOUNT_STORE_GET_PRIVATE (self); 352 352 353 return priv->device;353 return g_object_ref (G_OBJECT (priv->device)); 354 354 } 355 355 trunk/libtinymail-test/tny-account-test.c
r900 r906 55 55 tny_iterator_first (aiter); 56 56 57 iface = TNY_ACCOUNT (tny_iterator_ current (aiter));57 iface = TNY_ACCOUNT (tny_iterator_get_current (aiter)); 58 58 59 59 if (!iface) trunk/libtinymail-test/tny-folder-store-query-test.c
r900 r906 57 57 tny_iterator_first (aiter); 58 58 59 account = TNY_STORE_ACCOUNT (tny_iterator_ current (aiter));59 account = TNY_STORE_ACCOUNT (tny_iterator_get_current (aiter)); 60 60 g_object_unref (G_OBJECT (aiter)); 61 61 … … 108 108 109 109 iter = tny_list_create_iterator (folders); 110 folder = (TnyFolder *) tny_iterator_ current (iter);110 folder = (TnyFolder *) tny_iterator_get_current (iter); 111 111 tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), 112 112 subfolders, query); … … 155 155 { 156 156 iter = tny_list_create_iterator (folders); 157 folder = (TnyFolder *) tny_iterator_ current (iter);157 folder = (TnyFolder *) tny_iterator_get_current (iter); 158 158 tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), 159 159 subfolders, query); … … 201 201 { 202 202 iter = tny_list_create_iterator (folders); 203 folder = (TnyFolder *) tny_iterator_ current (iter);203 folder = (TnyFolder *) tny_iterator_get_current (iter); 204 204 tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), 205 205 subfolders, query); … … 248 248 { 249 249 iter = tny_list_create_iterator (folders); 250 folder = (TnyFolder *) tny_iterator_ current (iter);250 folder = (TnyFolder *) tny_iterator_get_current (iter); 251 251 tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), 252 252 subfolders, query); trunk/libtinymail-test/tny-folder-test.c
r900 r906 60 60 while (!tny_iterator_is_done (iter)) 61 61 { 62 TnyFolderStore *folder = (TnyFolderStore*) tny_iterator_ current (iter);62 TnyFolderStore *folder = (TnyFolderStore*) tny_iterator_get_current (iter); 63 63 64 64 if (!strcmp (tny_folder_get_id (TNY_FOLDER (folder)), folname)) … … 85 85 aiter = tny_list_create_iterator (accounts); 86 86 tny_iterator_first (aiter); 87 account = TNY_STORE_ACCOUNT (tny_iterator_ current (aiter));87 account = TNY_STORE_ACCOUNT (tny_iterator_get_current (aiter)); 88 88 89 89 recurse_folders (TNY_FOLDER_STORE (account), NULL, "INBOX/tny-folder-test", do_test_folder); … … 172 172 iter = tny_list_create_iterator (headers); 173 173 tny_iterator_first (iter); 174 header = (TnyHeader*)tny_iterator_ current (iter);174 header = (TnyHeader*)tny_iterator_get_current (iter); 175 175 176 176 /* Flag as removed */ trunk/libtinymail-test/tny-list-test.c
r900 r906 104 104 105 105 tny_iterator_nth (iterator, 2); 106 item = (TnyTestObject*)tny_iterator_ current (iterator);106 item = (TnyTestObject*)tny_iterator_get_current (iterator); 107 107 108 108 str = g_strdup_printf ("Item should be \"3\" but is \"%s\"\n", item->str); … … 112 112 113 113 tny_iterator_next (iterator); 114 item = (TnyTestObject*)tny_iterator_ current (iterator);114 item = (TnyTestObject*)tny_iterator_get_current (iterator); 115 115 str = g_strdup_printf ("Item should be \"4\" but is \"%s\"\n", item->str); 116 116 gunit_fail_unless (!strcmp (item->str, "4"), str); … … 119 119 120 120 tny_iterator_prev (iterator); 121 item = (TnyTestObject*)tny_iterator_ current (iterator);121 item = (TnyTestObject*)tny_iterator_get_current (iterator); 122 122 str = g_strdup_printf ("Item should be \"3\" but is \"%s\"\n", item->str); 123 123 gunit_fail_unless (!strcmp (item->str, "3"), str); … … 126 126 127 127 tny_iterator_next (iterator); 128 item = (TnyTestObject*)tny_iterator_ current (iterator);128 item = (TnyTestObject*)tny_iterator_get_current (iterator); 129 129 str = g_strdup_printf ("Item should be \"4\" but is \"%s\"\n", item->str); 130 130 gunit_fail_unless (!strcmp (item->str, "4"), str); … … 132 132 g_object_unref (G_OBJECT(item)); 133 133 134 item = (TnyTestObject*)tny_iterator_ current (iterator);134 item = (TnyTestObject*)tny_iterator_get_current (iterator); 135 135 str = g_strdup_printf ("Item should be \"4\" but is \"%s\"\n", item->str); 136 136 gunit_fail_unless (!strcmp (item->str, "4"), str); … … 150 150 151 151 tny_iterator_first (iterator); 152 item = (TnyTestObject*)tny_iterator_ current (iterator);152 item = (TnyTestObject*)tny_iterator_get_current (iterator); 153 153 154 154 str = g_strdup_printf ("Item should be \"1\" but is %s\n", item->str); trunk/libtinymail/tny-account-store.c
r900 r906 42 42 * 43 43 * This jump-to-the-ui method implements showing a message dialog with prompt 44 * as prompt. It will return TRUE if the reply was affirmative . Or FALSE if not.44 * as prompt. It will return TRUE if the reply was affirmative or FALSE if not. 45 45 * 46 46 * Implementors: when implementing a platform-specific library, you must 47 * implement this method. For example in Gtk+ by using the GtkDialog API. 47 * implement this method. For example in Gtk+ by using the #GtkDialog API. 48 * 49 * Example implementation for Gtk+: 50 * <informalexample><programlisting> 51 * static gboolean 52 * tny_gnome_account_store_alert (TnyAccountStore *self, TnyAlertType type, const gchar *prompt) 53 * { 54 * GtkMessageType gtktype; 55 * gboolean retval = FALSE; 56 * GtkWidget *dialog; 57 * switch (type) 58 * { 59 * case TNY_ALERT_TYPE_INFO: 60 * gtktype = GTK_MESSAGE_INFO; 61 * break; 62 * case TNY_ALERT_TYPE_WARNING: 63 * gtktype = GTK_MESSAGE_WARNING; 64 * break; 65 * case TNY_ALERT_TYPE_ERROR: 66 * default: 67 * gtktype = GTK_MESSAGE_ERROR; 68 * break; 69 * } 70 * dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, 71 * gtktype, GTK_BUTTONS_YES_NO, prompt); 72 * if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES) 73 * retval = TRUE; 74 * gtk_widget_destroy (dialog); 75 * return retval; 76 * } 77 * </programlisting></informalexample> 78 * 79 * The @prompt will be a message like a question to the user whether or not he 80 * accepts the SSL certificate of the service. 48 81 * 49 82 * Return value: Whether the user pressed Ok/Yes (TRUE) or Cancel/No (FALSE) … … 64 97 * @self: a #TnyAccountTransport object 65 98 * 66 * This method returns a #TnyDevice instance 99 * This method returns a #TnyDevice instance. You must unreference the return 100 * value after use. 67 101 * 68 102 * Implementors: when implementing a platform-specific library, you must 69 * implement this method and a #TnyDevice implementation. 103 * implement this method and a #TnyDevice implementation. 104 105 * As the implementor of this method, you must add a reference count before 106 * returning. 70 107 * 71 108 * Return value: the device attached to this account store … … 90 127 * Implementors: when implementing a platform-specific library, you must 91 128 * implement this method. You can for example let it return the path to some 92 * folder on the file system.93 * 94 * Note that the callers of this method will not free the result. You95 * are responsible of freeing it up. For example when destroying the96 * #TnyAccountStore implementationinstance.97 * 129 * folder in $HOME on the file system. 130 * 131 * Note that the callers of this method will not free the result. The 132 * implementor of a #TnyAccountStore is responsible of freeing it up. For 133 * example when destroying the instance. 134 * 98 135 * Return value: the local path that will be used for storing the disk cache 99 136 * … … 118 155 * Get a read-only list of accounts in the store 119 156 * 157 * Example: 158 * <informalexample><programlisting> 159 * TnyList *list = tny_simple_list_new (); 160 * tny_account_store_get_accounts (astore, list, TNY_ACCOUNT_STORE_STORE_ACCOUNTS); 161 * TnyIterator *iter = tny_list_create_iterator (list); 162 * while (!tny_iterator_is_done (iter)) 163 * { 164 * TnyStoreAccount *cur = TNY_STORE_ACCOUNT (tny_iterator_get_current (iter)); 165 * printf ("%s\n", tny_store_account_get_name (cur)); 166 * g_object_unref (G_OBJECT (cur)); 167 * tny_iterator_next (iter); 168 * } 169 * g_object_unref (G_OBJECT (iter)); 170 * g_object_unref (G_OBJECT (list)); 171 * </programlisting></informalexample> 172 * 120 173 * Implementors: when implementing a platform-specific library, you must 121 174 * implement this method. … … 126 179 * libtinymail-camel specific tny_session_camel_set_current_accounts API. 127 180 * 128 * The implementation must fillup @list with instances to theavailable accounts.181 * The implementation must obviously fillup @list with available accounts. 129 182 * Note that if you cache the list, you must add a reference to each account 130 * added to the list ( they will be unreferenced and if the reference count131 * would reach eszero, an account would no longer be cached).183 * added to the list (else they will be unreferenced and if the reference count 184 * would reach zero, an account would no longer be cached). 132 185 * 133 186 * With libtinymail-camel each created account must also be informed about the 134 187 * #TnySessionCamel instance being used. Read more about this at 135 * tny_account_set_session of the libtinymail-camel specific #TnyAccount. 188 * tny_camel_account_set_session of the libtinymail-camel specific 189 * #TnyCamelAccount. 136 190 * 137 191 * There are multiple samples of #TnyAccountStore implementations in trunk/libtinymail/tny-account.c
r900 r906 27 27 * @self: a #TnyAccount object 28 28 * 29 * Get the account type. There 'stwo account types: a store and a transport29 * Get the account type. There are two account types: a store and a transport 30 30 * account type. A store account will implement the #TnyFolderStore 31 31 * interfaces which defines that the type contains folders. 32 32 * 33 33 * A transport account has a send method for sending #TnyMsg instances 34 * using the transport protocol of the account (for example usingSMTP).34 * using the transport protocol of the account (for example SMTP). 35 35 * 36 36 * Return value: The account type … … 72 72 * @self: a #TnyAccount object 73 73 * 74 * Get an unique id forthe account. The only certainty you have is that the74 * Get the unique id of the account. The only certainty you have is that the 75 75 * id is unique. The format of the id isn't specified. The implementor of the 76 * #TnyAccountStore willset this id using tny_account_set_id.76 * #TnyAccountStore must set this id using tny_account_set_id. 77 77 * 78 78 * Return value: Unique id … … 114 114 * @id: the id 115 115 * 116 * Set the account's unique id. You need to set this property before you can117 * start using the account. The id must be unique and is typically set in the116 * Set the unique id of the account. You need to set this property before you 117 * can start using the account. The id must be unique and is typically set in the 118 118 * implementation of a #TnyAccountStore. 119 119 * trunk/libtinymail/tny-device.c
