Changeset 3151
- Timestamp:
- 12/18/07 22:53:03
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/docs/devel/reference/libtinymail-docs.sgml (modified) (6 diffs)
- trunk/docs/devel/reference/tmpl/bodystruct.sgml (added)
- trunk/docs/devel/reference/tmpl/envelope.sgml (added)
- 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-camel-bs-mime-part.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-camel-bs-msg-receive-strategy.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-camel-bs-msg.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-camel-default-connection-policy.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-camel-recover-connection-policy.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-connection-policy.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-device.sgml (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-gtk-expander-mime-part-view.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-gtk-header-tree-model.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-gtk-image-mime-part-view.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-gtk-pixbuf-stream.sgml (added)
- trunk/docs/devel/reference/tmpl/tny-send-queue.sgml (modified) (3 diffs)
- trunk/docs/devel/reference/tmpl/tny-shared.sgml (modified) (15 diffs)
- trunk/docs/devel/reference/tmpl/tny.sgml (added)
- trunk/docs/devel/reference/tmpl/tnyui.sgml (added)
- trunk/libtinymail-camel/tny-camel-bs-mime-part.c (modified) (2 diffs)
- trunk/libtinymail-camel/tny-camel-mime-part.c (modified) (1 diff)
- trunk/libtinymail-queues/tny-get-msg-queue.c (modified) (2 diffs)
- trunk/libtinymail/tny-folder-store.c (modified) (2 diffs)
- trunk/libtinymail/tny-folder.c (modified) (6 diffs)
- trunk/libtinymail/tny-shared.h (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-image-mime-part-view.c (modified) (1 diff)
- trunk/libtinymailui/tny-account-store-view.c (modified) (2 diffs)
- trunk/libtinymailui/tny-header-view.c (modified) (3 diffs)
- trunk/libtinymailui/tny-mime-part-save-strategy.c (modified) (9 diffs)
- trunk/libtinymailui/tny-mime-part-saver.c (modified) (8 diffs)
- trunk/libtinymailui/tny-mime-part-view.c (modified) (7 diffs)
- trunk/libtinymailui/tny-msg-view.c (modified) (13 diffs)
- trunk/libtinymailui/tny-msg-window.c (modified) (1 diff)
- trunk/libtinymailui/tny-platform-factory.c (modified) (7 diffs)
- trunk/tests/functional/folder-lister-async.c (modified) (1 diff)
- trunk/tests/shared (modified) (1 prop)
- trunk/tests/shared/.svnignore (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3150 r3151 1 2007-12-18 Philip Van Hoof <pvanhoof@gnome.org> 2 3 * New documentation style, second commit (GtkDocFuture) 4 * API fixes in TnyMimePart and TnyGtkImageMimePartView 5 * Fixes for the unit tests and functional tests 6 7 * This was a major API change 8 1 9 2007-12-17 Philip Van Hoof <pvanhoof@gnome.org> 2 10 trunk/docs/devel/reference/libtinymail-docs.sgml
r2572 r3151 37 37 <!ENTITY libtinymail-TnyShared SYSTEM "xml/tny-shared.xml"> 38 38 <!ENTITY libtinymail-TnyCombinedAccount SYSTEM "xml/tny-combined-account.xml"> 39 <!ENTITY libtinymail-TnyConnectionPolicy "xml/tny-connection-policy.xml"> 39 40 40 41 <!ENTITY libtinymail-camel-TnyCamelSendQueue SYSTEM "xml/tny-camel-send-queue.xml"> … … 55 56 <!ENTITY libtinymail-camel-TnyCamelMimePart SYSTEM "xml/tny-camel-mime-part.xml"> 56 57 <!ENTITY libtinymail-camel-TnyCamelMsg SYSTEM "xml/tny-camel-msg.xml"> 58 <!ENTITY libtinymail-camel-TnyCamelBsMsg SYSTEM "xml/tny-camel-bs-msg.xml"> 59 <!ENTITY libtinymail-camel-TnyCamelBsMsgReceiveStrategy SYSTEM "xml/tny-camel-bs-msg-receive-strategy.xml"> 60 <!ENTITY libtinymail-camel-TnyCamelBsMimePart SYSTEM "xml/tny-camel-bs-mime-part.xml"> 61 <!ENTITY libtinymail-camel-TnyCamelRecoverConnectionPolicy SYSTEM "xml/tny-camel-recover-connection-policy.xml"> 62 <!ENTITY libtinymail-camel-TnyCamelDefaultConnectionPolicy SYSTEM "xml/tny-camel-default-connection-policy.xml"> 57 63 <!ENTITY libtinymail-camel-TnySessionCamel SYSTEM "xml/tny-session-camel.xml"> 58 64 <!ENTITY libtinymail-camel-TnyStreamCamel SYSTEM "xml/tny-stream-camel.xml"> … … 75 81 <!ENTITY libtinymailui-gtk-TnyGtkLockable SYSTEM "xml/tny-gtk-lockable.xml"> 76 82 <!ENTITY libtinymailui-gtk-TnyGtkPasswordDialog SYSTEM "xml/tny-gtk-password-dialog.xml"> 83 <!ENTITY libtinymailui-gtk-TnyGtkExpanderMimePartView SYSTEM "xml/tny-gtk-expander-mime-part-view.xml"> 84 <!ENTITY libtinymailui-gtk-TnyGtkPixbufStream SYSTEM "xml/tny-gtk-pixbuf-stream.xml"> 85 <!ENTITY libtinymailui-gtk-TnyGtkImageMimePartView SYSTEM "xml/tny-gtk-image-mime-part-view.xml"> 77 86 78 87 <!ENTITY libtinymailui-TnyMimePartSaver SYSTEM "xml/tny-mime-part-saver.xml"> … … 163 172 &libtinymail-TnyFolderStoreChange; 164 173 &libtinymail-TnyPasswordGetter; 174 &libtinymail-TnyConnectionPolicy; 165 175 &libtinymail-TnyEnums; 166 176 &libtinymail-TnyShared; … … 197 207 &libtinymailui-gtk-TnyGtkLockable; 198 208 &libtinymailui-gtk-TnyGtkPasswordDialog; 209 &libtinymailui-gtk-TnyGtkExpanderMimePartView; 210 &libtinymailui-gtk-TnyGtkPixbufStream; 211 &libtinymailui-gtk-TnyGtkImageMimePartView; 199 212 &libtinymailui-gtk-TnyGtkEnums; 200 213 </chapter> … … 252 265 &libtinymail-camel-TnyCamelMimePart; 253 266 &libtinymail-camel-TnyCamelMsg; 267 &libtinymail-camel-TnyCamelDefaultConnectionPolicy; 268 &libtinymail-camel-TnyCamelRecoverConnectionPolicy; 269 &libtinymail-camel-TnyCamelBsMimePart; 270 &libtinymail-camel-TnyCamelBsMsgReceiveStrategy; 271 &libtinymail-camel-TnyCamelBsMsg; 254 272 &libtinymail-camel-TnySessionCamel; 255 273 &libtinymail-camel-TnyStreamCamel; trunk/docs/devel/reference/tmpl/tny-account-store.sgml
r3143 r3151 49 49 50 50 </para> 51 52 @: 51 53 52 54 @tnyaccountstore: the object which received the signal. trunk/docs/devel/reference/tmpl/tny-account.sgml
r3150 r3151 28 28 29 29 </para> 30 31 @:32 30 33 31 @tnyaccount: the object which received the signal. trunk/docs/devel/reference/tmpl/tny-device.sgml
r3143 r3151 36 36 37 37 </para> 38 39 @: 40 @: 38 41 39 42 @tnydevice: the object which received the signal. trunk/docs/devel/reference/tmpl/tny-send-queue.sgml
r3143 r3151 40 40 </para> 41 41 42 @:43 @:44 @:45 @:46 47 42 @tnysendqueue: the object which received the signal. 48 43 @arg1: … … 54 49 55 50 </para> 56 57 @:58 @:59 @:60 @:61 @:62 51 63 52 @tnysendqueue: the object which received the signal. … … 71 60 72 61 </para> 73 74 @:75 @:76 @:77 @:78 @:79 62 80 63 @tnysendqueue: the object which received the signal. trunk/docs/devel/reference/tmpl/tny-shared.sgml
r3143 r3151 54 54 </para> 55 55 56 @ :56 @tnyaccountstore: the object which received the signal. 57 57 58 58 <!-- ##### STRUCT TnyAccountStoreIface ##### --> … … 259 259 </para> 260 260 261 @ tnyaccount: the object which received the signal.261 @: 262 262 263 263 <!-- ##### SIGNAL TnyAccount::connection-status-changed ##### --> … … 318 318 </para> 319 319 320 @ :321 @ :320 @tnydevice: the object which received the signal. 321 @arg1: 322 322 323 323 <!-- ##### STRUCT TnyDeviceIface ##### --> … … 490 490 </para> 491 491 492 @ tnysendqueue: the object which received the signal.493 @ arg1:494 @ arg2:495 @ arg3:492 @: 493 @: 494 @: 495 @: 496 496 497 497 <!-- ##### SIGNAL TnySendQueue::msg-sending ##### --> … … 500 500 </para> 501 501 502 @ tnysendqueue: the object which received the signal.503 @ arg1:504 @ arg2:505 @ arg3:506 @ arg4:502 @: 503 @: 504 @: 505 @: 506 @: 507 507 508 508 <!-- ##### SIGNAL TnySendQueue::msg-sent ##### --> … … 511 511 </para> 512 512 513 @ tnysendqueue: the object which received the signal.514 @ arg1:515 @ arg2:516 @ arg3:517 @ arg4:513 @: 514 @: 515 @: 516 @: 517 @: 518 518 519 519 <!-- ##### STRUCT TnySendQueueIface ##### --> … … 744 744 745 745 @self: 746 @cancel ed:746 @cancelled: 747 747 @err: 748 748 @user_data: … … 755 755 756 756 @self: 757 @cancel ed:757 @cancelled: 758 758 @new_folder: 759 759 @err: … … 767 767 768 768 @self: 769 @cancelled: 769 770 @stream: 770 @canceled:771 771 @err: 772 772 @user_data: … … 779 779 780 780 @self: 781 @cancel ed:781 @cancelled: 782 782 @headers: 783 783 @err: … … 792 792 793 793 @folder: the #TnyFolder instance from which the message was requested 794 @cancel ed:794 @cancelled: 795 795 @msg: the #TnyMsg instance that was requested 796 796 @err: in case there was an error, this !GError instance is not NULL … … 805 805 806 806 @folder: the #TnyFolder instance from which the messages where transferred 807 @cancel ed:807 @cancelled: 808 808 @err: in case there was an error, this !GError instance is not NULL 809 809 @user_data: user data passed at the caller … … 826 826 827 827 @self: the #TnyFolderStore from which the child folders where requested 828 @cancel ed:828 @cancelled: 829 829 @list: a #TnyList with #TnyFolder instances (the requested children of @self) 830 830 @err: in case there was an error, this !GError instance is not NULL … … 838 838 839 839 @self: 840 @cancel ed:840 @cancelled: 841 841 @into: 842 842 @new_folder: … … 851 851 852 852 @self: 853 @cancel ed:853 @cancelled: 854 854 @msg: 855 855 @err: trunk/libtinymail-camel/tny-camel-bs-mime-part.c
r3070 r3151 472 472 473 473 if (info->callback) { 474 info->callback (TNY_MIME_PART (info->self), TNY_STREAM (info->stream), 475 info->cancelled, info->err, info->user_data); 474 info->callback (TNY_MIME_PART (info->self), 475 info->cancelled, TNY_STREAM (info->stream), 476 info->err, info->user_data); 476 477 } 477 478 … … 510 511 if (info->callback) { 511 512 tny_lockable_lock (info->session->priv->ui_lock); 512 info->callback (TNY_MIME_PART (info->self), TNY_STREAM (info->stream), TRUE, info->err, info->user_data); 513 info->callback (TNY_MIME_PART (info->self), TRUE, 514 TNY_STREAM (info->stream), info->err, 515 info->user_data); 513 516 tny_lockable_unlock (info->session->priv->ui_lock); 514 517 } trunk/libtinymail-camel/tny-camel-mime-part.c
r3148 r3151 224 224 if (info->callback) { 225 225 /* TODO: tny_lockable_lock (priv->ui_locker); */ 226 info->callback (TNY_MIME_PART (info->self), TNY_STREAM (info->stream),227 FALSE, info->err, info->user_data);226 info->callback (TNY_MIME_PART (info->self), 227 FALSE, TNY_STREAM (info->stream), info->err, info->user_data); 228 228 /* TODO: tny_lockable_unlock (priv->ui_locker); */ 229 229 } trunk/libtinymail-queues/tny-get-msg-queue.c
r2825 r3151 90 90 91 91 if (info->callback && info->folder) 92 info->callback (info->folder, FALSE, msg, &info->err, info->user_data);92 info->callback (info->folder, FALSE, msg, info->err, info->user_data); 93 93 94 94 if (msg) … … 242 242 243 243 static void 244 refresh_done (TnyFolder *folder, gboolean cancelled, GError * *err, gpointer user_data)244 refresh_done (TnyFolder *folder, gboolean cancelled, GError *err, gpointer user_data) 245 245 { 246 246 IntFolderMonitor *mon = user_data; trunk/libtinymail/tny-folder-store.c
r3150 r3151 205 205 return retval; 206 206 } 207 208 209 210 /** 211 * TnyCreateFolderCallback: 212 * @self: a #TnyFolderStore that caused the callback 213 * @cancelled: if the operation got cancelled 214 * @new_folder (null-ok): a newly created #TnyFolder or NULL 215 * @err (null-ok): if an error occurred 216 * @user_data (null-ok): user data that was passed to the callbacks 217 * 218 * A folder store callback for when a folder creation was requested. If allocated, 219 * you must cleanup @user_data at the end of your implementation of the callback. 220 * All other fields in the parameters of the callback are read-only. 221 * 222 * When cancelled, @cancelled will be TRUE while @err might nonetheless be NULL. 223 * If @err is not NULL, an error occurred that you should handle gracefully. 224 * The @new_folder folder parameter will only not be NULL if the creation of the 225 * folder in @self was considered successful. 226 * 227 * since: 1.0 228 * audience: application-developer 229 **/ 207 230 208 231 /** … … 289 312 return; 290 313 } 314 315 316 317 /** 318 * TnyGetFoldersCallback: 319 * @self: a #TnyFolderStore that caused the callback 320 * @cancelled: if the operation got cancelled 321 * @list (null-ok): a #TnyList with fetched #TnyFolder instances or NULL 322 * @err (null-ok): if an error occurred 323 * @user_data (null-ok): user data that was passed to the callbacks 324 * 325 * A folder store callback for when a list of folders was requested. If allocated, 326 * you must cleanup @user_data at the end of your implementation of the callback. 327 * All other fields in the parameters of the callback are read-only. 328 * 329 * When cancelled, @cancelled will be TRUE while @err might nonetheless be NULL. 330 * If @err is not NULL, an error occurred that you should handle gracefully. 331 * The @list parameter might be NULL in case of cancellation or error. If not 332 * NULL it contains the list of folders in @self that got fetched during the 333 * request. 334 * 335 * since: 1.0 336 * audience: application-developer 337 **/ 291 338 292 339 /** trunk/libtinymail/tny-folder.c
r3150 r3151 41 41 #include <tny-folder.h> 42 42 guint tny_folder_signals [TNY_FOLDER_LAST_SIGNAL]; 43 43 44 44 45 … … 372 373 return retval; 373 374 } 375 376 377 /** 378 * TnyCopyFolderCallback: 379 * @self: a #TnyFolder that caused the callback 380 * @cancelled: if the operation got cancelled 381 * @into (null-ok): where @self got copied to 382 * @new_folder (null-ok): the new folder in @into 383 * @err (null-ok): if an error occurred 384 * @user_data (null-ok): user data that was passed to the callbacks 385 * 386 * A folder callback for when a copy of a folder was requested. If allocated, 387 * you must cleanup @user_data at the end of your implementation of the callback. 388 * All other fields in the parameters of the callback are read-only. 389 * 390 * When cancelled, @cancelled will be TRUE while @err might nonetheless be NULL. 391 * If @err is not NULL, an error occurred that you should handle gracefully. 392 * The parameter @into is the #TnyFolderStore where you copied @self to. The 393 * parameter @new_folder is the folder instance in @into that got created by 394 * copying @self into it. 395 * 396 * Note that you should not use @self without care. It's possible that when you 397 * requested tny_folder_copy_async(), you specified to delete the original folder. 398 * Therefore will @self point to an instance that is about to be removed as an 399 * instance locally, and of which the remote folder has already been removed in 400 * case the copy was indeed successful and the requested included deleting the 401 * original. In such a case is @self as a folder not to be trusted any longer. 402 * In this case wont @self be NULL, but any operation that you'll do on it will 403 * yield unexpected and more importantly unspecified results. Please do not 404 * ignore this warning. 405 * 406 * since: 1.0 407 * audience: application-developer 408 **/ 374 409 375 410 … … 581 616 582 617 618 /** 619 * TnyFolderCallback: 620 * @self: a #TnyFolder that caused the callback 621 * @cancelled: if the operation got cancelled 622 * @err (null-ok): if an error occurred 623 * @user_data (null-ok): user data that was passed to the callbacks 624 * 625 * A generic folder callback. If allocated, you must cleanup @user_data at the 626 * end of your implementation of the callback. All other fields in the parameters 627 * of the callback are read-only. 628 * 629 * since: 1.0 630 * audience: application-developer 631 **/ 632 583 633 /** 584 634 * tny_folder_add_msg_async: … … 994 1044 } 995 1045 1046 /** 1047 * TnyTransferMsgsCallback: 1048 * @self: a #TnyFolder that caused the callback 1049 * @cancelled: if the operation got cancelled 1050 * @err (null-ok): if an error occurred 1051 * @user_data (null-ok): user data that was passed to the callbacks 1052 * 1053 * A folder callback for when a transfer of messages was requested. If allocated, 1054 * you must cleanup @user_data at the end of your implementation of the callback. 1055 * All other fields in the parameters of the callback are read-only. 1056 * 1057 * When cancelled, @cancelled will be TRUE while @err might nonetheless be NULL. 1058 * If @err is not NULL, an error occurred that you should handle gracefully. 1059 * 1060 * since: 1.0 1061 * audience: application-developer 1062 **/ 1063 996 1064 /** 997 1065 * tny_folder_transfer_msgs_async: … … 1133 1201 } 1134 1202 1203 1204 /** 1205 * TnyGetMsgCallback: 1206 * @self: a #TnyFolder that caused the callback 1207 * @cancelled: if the operation got cancelled 1208 * @msg (null-ok): a #TnyMsg with the fetched message or NULL 1209 * @err (null-ok): if an error occurred 1210 * @user_data (null-ok): user data that was passed to the callbacks 1211 * 1212 * A folder callback for when a message fetch was requested. If allocated, you 1213 * must cleanup @user_data at the end of your implementation of the callback. All 1214 * other fields in the parameters of the callback are read-only. 1215 * 1216 * When cancelled, @cancelled will be TRUE while @err might nonetheless be NULL. 1217 * If @err is not NULL, an error occurred that you should handle gracefully. 1218 * The @msg parameter might be NULL in case of error or cancellation. 1219 * 1220 * since: 1.0 1221 * audience: application-developer 1222 **/ 1135 1223 1136 1224 /** … … 1231 1319 } 1232 1320 1321 /** 1322 * TnyGetHeadersCallback: 1323 * @self: a #TnyFolder that caused the callback 1324 * @cancelled: if the operation got cancelled 1325 * @headers (null-ok): a #TnyList with fetched #TnyHeader instances or NULL 1326 * @err (null-ok): if an error occurred 1327 * @user_data (null-ok): user data that was passed to the callbacks 1328 * 1329 * A folder callback for when headers where requested. If allocated, you must 1330 * cleanup @user_data at the end of your implementation of the callback. All 1331 * other fields in the parameters of the callback are read-only. 1332 * 1333 * When cancelled, @cancelled will be TRUE while @err might nonetheless be NULL. 1334 * If @err is not NULL, an error occurred that you should handle gracefully. 1335 * The @headers parameter might be NULL in case of error or cancellation. 1336 * 1337 * since: 1.0 1338 * audience: application-developer 1339 **/ 1233 1340 1234 1341 /** trunk/libtinymail/tny-shared.h
r3125 r3151 104 104 typedef struct _TnyConnectionPolicyIface TnyConnectionPolicyIface; 105 105 106 typedef void (*TnyStatusCallback) (GObject *self, TnyStatus *status, gpointer user_data); 107 106 108 typedef gchar* (*TnyGetPassFunc) (TnyAccount *self, const gchar *prompt, gboolean *cancel); 107 109 typedef void (*TnyForgetPassFunc) (TnyAccount *self); 108 typedef void (*TnyFolderCallback) (TnyFolder *self, gboolean canceled, GError *err, gpointer user_data); 109 typedef void (*TnyCreateFolderCallback) (TnyFolderStore *self, gboolean canceled, TnyFolder *new_folder, GError *err, gpointer user_data); 110 typedef void (*TnyMimePartCallback) (TnyMimePart *self, TnyStream *stream, gboolean canceled, GError *err, gpointer user_data); 111 typedef void (*TnyGetHeadersCallback) (TnyFolder *self, gboolean canceled, TnyList *headers, GError *err, gpointer user_data); 112 typedef void (*TnyGetMsgCallback) (TnyFolder *folder, gboolean canceled, TnyMsg *msg, GError *err, gpointer user_data); 113 typedef void (*TnyTransferMsgsCallback) (TnyFolder *folder, gboolean canceled, GError *err, gpointer user_data); 114 typedef void (*TnyStatusCallback) (GObject *self, TnyStatus *status, gpointer user_data); 115 typedef void (*TnyGetFoldersCallback) (TnyFolderStore *self, gboolean canceled, TnyList *list, GError *err, gpointer user_data); 116 typedef void (*TnyCopyFolderCallback) (TnyFolder *self, gboolean canceled, TnyFolderStore *into, TnyFolder *new_folder, GError *err, gpointer user_data); 117 typedef void (*TnySendQueueAddCallback) (TnySendQueue *self, gboolean canceled, TnyMsg *msg, GError *err, gpointer user_data); 110 111 typedef void (*TnyMimePartCallback) (TnyMimePart *self, gboolean cancelled, TnyStream *stream, GError *err, gpointer user_data); 112 113 typedef void (*TnyGetFoldersCallback) (TnyFolderStore *self, gboolean cancelled, TnyList *list, GError *err, gpointer user_data); 114 typedef void (*TnyCreateFolderCallback) (TnyFolderStore *self, gboolean cancelled, TnyFolder *new_folder, GError *err, gpointer user_data); 115 116 typedef void (*TnyFolderCallback) (TnyFolder *self, gboolean cancelled, GError *err, gpointer user_data); 117 typedef void (*TnyGetHeadersCallback) (TnyFolder *self, gboolean cancelled, TnyList *headers, GError *err, gpointer user_data); 118 typedef void (*TnyGetMsgCallback) (TnyFolder *folder, gboolean cancelled, TnyMsg *msg, GError *err, gpointer user_data); 119 typedef void (*TnyTransferMsgsCallback) (TnyFolder *folder, gboolean cancelled, GError *err, gpointer user_data); 120 typedef void (*TnyCopyFolderCallback) (TnyFolder *self, gboolean cancelled, TnyFolderStore *into, TnyFolder *new_folder, GError *err, gpointer user_data); 121 122 typedef void (*TnySendQueueAddCallback) (TnySendQueue *self, gboolean cancelled, TnyMsg *msg, GError *err, gpointer user_data); 118 123 119 124 G_END_DECLS trunk/libtinymailui-gtk/tny-gtk-image-mime-part-view.c
r3070 r3151 80 80 81 81 static void 82 on_mime_part_decoded (TnyMimePart *part, TnyStream *dest, gboolean canceled, GError *err, gpointer user_data)82 on_mime_part_decoded (TnyMimePart *part, gboolean canceled, TnyStream *dest, GError *err, gpointer user_data) 83 83 { 84 84 TnyMimePartView *self = (TnyMimePartView *) user_data; trunk/libtinymailui/tny-account-store-view.c
r2825 r3151 18 18 */ 19 19 20 21 /** 22 * TnyAccountStoreView: 23 * 24 * A view for a #TnyAccountStore 25 * 26 * free-function: g_object_unref 27 **/ 28 20 29 #include <config.h> 21 30 … … 25 34 /** 26 35 * tny_account_store_view_set_account_store: 27 * @self: A #TnyAccountStoreView instance28 * @account_store: A #TnyAccountStore instace36 * @self: A #TnyAccountStoreView 37 * @account_store: A #TnyAccountStore 29 38 * 30 39 * Set the account store of the view. 31 40 * 32 * Implementors: This should let @self display @account_store. 41 * since: 1.0 42 * audience: application-developer, type-implementer 33 43 **/ 34 44 void trunk/libtinymailui/tny-header-view.c
r2825 r3151 18 18 */ 19 19 20 21 /** 22 * TnyHeaderView: 23 * 24 * A view for a #TnyHeader 25 * 26 * free-function: g_object_unref 27 **/ 28 20 29 #include <config.h> 21 30 … … 24 33 /** 25 34 * tny_header_view_clear: 26 * @self: A #TnyHeaderView instance35 * @self: A #TnyHeaderView 27 36 * 28 * Clear @self (show nothing)37 * Clear @self, show nothing 29 38 * 30 * Implementors: this method should clear view @self (display nothing and 31 * clearup) 32 * 39 * since: 1.0 40 * audience: application-developer, type-implementer 33 41 **/ 34 42 void … … 47 55 /** 48 56 * tny_header_view_set_header: 49 * @self: A #TnyHeaderView instance50 * @header: A #TnyHeader instace57 * @self: A #TnyHeaderView 58 * @header: A #TnyHeader 51 59 * 52 60 * Set @self to display @header 53 61 * 54 * Implementors: this method should cause @self to show @header to the user. 55 * This typically means showing the from, to, subject, date and cc labels. 62 * Note that the #TnyHeaderView type is often used in a composition with a 63 * #TnyMsgView type (the #TnyMsgView implementation contains or aggregates a 64 * #TnyHeaderView). 56 65 * 57 * The #TnyHeaderView type is often used in a composition with a #TnyMsgView 58 * type (the #TnyMsgView implementation contains or aggregates a #TnyHeaderView). 59 * 66 * since: 1.0 67 * audience: application-developer, type-implementer 60 68 **/ 61 69 void trunk/libtinymailui/tny-mime-part-save-strategy.c
r2825 r3151 18 18 */ 19 19 20 /** 21 * TnyMimePartSaveStrategy: 22 * 23 * A strategy for saving a #TnyMimePart 24 * 25 * free-function: g_object_unref 26 **/ 27 20 28 #include <config.h> 21 29 … … 24 32 /** 25 33 * tny_mime_part_save_strategy_perform_save: 26 * @self: A #TnyMimePartSaveStrategy instance27 * @part: The #TnyMimePart instancethat must be saved34 * @self: a #TnyMimePartSaveStrategy 35 * @part: a #TnyMimePart that must be saved 28 36 * 29 37 * With @self being a delegate of a #TnyMimePartSaver, this method performs the … … 31 39 * 32 40 * A save strategy for a mime part is used with a type that implements the 33 * #TnyMimePartSaver interface. Types that do, will often also implement the 34 * #TnyMsgView or #TnyMimePartView interface (it's not a requirement). In this 35 * case they say that the view has functionality for saving mime parts. 36 * 37 * You can for example inherit an implementation of a #TnyMsgView, like the 38 * #TnyGtkMsgView one, and let yours also implement #TnyMimePartSaver. The 39 * example shown here is for example such a situation. 41 * #TnyMimePartSaver interface. Very often are such types also implementing the 42 * #TnyMsgView and/or #TnyMimePartView interfaces (although it's not a 43 * requirement). When implementing #TnyMimePartSaver you say that the view has 44 * functionality for saving mime parts. 40 45 * 41 46 * Example: … … 45 50 * { 46 51 * TnyMyMsgView *self = TNY_MY_MSG_VIEW (self_i); 47 * tny_mime_part_save_strategy_perform_save (self->mime_part_save_strategy, attachment); 52 * tny_mime_part_save_strategy_perform_save (self->mime_part_save_strategy, 53 * attachment); 48 54 * } 49 55 * </programlisting></informalexample> 50 56 * 51 * Implementors: The idea is that devices can have specific strategies that can 52 * be changed at runtime. 53 * 54 * For example a strategy that sends it to another computer and/or a strategy 55 * that saves it to a flash disk. Configurable at runtime by simply switching 56 * the strategy property of a #TnyMimePartSaver. 57 * 58 * The implementation shown in this example implements it using the gtk+ toolkit. 59 * If your device doesn't support saving mime parts, saving a mime part can also 60 * be implemented by doing nothing. For example a #TnyMyDoNothingSaveStrategy. 61 * Maybe you will implement it by letting it contact a service and sending the 62 * mime part to it? It's up to you. 57 * Devices can have specific strategies that are changed at runtime. For example 58 * a save-strategy that sends the content of the mime part it to another computer 59 * and/or a save-strategy that saves it to a flash disk. Configurable at runtime 60 * by simply switching the save-strategy property of a #TnyMimePartSaver. 63 61 * 64 62 * Example: … … 69 67 * GtkFileChooserDialog *dialog; 70 68 * dialog = GTK_FILE_CHOOSER_DIALOG 71 * (gtk_file_chooser_dialog_new (_(" MimePartSave File"), NULL,69 * (gtk_file_chooser_dialog_new (_("Save attachment"), NULL, 72 70 * GTK_FILE_CHOOSER_ACTION_MIME_PART_SAVE, 73 71 * GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_MIME_PART_SAVE, … … 75 73 * gtk_file_chooser_set_current_name (dialog, 76 74 * tny_mime_part_get_filename (part)); 77 * if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) 78 * { 75 * if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { 79 76 * gchar *uri; int fd; 80 77 * uri = gtk_file_chooser_get_filename (dialog); … … 82 79 * if (fd != -1) { 83 80 * TnyStream *stream = tny_fs_stream_new (fd); 84 * tny_mime_part_decode_to_stream (part, TNY_STREAM (stream));85 * g_object_unref ( G_OBJECT (stream));81 * tny_mime_part_decode_to_stream (part, stream); 82 * g_object_unref (stream); 86 83 * } 87 84 * } … … 90 87 * </programlisting></informalexample> 91 88 * 92 * The method is typically called by the implementation of a #TnyMsgView. 93 * For example a clicked handler of a popup menu of a attachment view in your 94 * #TnyMsgView implementation. 89 * An example when to use this method is in a clicked handler of a popup menu 90 * of a attachment #TnyMimePartView in your #TnyMsgView. 95 91 * 96 92 * Note that a mime part can mean both the entire message (without its headers) … … 98 94 * case of a messge/rfc822 mime part). 99 95 * 100 * A #TnyMsg inherits from #TnyMimePart which means that if you use the message 101 * instance with a #TnyMimePartSaveStrategy instance that the strategy for 102 * saving it must save the entire message. Whereas when you pass it just one 103 * individual mime part instance, the strategy must save only that part. 96 * since: 1.0 97 * audience: application-developer, type-implementer 104 98 **/ 105 99 void trunk/libtinymailui/tny-mime-part-saver.c
r2825 r3151 18 18 */ 19 19 20 /** 21 * TnyMimePartSaver: 22 * 23 * A type that can save a #TnyMimePart 24 * 25 * free-function: g_object_unref 26 **/ 27 20 28 #include <config.h> 21 29 … … 25 33 /** 26 34 * tny_mime_part_saver_set_save_strategy: 27 * @self: A #TnyMimePartSaver instance28 * @strategy: A TnyMimePartSaveStrategy instace35 * @self: a #TnyMimePartSaver 36 * @strategy: a #TnyMimePartSaveStrategy 29 37 * 30 38 * Set the strategy for saving mime-parts 31 39 * 32 * Implementors: This method must set (store) the strategy for saving a 33 * mime-part. 40 * Devices can have a specific strategy for storing a #TnyMimePart. For example 41 * a strategy that sends it to another computer or a strategy that saves it to 42 * a flash disk. In the message view component, you don't care about that: You 43 * only care about the API of the save-strategy interface. 44 * 45 * For more information take a look at tny_mime_part_save_strategy_perform_save() 46 * of #TnyMimePartSaveStrategy. 47 * 34 48 * 35 49 * Example: … … 40 54 * TnyMyMsgView *self = TNY_MY_MSG_VIEW (self_i); 41 55 * if (self->save_strategy) 42 * g_object_unref ( G_OBJECT (self->save_strategy));43 * self->save_strategy = g_object_ref ( G_OBJECT (strat));56 * g_object_unref (self->save_strategy); 57 * self->save_strategy = g_object_ref (strat); 44 58 * } 45 59 * static void … … 47 61 * { 48 62 * if (self->save_strategy)) 49 * g_object_unref ( G_OBJECT (self->save_strategy));63 * g_object_unref (self->save_strategy); 50 64 * } 51 65 * </programlisting></informalexample> 52 66 * 53 * The idea is that devices can have a specific such strategy. For example a 54 * strategy that sends it to another computer or a strategy that saves it to 55 * a flash disk. However. In the message view component, you don't care about 56 * that. You only care about the API of the save-strategy interface. 57 * 58 * For more information take a look at tny_mime_part_save_strategy_perform_save 59 * of #TnyMimePartSaveStrategy. 60 * 67 * since: 1.0 68 * audience: application-developer, type-implementer 61 69 **/ 62 70 void … … 76 84 /** 77 85 * tny_mime_part_saver_get_save_strategy: 78 * @self: A #TnyMsgView instance86 * @self: a #TnyMsgView 79 87 * 80 * Get the strategy for saving mime-parts. The return value must be88 * Get the strategy for saving mime-parts. The returned value must be 81 89 * unreferenced after use. 90 * 91 * For more information take a look at tny_mime_part_save_strategy_perform_save() 92 * of #TnyMimePartSaveStrategy. 82 93 * 83 94 * Example: … … 88 99 * TnyMimePartSaveStrategy *strategy = tny_mime_part_saver_get_save_strategy (self); 89 100 * tny_save_strategy_save (strategy, attachment); 90 * g_object_unref ( G_OBJECT (strategy));101 * g_object_unref (strategy); 91 102 * } 92 103 * </programlisting></informalexample> 93 104 * 94 * Implementors: This method must return the strategy for saving a mime-part. 95 * being the implementer, you must add a reference before returning the instance. 96 * 97 * Example: 98 * <informalexample><programlisting> 99 * static *TnyMimePartSaveStrategy 100 * tny_my_msg_view_get_save_strategy (TnyMimePartSaver *self_i) 101 * { 102 * TnyMyMsgView *self = TNY_MY_MSG_VIEW (self_i); 103 * return TNY_MIME_PART_SAVE_STRATEGY (g_object_ref (self->mime_part_save_strategy)); 104 * } 105 * </programlisting></informalexample> 106 * 107 * For more information take a look at tny_mime_part_save_strategy_perform_save 108 * of #TnyMimePartSaveStrategy. 109 * 110 * Return value: the #TnyMimePartSaveStrategy for @self 105 * returns (caller-owns): the #TnyMimePartSaveStrategy for @self 106 * since: 1.0 107 * audience: application-developer, type-implementer 111 108 **/ 112 109 TnyMimePartSaveStrategy* … … 124 121 /** 125 122 * tny_mime_part_saver_save: 126 * @self: A #TnyMimePartSaver instance127 * @part: A #TnyMimePart instace123 * @self: a #TnyMimePartSaver 124 * @part: a #TnyMimePart 128 125 * 129 * Saves @mime_part using the save strategy 126 * Saves @mime_part using the save strategy of @self. 130 127 * 128 * since: 1.0 129 * audience: application-developer, type-implementer 131 130 **/ 132 131 void … … 179 178 } 180 179 181 trunk/libtinymailui/tny-mime-part-view.c
r3070 r3151 18 18 */
