aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-types.h
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagGNOME_LIBS_1_4_1_4nobody2001-05-231-79/+0
| | | | | | 'GNOME_LIBS_1_4_1_4'. svn path=/tags/GNOME_LIBS_1_4_1_4/; revision=9929
* new abstract class for disconnectable remote storesDan Winship2001-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-disco-store.c: new abstract class for disconnectable remote stores * camel-disco-folder.c: new abstract class for folders on disconnectable stores. * Makefile.am: Add camel-disco-folder.[ch] and camel-disco-store.[ch]. * providers/imap/camel-imap-store.c: Make this a subclass of CamelDiscoStore, and fix up the offline interfaces for the changes since they were first written (particularly the fact that some IMAP stores don't just use subscribed folders). * providers/imap/camel-imap-folder.c: Make this a subclass of CamelDiscoFolder, although most ops still fail in disconnected mode. * camel-store.c (camel_store_get_folder_info): Change gboolean, gboolean, gboolean to guint32 in the prototype for this function. * providers/local/camel-local-store.c (get_folder_info): Update for prototype change. svn path=/trunk/; revision=9659
* AddedJeffrey Stedfast2001-03-151-0/+2
| | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-openssl.[c,h]: Added * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build. * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL svn path=/trunk/; revision=8710
* Oops. Make this a subclass of CamelTcpStream, not CamelStream.Jeffrey Stedfast2001-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type): Oops. Make this a subclass of CamelTcpStream, not CamelStream. * camel-types.h: Add the defs for CamelTcpStream and CamelTcpStreamRaw * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to the build. * camel-remote-store.c (remote_connect): Update to use CamelTcpStreams. * camel-tcp-stream-raw.c (stream_connect): Made cancellable by copying the currently used code in camel-remote-store.c. (stream_setsockopt): Oops, flags = fcntl (..., GET_FL); (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of CamelTcpStream, not CamelStream. svn path=/trunk/; revision=8697
* Delayed loading of IMAP message parts.Dan Winship2001-01-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-types.h: typedef CamelMessageInfo and CamelMessageContentInfo here * camel-folder-summary.h: Add a "size" field to CamelMessageContentInfo. * camel-folder-summary.c (camel_folder_summary_content_info_new, camel_folder_summary_content_info_free): Renamed and made non-static for providers that construct their own content info. (content_info_load, content_info_save): load/save size * camel-data-wrapper.c (camel_data_wrapper_is_offline): New function to return if a data wrapper's contents are "offline". (So that, for example, we don't make thumbnails of images that haven't been loaded off the IMAP server yet.) Defaults to FALSE. * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): Fix a bug in re-selecting a folder when messages have been expunged from it by another client in the meantime. (imap_get_message): Rewrite. If the message is larger than a certain size, just create a skeleton message containing CamelImapWrappers that will read parts as needed. This way, large attachments only need to be downloaded if the user looks at them, and multipart/alternative alternatives that aren't used will never be downloaded at all. (imap_update_summary): Rewrite this a bunch too to make the parsing more robust. * providers/imap/camel-imap-summary.c (CAMEL_IMAP_SUMMARY_VERSION): bump. (camel_imap_summary_new): Set build_content to TRUE. (content_info_load, content_info_save): Only save/load the content for messages that have it. (The content info gets created as a side effect of imap_get_message.) * providers/imap/camel-imap-utils.c (imap_parse_body): New routine (and helpers) to parse an IMAP 'body' FETCH response and fill in a CamelMessageContentInfo from it. * providers/imap/Makefile.am (libcamelimap_la_SOURCES, libcamelimap_la_HEADERS): add camel-imap-wrapper. svn path=/trunk/; revision=7557
* Remove this. It was only a thin wrapper around struct _header_content_typeDan Winship2000-12-291-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * gmime-content-field.[ch]: Remove this. It was only a thin wrapper around struct _header_content_type anyway, and didn't match the naming scheme of anything else. * Makefile.am: Remove gmime-content-field.[ch] * camel.h: Remove gmime-content-field.h * camel-types.h: Add CamelContentType as a typedef for struct _header_content_type (especially for use outside of camel). * camel-multipart.c: * camel-mime-part.c: * camel-mime-message.c: * camel-folder-summary.c: * camel-folder-search.c: * camel-data-wrapper.[ch]: Use CamelContentType and header_content_type_* functions rather than the GMime stuff. * camel-mime-part-utils.c: * camel-medium.c: Remove unused gmime-content-field.h include. svn path=/trunk/; revision=7186
* Implement a complete() function, now we need one. (filter): Upgraded toNot Zed2000-11-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-07 Not Zed <NotZed@HelixCode.com> * camel-mime-filter-bestenc.c (complete): Implement a complete() function, now we need one. (filter): Upgraded to match rfrc2045 properly. Checks also for length of line and valid CRLF sequences. (camel_mime_filter_bestenc_get_best_encoding): Do the work of working out what is the best encoding given what we found about the stream. * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a lookup table to get the encoding naem, and add the binary type. (camel_mime_part_encoding_from_string): Likewise for the reverse. * camel-mime-part.h: Added the binary encoding type, see rfc2045. * camel-mime-utils.c (header_param_list_format_append): Dont put a space before ;'s in parameter lists, makes them more readable/consistent. * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the old stuff, well removed it. (camel_mime_message_set_best_encoding): Added another argument that lets you select what you want to set the best of. i.e. for smtp transport we only need 7 bit, and dont need to optimise the charset (although of course, we should always). (find_best_encoding): Implement this feature, if we are not getting the best charset, use the one we have. (best_encoding): Set the charset on the part appropriately. Sigh, the interfaces for this are nonexistant. (find_best_encoding): Tell the bestenc filter that lf should be treated as crlf for the purposes of determining encodings. 2000-11-06 Not Zed <NotZed@HelixCode.com> * camel-charset-map.c (camel_charset_init): Init function for an iterative charset determinator. (camel_charset_step): Iterate another buffer. (camel_charset_mask): Removed, since it couldn't have worked. (camel_charset_best): Use the iterative interface to do the work. (camel_charset_best_name): Get the best name for a charset so far. * camel-mime-filter-bestenc.c: New class, a stream filter that can be used to memory-efficiently determine the best encoding and/or charset to use for a given stream of bytes. * Makefile.am (libcamelinclude_HEADERS): Added stream-null*. (libcamel_la_SOURCES): Added bestenc* * camel-stream-null.c: New class, a null-stream, that always succeeds, and never has any contents. * camel-stream.c: Minor pointless changes. Was going to do something else but changed my mind. Added trivial default implementations for all callbacks. * camel-mime-message.h: Cleaned up some old cruft. * camel-folder-summary.c (camel_folder_summary_format_address): address_list_format() no longer encodes, so we dont need to decode it. * camel-address.c (camel_address_unformat): New function, attempts to reverse the formatting process on display addresses. (camel_address_length): New function to get the number of addresses, without having to peek the structure. * camel-mime-message.c (camel_mime_message_set_from): Fix a typo. (camel_mime_message_finalize): Only unref from/reply_to if we have it. (camel_mime_message_set_recipients): New function - set the recipients as a CamelInternetAddress. This function effectively deprecates the older recipient setting functions. (camel_mime_message_add_recipient): What the hell, i'll bite the bullet. Terminate this function. The old api was ambiguious and inefficient and didn't work right anyway. (camel_mime_message_remove_recipient_address): And this one. (camel_mime_message_remove_recipient_name): And this one too. (camel_mime_message_set_recipients): If we set an empty header, then remove it from the header list. Allow a null receipient object to clear a header. (camel_mime_message_set_from): Likewise, if setting an empty from address. (camel_mime_message_encode_8bit_parts): Eeek!! camel_stream_mem_new_with_byte_array owns the byte_array we give it, so make sure we dont free any of it! (camel_mime_message_encode_8bit_parts): Infact, i'll just rewrite the whole lot, its a bit of a mess. Should really rename it and make it a little more useful too, lets see ... (best_encoding): This has a string interface? Oh boy. (camel_mime_message_foreach_part): New experimental function to iterate over all message parts. Might not remain. (camel_mime_message_has_8bit_parts): New implementation using foreach_part. Fixed a couple of problems. (find_best_encoding): New function, that finds the best encoding for a given part (will probably be moved to camel-mime-part), and also the best charset to use if it is a text part. Since one affects the other it is a two pass process, but uses streams and not memory to achieve this. (camel_mime_message_set_best_encoding): Uses the function above to configure an entire message for the best encoding possible given transport constraints. (camel_mime_message_encode_8bit_parts): Reimplemented to use the function above to perform the work. * camel-internet-address.c (camel_internet_address_format_address): Dont put <> around a lone address with no real name. (camel_internet_address_encode_address): Similarly. (internet_decode): Actually return the count of decoded addresses. (internet_unformat): Implement the unformatting routine. 2000-11-05 Not Zed <NotZed@HelixCode.com> * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get the internetaddress directly, rather than having to parse it itself. * camel-address.c (camel_address_format): Added a new function which will format address, suitable for display. (camel_address_cat): Concatentate 1 camel address onto another. It is upto the caller to ensure the addresses are of compatible types. (camel_address_new_clone): New function to create a new address by copying an existing one of the same type. (camel_address_copy): New helper function to copy an address. * camel-mime-message.h (struct _CamelMimeMessage): Removed cached copy of date string. (struct _CamelMimeMessage): Added date_received info. * camel-mime-message.c (camel_mime_message_get_date_string): Removed. Nothing uses it anyway, and it is redundant. (camel_mime_message_finalize): No more date_str. (camel_mime_message_init): No more date_str, initialise date_received* (write_to_stream): Change the check for a date header. (process_header): No longer track the date_str. (camel_mime_message_get_received_date): Removed. totally invalid anyway. (camel_mime_message_get_sent_date): Removed. Redundant. The only 'date' is the sent date, the received date is just made up. (camel_mime_message_get_date): Args changed to be more consistent with utility functions. (camel_mime_message_get_date): Dont set the date when we're asked for it (if its not set by the time its written, it'll be set then). (camel_mime_message_get_date_received): Actually do 'the right thing' here, if we have a received header, use that to determine the received date. And return the data in the same format as get_date. (camel_mime_message_set_from): Changed the api to better match what we should be doing. Pass a camelinternetaddress, etc. (camel_mime_message_set_reply_to): Cahnged similarly to take an internetaddress. (camel_mime_message_get_reply_to): Likewise. (camel_mime_message_finalize): Unref the from/reply_to objects. (format_address): Removed, no longer needed. (process_header): Changed to store the from/reply_to as internetaddress's. (write_to_stream): Set the from header directly to empty, if we dont have one. Maybe we should just abort, and/or create one based on the current user. * camel-mime-utils.c (header_address_list_format): Renamed to header_address_list_encode, which is what it is actually doing. (header_address_list_format_append): Similarly. (encoding_map[]): Removed, no longer used. (header_address_list_encode_append): Take another arg, do we encode the address (for internet), or not (for display - utf8 only). (header_address_list_format): Re-added this function, but now it generates a display version only. Surprise surprise, that is all anythign needs to generate anyway. Sigh. * camel-internet-address.c (camel_internet_address_get): Return false if we get an invalid index only. (camel_internet_address_encode_address): Helper function to encode a single address for mailing. (internet_encode): Use the above function to format it. (camel_internet_address_format_address): Format a single address for display. (internet_format): Implement the display version. (camel_internet_address_class_init): Init the internet_format virtual function. (internet_cat): Implement virtual function to concatenate addresses. * camel-folder-summary.c (camel_folder_summary_info_new_from_header): new function, only build the summary info, dont add it. (camel_folder_summary_info_new_from_parser): Likewise, for new info from parser. (camel_folder_summary_add_from_parser): Cahnged to call function above to build info. (camel_folder_summary_add_from_header): Changed to call function above, to build info. (camel_folder_summary_info_free): New function to free the summary message info. (camel_folder_summary_clear): Changed to clal above to free info. (camel_folder_summary_remove): Likewise. (camel_folder_summary_add): Cleaned up the clashing uid re-assignment logic a little bit. (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1. (camel_folder_summary_decode_time_t): Return -1 on error. (camel_folder_summary_encode_off_t): New function to encode an off_t type. (camel_folder_summary_decode_off_t): And likewise for the reverse. (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since we're now encoding time/off_t's right. (summary_header_save): Use time_t encoder to save the timestamp. (summary_header_load): Likewise for decoding the timestamp. (content_info_load): Decode off_t types directly, now we can. (content_info_save): And likewise for encoding. (camel_folder_summary_add_from_message): New function, create a summary item from an existing message and add it. (camel_folder_summary_info_new_from_message): New function, create a summary item from an existing message. (summary_build_content_info_message): New function to do the dirty work of building the conent info/indexing, from a message source. (format_recipients): Format an internetaddress suitable for the summary. (message_info_new_from_message): Build a new summary item from a mime message. (content_info_new_from_message): Build a new conent info from a mime part. (camel_folder_summary_class_init): Init the new class functions. (message_info_new_from_message): Fixed for message api change. Added documentation to the functions. svn path=/trunk/; revision=6474
* Use the linewrap filter to achieve full RFC0821 compliance.Jeffrey Stedfast2000-09-201-0/+1
| | | | | | | | | | | 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com> * providers/smtp/camel-smtp-transport.c (smtp_data): Use the linewrap filter to achieve full RFC0821 compliance. * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap. svn path=/trunk/; revision=5510
* Merge with camel-async.Peter Williams2000-08-111-1/+0
| | | | svn path=/trunk/; revision=4687
* New filter to do CRLF<->LF conversion. (Currently only tested in theDan Winship2000-06-131-0/+1
| | | | | | | | | | | | * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion. (Currently only tested in the LF->CRLF direction.) * camel-mime-part.c (write_to_stream): if content-type is text, and it's QP or B64 encoded, pass through the CRLF filter before the other filter to satisfy the "canonical encoding" rules in the MIME spec. svn path=/trunk/; revision=3529
* providers/imap/camel-imap-summary.c now buildsJeffrey Stedfast2000-06-081-0/+3
| | | | svn path=/trunk/; revision=3470
* remove get/set_output_stream operations. They're redundant withDan Winship2000-05-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-data-wrapper.c: remove get/set_output_stream operations. They're redundant with write_to_stream, and CamelMimePart and CamelMimeMessage only implement the latter, meaning that trying to get_output_stream on a CamelMimeMessage that was built from pieces rather than being parsed from a stream doesn't work. Anything that uses get_output_stream can be rewritten to use write_to_stream, so we'll standardize on that. (camel_data_wrapper_new): remove this: CamelDataWrapper is supposed to be an abstract class. (write_to_stream): remove default implementation. (Moved to CamelSimpleDataWrapper) * camel-simple-data-wrapper.c: resurrect, although it's not really the same thing it was before. A simple data wrapper, which is backed by a CamelStream. * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): Use construct_from_stream rather than set_output_stream. (camel_mime_part_construct_content_from_parser): Change camel_data_wrapper_new to camel_simple_data_wrapper_new. * camel-mime-part.c (camel_mime_part_set_content): Change camel_data_wrapper_new to camel_simple_data_wrapper_new. svn path=/trunk/; revision=3112
* Make camel not leak like a sieve.Dan Winship2000-05-081-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-object.c: New subclass of GtkObject which is now the base of the Camel object hierarchy. Currently the only difference between CamelObject and GtkObject is that CamelObjects don't start out floating. * *.h: Move a bunch of typedefs to camel-types.h. Standardize on using <camel/foo.h> in header files rather than <foo.h>, "foo.h", or "camel/foo.h". Remove some unneeded includes. * camel-address.c, camel-data-wrapper.c, camel-folder-search.c, camel-folder-summary.c, camel-folder.c, camel-mime-filter.c, camel-mime-parser.c, camel-service.c, camel-session.c, camel-stream.c: These are now subclasses of CamelObject. * camel-data-wrapper.c (set_output_stream): * camel-medium.c (set_content_object): * camel-seekable-substream.c (init_with_seekable_stream_and_bounds): * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): remove gtk_object_sink calls. * camel-stream-buffer.c (init_vbuf): * camel-stream-filter.c (camel_stream_filter_new_with_stream): ref the original stream. * camel-folder-summary.c (camel_folder_summary_finalise): unref the filters when finalizing. * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser, camel_mime_part_construct_content_from_parser): * camel-mime-part.c (camel_mime_part_set_content): Unref objects that are created only to be handed off to other objects. If they're going to be needed later, they will have been additionally ref'ed by the object that needs them. * providers/pop3/camel-pop3-folder.c (get_message_by_number): unref the message stream after creating the data from it. * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close, since its semantics are dubious (what happens when you close a stream other people still have references on?). * providers/nntp/camel-nntp-store.c: * providers/smtp/camel-smtp-transport.c: * providers/pop3/camel-pop3-store.c: replace camel_stream_close calls with gtk_object_unref. * providers/mbox/camel-mbox-folder.c: * providers/nntp/camel-nntp-folder.c: * providers/sendmail/camel-sendmail-transport.c: replace camel_stream_close with camel_stream_flush + gtk_object_unref svn path=/trunk/; revision=2882
* Remove. We weren't using the fields that made this different fromDan Winship2000-04-271-1/+0
| | | | | | | | | | | | | * camel-mime-body-part.[ch]: Remove. We weren't using the fields that made this different from camel-mime-part, so it basically just forced us to do lots of gratuitous typecasting. * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart parent stuff, since we weren't using that either. * etc: update for CamelMimeBodyPart -> CamelMimePart svn path=/trunk/; revision=2645
* This didn't belong in Camel. Move to mail/Dan Winship2000-04-151-1/+0
| | | | | | | | | | | 2000-04-14 Dan Winship <danw@helixcode.com> * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/ * Makefile.am, camel-types.h: remove references to camel-formatter. svn path=/trunk/; revision=2436
* Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it redundant.Dan Winship2000-03-281-1/+0
| | | | | | | * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it redundant. svn path=/trunk/; revision=2188
* Function to read one line of any size from a stream and return it inDan Winship2000-03-241-0/+1
| | | | | | | | | | | * camel-stream-buffer.c (camel_stream_buffer_read_line): Function to read one line of any size from a stream and return it in allocated memory. Also add camel-stream-buffer.h to camel.h and CamelStreamBuffer to camel-types.h. svn path=/trunk/; revision=2152
* Add CamelTransport abstract class and CamelSendmailTransportDan Winship2000-02-251-0/+1
| | | | svn path=/trunk/; revision=1921
* New header with the typedefs for all camel classes. Now the class headersDan Winship2000-02-191-0/+57
* camel/camel-types.h: New header with the typedefs for all camel classes. Now the class headers can just include this and the header for the parent type. This makes it possible for CamelService to include a CamelSession without creating an #include loop. * camel/*: * composer/e-msg-composer-attachment-bar.h: * mail/folder-browser.c: * mail/message-list.c: frob #includes to match the new reality svn path=/trunk/; revision=1850