Changeset 1339
- Timestamp:
- 12/25/06 22:25:16
- Files:
-
- trunk/libtinymail-camel/tny-camel-mime-part.c (modified) (3 diffs)
- trunk/libtinymail-camel/tny-camel-mime-part.h (modified) (1 diff)
- trunk/libtinymail-camel/tny-camel-msg.c (modified) (2 diffs)
- trunk/libtinymail-camel/tny-camel-msg.h (modified) (1 diff)
- trunk/libtinymail-gnome-desktop/tny-gnome-platform-factory.c (modified) (4 diffs)
- trunk/libtinymail-gpe/tny-gpe-platform-factory.c (modified) (3 diffs)
- trunk/libtinymail-maemo/tny-maemo-platform-factory.c (modified) (3 diffs)
- trunk/libtinymail-olpc/tny-olpc-platform-factory.c (modified) (3 diffs)
- trunk/libtinymail-test/tny-list-test.c (modified) (1 diff)
- trunk/libtinymail-test/tny-mime-part-test.c (modified) (1 diff)
- trunk/libtinymail-test/tny-msg-test.c (modified) (1 diff)
- trunk/libtinymailui/tny-platform-factory.c (modified) (1 diff)
- trunk/libtinymailui/tny-platform-factory.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymail-camel/tny-camel-mime-part.c
r1327 r1339 105 105 106 106 } else 107 newpart = tny_camel_mime_part_new (tpart);107 newpart = tny_camel_mime_part_new_with_part (tpart); 108 108 109 109 tny_list_prepend (list, G_OBJECT (newpart)); … … 788 788 * tny_camel_mime_part_new: 789 789 * 790 * Return value: A new #TnyMimePart instance implemented for Camel 791 **/ 792 TnyMimePart* 793 tny_camel_mime_part_new (void) 794 { 795 TnyCamelMimePart *self = g_object_new (TNY_TYPE_CAMEL_MIME_PART, NULL); 796 CamelMimePart *cpart = camel_mime_part_new (); 797 798 _tny_camel_mime_part_set_part (self, cpart); 799 800 return TNY_MIME_PART (self); 801 } 802 803 804 /** 805 * tny_camel_mime_part_new_with_part: 806 * 790 807 * The #TnyMimePart implementation is actually a proxy for #CamelMimePart. 791 808 * … … 793 810 **/ 794 811 TnyMimePart* 795 tny_camel_mime_part_new (CamelMimePart *part)812 tny_camel_mime_part_new_with_part (CamelMimePart *part) 796 813 { 797 814 TnyCamelMimePart *self = g_object_new (TNY_TYPE_CAMEL_MIME_PART, NULL); trunk/libtinymail-camel/tny-camel-mime-part.h
r1327 r1339 74 74 GType tny_camel_mime_part_get_type (void); 75 75 76 TnyMimePart* tny_camel_mime_part_new (CamelMimePart *part); 76 TnyMimePart* tny_camel_mime_part_new_with_part (CamelMimePart *part); 77 TnyMimePart* tny_camel_mime_part_new (void); 77 78 78 79 CamelMimePart* tny_camel_mime_part_get_part (TnyCamelMimePart *self); trunk/libtinymail-camel/tny-camel-msg.c
r1240 r1339 227 227 TnyCamelMsg *self = g_object_new (TNY_TYPE_CAMEL_MSG, NULL); 228 228 229 _tny_camel_mime_part_set_part (TNY_CAMEL_MIME_PART (self), 230 CAMEL_MIME_PART (camel_mime_message_new ())); 231 229 232 tny_camel_msg_set_header (TNY_MSG (self), header); 230 233 … … 232 235 } 233 236 237 /** 238 * tny_camel_msg_new_with_part: 239 * @part: a #CamelMimePart object 240 * 241 * The #TnyMsg implementation is actually a proxy for #CamelMimePart. 242 * 243 * Return value: A new #TnyMsg instance implemented for Camel 244 **/ 245 TnyMsg* 246 tny_camel_msg_new_with_part (CamelMimePart *part) 247 { 248 TnyCamelMsg *self = g_object_new (TNY_TYPE_CAMEL_MSG, NULL); 249 250 _tny_camel_mime_part_set_part (TNY_CAMEL_MIME_PART (self), 251 CAMEL_MIME_PART (camel_mime_message_new ())); 252 253 return TNY_MSG (self); 254 } 255 256 /** 257 * tny_camel_msg_new_with_part_and_header: 258 * @part: a #CamelMimePart object 259 * @header: a #TnyHeader object 260 * 261 * The #TnyMsg implementation is actually a proxy for #CamelMimePart. 262 * 263 * Return value: A new #TnyMsg instance implemented for Camel 264 **/ 265 TnyMsg* 266 tny_camel_msg_new_with_part_and_header (CamelMimePart *part, TnyHeader *header) 267 { 268 TnyCamelMsg *self = g_object_new (TNY_TYPE_CAMEL_MSG, NULL); 269 270 _tny_camel_mime_part_set_part (TNY_CAMEL_MIME_PART (self), part); 271 tny_camel_msg_set_header (TNY_MSG (self), header); 272 273 return TNY_MSG (self); 274 } 234 275 235 276 static void trunk/libtinymail-camel/tny-camel-msg.h
r1194 r1339 61 61 TnyMsg* tny_camel_msg_new (void); 62 62 TnyMsg* tny_camel_msg_new_with_header (TnyHeader *header); 63 TnyMsg* tny_camel_msg_new_with_part (CamelMimePart *part); 64 TnyMsg* tny_camel_msg_new_with_part_and_header (CamelMimePart *part, TnyHeader *header); 65 63 66 64 67 G_END_DECLS trunk/libtinymail-gnome-desktop/tny-gnome-platform-factory.c
r1171 r1339 21 21 #include <tny-gnome-platform-factory.h> 22 22 23 #include <tny-account-store.h>24 23 #include <tny-gnome-account-store.h> 25 26 #include <tny-device.h>27 24 #include <tny-gnome-device.h> 28 29 #include <tny-msg-view.h> 25 #include <tny-camel-header.h> 26 #include <tny-camel-mime-part.h> 27 #include <tny-camel-msg.h> 30 28 31 29 #ifdef MOZEMBED … … 44 42 45 43 44 static TnyMsg* 45 tny_gnome_platform_factory_new_msg (TnyPlatformFactory *self) 46 { 47 return tny_camel_msg_new (); 48 } 49 50 51 static TnyMimePart* 52 tny_gnome_platform_factory_new_mime_part (TnyPlatformFactory *self) 53 { 54 return tny_camel_mime_part_new (); 55 } 56 57 58 static TnyHeader* 59 tny_gnome_platform_factory_new_header (TnyPlatformFactory *self) 60 { 61 return tny_camel_header_new (); 62 } 63 64 46 65 static TnyAccountStore* 47 66 tny_gnome_platform_factory_new_account_store (TnyPlatformFactory *self) 48 67 { 49 return TNY_ACCOUNT_STORE (tny_gnome_account_store_new ());68 return tny_gnome_account_store_new (); 50 69 } 51 70 … … 53 72 tny_gnome_platform_factory_new_device (TnyPlatformFactory *self) 54 73 { 55 return TNY_DEVICE (tny_gnome_device_new ());74 return tny_gnome_device_new (); 56 75 } 57 76 … … 102 121 klass->new_device_func = tny_gnome_platform_factory_new_device; 103 122 klass->new_msg_view_func = tny_gnome_platform_factory_new_msg_view; 123 klass->new_msg_func = tny_gnome_platform_factory_new_msg; 124 klass->new_mime_part_func = tny_gnome_platform_factory_new_mime_part; 125 klass->new_header_func = tny_gnome_platform_factory_new_header; 104 126 105 127 return; trunk/libtinymail-gpe/tny-gpe-platform-factory.c
r994 r1339 20 20 21 21 #include <tny-gpe-platform-factory.h> 22 23 #include <tny-account-store.h>24 22 #include <tny-gpe-account-store.h> 25 26 #include <tny-device.h>27 23 #include <tny-gpe-device.h> 28 29 #include <tny-msg-view.h>30 24 #include <tny-gtk-msg-view.h> 25 #include <tny-camel-header.h> 26 #include <tny-camel-mime-part.h> 27 #include <tny-camel-msg.h> 31 28 32 29 static GObjectClass *parent_class = NULL; … … 36 33 { 37 34 return; 35 } 36 37 38 39 static TnyMsg* 40 tny_gpe_platform_factory_new_msg (TnyPlatformFactory *self) 41 { 42 return tny_camel_msg_new (); 43 } 44 45 46 static TnyMimePart* 47 tny_gpe_platform_factory_new_mime_part (TnyPlatformFactory *self) 48 { 49 return tny_camel_mime_part_new (); 50 } 51 52 53 static TnyHeader* 54 tny_gpe_platform_factory_new_header (TnyPlatformFactory *self) 55 { 56 return tny_camel_header_new (); 38 57 } 39 58 … … 89 108 klass->new_device_func = tny_gpe_platform_factory_new_device; 90 109 klass->new_msg_view_func = tny_gpe_platform_factory_new_msg_view; 110 klass->new_msg_func = tny_gpe_platform_factory_new_msg; 111 klass->new_mime_part_func = tny_gpe_platform_factory_new_mime_part; 112 klass->new_header_func = tny_gpe_platform_factory_new_header; 91 113 92 114 return; trunk/libtinymail-maemo/tny-maemo-platform-factory.c
r994 r1339 21 21 #include <tny-maemo-platform-factory.h> 22 22 23 #include <tny-account-store.h>24 23 #include <tny-maemo-account-store.h> 25 26 #include <tny-device.h>27 24 #include <tny-maemo-device.h> 28 29 #include <tny-msg-view.h>30 25 #include <tny-gtk-msg-view.h> 26 #include <tny-camel-header.h> 27 #include <tny-camel-mime-part.h> 28 #include <tny-camel-msg.h> 31 29 32 30 static GObjectClass *parent_class = NULL; … … 36 34 { 37 35 return; 36 } 37 38 39 40 41 42 static TnyMsg* 43 tny_maemo_platform_factory_new_msg (TnyPlatformFactory *self) 44 { 45 return tny_camel_msg_new (); 46 } 47 48 49 static TnyMimePart* 50 tny_maemo_platform_factory_new_mime_part (TnyPlatformFactory *self) 51 { 52 return tny_camel_mime_part_new (); 53 } 54 55 56 static TnyHeader* 57 tny_maemo_platform_factory_new_header (TnyPlatformFactory *self) 58 { 59 return tny_camel_header_new (); 38 60 } 39 61 … … 91 113 klass->new_device_func = tny_maemo_platform_factory_new_device; 92 114 klass->new_msg_view_func = tny_maemo_platform_factory_new_msg_view; 115 klass->new_msg_func = tny_maemo_platform_factory_new_msg; 116 klass->new_mime_part_func = tny_maemo_platform_factory_new_mime_part; 117 klass->new_header_func = tny_maemo_platform_factory_new_header; 93 118 94 119 return; trunk/libtinymail-olpc/tny-olpc-platform-factory.c
r994 r1339 21 21 #include <tny-olpc-platform-factory.h> 22 22 23 #include <tny-account-store.h>24 23 #include <tny-olpc-account-store.h> 25 26 #include <tny-device.h>27 24 #include <tny-olpc-device.h> 28 29 #include <tny-msg-view.h>30 25 #include <tny-gtk-msg-view.h> 26 #include <tny-camel-header.h> 27 #include <tny-camel-mime-part.h> 28 #include <tny-camel-msg.h> 31 29 32 30 static GObjectClass *parent_class = NULL; … … 38 36 } 39 37 38 39 40 static TnyMsg* 41 tny_olpc_platform_factory_new_msg (TnyPlatformFactory *self) 42 { 43 return tny_camel_msg_new (); 44 } 45 46 47 static TnyMimePart* 48 tny_olpc_platform_factory_new_mime_part (TnyPlatformFactory *self) 49 { 50 return tny_camel_mime_part_new (); 51 } 52 53 54 static TnyHeader* 55 tny_olpc_platform_factory_new_header (TnyPlatformFactory *self) 56 { 57 return tny_camel_header_new (); 58 } 40 59 41 60 static TnyAccountStore* … … 91 110 klass->new_device_func = tny_olpc_platform_factory_new_device; 92 111 klass->new_msg_view_func = tny_olpc_platform_factory_new_msg_view; 112 klass->new_msg_func = tny_olpc_platform_factory_new_msg; 113 klass->new_mime_part_func = tny_olpc_platform_factory_new_mime_part; 114 klass->new_header_func = tny_olpc_platform_factory_new_header; 93 115 94 116 return; trunk/libtinymail-test/tny-list-test.c
r1336 r1339 119 119 if (num == 2) 120 120 { 121 *a = (GObject*) tny_camel_mime_part_new ( camel_mime_part_new ());122 *b = (GObject*) tny_camel_mime_part_new ( camel_mime_part_new ());123 *c = (GObject*) tny_camel_mime_part_new ( camel_mime_part_new ());124 *d = (GObject*) tny_camel_mime_part_new ( camel_mime_part_new ());121 *a = (GObject*) tny_camel_mime_part_new (); 122 *b = (GObject*) tny_camel_mime_part_new (); 123 *c = (GObject*) tny_camel_mime_part_new (); 124 *d = (GObject*) tny_camel_mime_part_new (); 125 125 } 126 126 trunk/libtinymail-test/tny-mime-part-test.c
r1309 r1339 41 41 camel_object_unref (CAMEL_OBJECT (addr)); 42 42 43 CamelMimePart *cpart = camel_mime_part_new (); 44 iface = TNY_MIME_PART (tny_camel_mime_part_new (cpart)); 43 iface = tny_camel_mime_part_new (); 45 44 46 45 return; trunk/libtinymail-test/tny-msg-test.c
r1334 r1339 75 75 gint length = 0; 76 76 TnyList *parts = tny_simple_list_new(); 77 CamelMimePart *cpart = camel_mime_part_new (); 78 TnyMimePart *part = TNY_MIME_PART (tny_camel_mime_part_new (cpart)); 77 TnyMimePart *part = tny_camel_mime_part_new_ (); 79 78 80 79 tny_mime_part_add_part (TNY_MIME_PART (iface), part); trunk/libtinymailui/tny-platform-factory.c
r1198 r1339 24 24 25 25 #include <tny-platform-factory.h> 26 27 28 /** 29 * tny_platform_factory_new_header: 30 * @self: a TnyPlatformFactory object 31 * 32 * Create a new #TnyMsg instance. The returned instance must be 33 * unreferenced after use. 34 * 35 * Implementors: when implementing a platform-specific library, return a 36 * new #TnyMsg instance. 37 * 38 * Return value: a #TnyMsg instance 39 **/ 40 TnyMsg* 41 tny_platform_factory_new_msg (TnyPlatformFactory *self) 42 { 43 #ifdef DEBUG 44 if (!TNY_PLATFORM_FACTORY_GET_IFACE (self)->new_msg_func) 45 g_critical ("You must implement tny_platform_factory_new_msg\n"); 46 #endif 47 48 return TNY_PLATFORM_FACTORY_GET_IFACE (self)->new_msg_func (self); 49 50 } 51 52 53 /** 54 * tny_platform_factory_new_header: 55 * @self: a TnyPlatformFactory object 56 * 57 * Create a new #TnyMimePart instance. The returned instance must be 58 * unreferenced after use. 59 * 60 * Implementors: when implementing a platform-specific library, return a 61 * new #TnyMimePart instance. 62 * 63 * Return value: a #TnyMimePart instance 64 **/ 65 TnyMimePart* 66 tny_platform_factory_new_mime_part (TnyPlatformFactory *self) 67 { 68 #ifdef DEBUG 69 if (!TNY_PLATFORM_FACTORY_GET_IFACE (self)->new_mime_part_func) 70 g_critical ("You must implement tny_platform_factory_new_mime_part\n"); 71 #endif 72 73 return TNY_PLATFORM_FACTORY_GET_IFACE (self)->new_mime_part_func (self); 74 } 75 76 /** 77 * tny_platform_factory_new_header: 78 * @self: a TnyPlatformFactory object 79 * 80 * Create a new #TnyHeader instance. The returned instance must be 81 * unreferenced after use. 82 * 83 * Implementors: when implementing a platform-specific library, return a 84 * new #TnyHeader instance. 85 * 86 * Return value: a #TnyHeader instance 87 **/ 88 TnyHeader* 89 tny_platform_factory_new_header (TnyPlatformFactory *self) 90 { 91 #ifdef DEBUG 92 if (!TNY_PLATFORM_FACTORY_GET_IFACE (self)->new_header_func) 93 g_critical ("You must implement tny_platform_factory_new_header\n"); 94 #endif 95 96 return TNY_PLATFORM_FACTORY_GET_IFACE (self)->new_header_func (self); 97 } 26 98 27 99 /** trunk/libtinymailui/tny-platform-factory.h
r900 r1339 45 45 TnyDevice* (*new_device_func) (TnyPlatformFactory *self); 46 46 TnyMsgView* (*new_msg_view_func) (TnyPlatformFactory *self); 47 TnyMsg* (*new_msg_func) (TnyPlatformFactory *self); 48 TnyMimePart* (*new_mime_part_func) (TnyPlatformFactory *self); 49 TnyHeader* (*new_header_func) (TnyPlatformFactory *self); 47 50 }; 48 51 … … 52 55 TnyDevice* tny_platform_factory_new_device (TnyPlatformFactory *self); 53 56 TnyMsgView* tny_platform_factory_new_msg_view (TnyPlatformFactory *self); 57 TnyMsg* tny_platform_factory_new_msg (TnyPlatformFactory *self); 58 TnyMimePart* tny_platform_factory_new_mime_part (TnyPlatformFactory *self); 59 TnyHeader* tny_platform_factory_new_header (TnyPlatformFactory *self); 60 54 61 55 62 G_END_DECLS
