aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-part.h
Commit message (Collapse)AuthorAgeFilesLines
* Dont try and check a NULL header.NotZed2000-04-281-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-27 NotZed <NotZed@HelixCode.com> * camel-mime-utils.c (check_header): Dont try and check a NULL header. * camel-recipient.[ch]: Dead. Its not pining. * camel-mime-message.h: Dont include recipients.h anymore. * camel-mime-message.c (camel_mime_message_add_recipient): Accept name/address separately, and store in an CamelInternetAddress. (add_recipient): Removed. (remove_recipient): Removed. (remove_recipient_address): Renamed from remove_receipient, works via address. (camel_mime_message_remove_recipient_name): New function to remove by name. (get_recipients): Removed. (camel_mime_message_get_recipients): Return a camel-internet-address. (write_to_stream): No longer write receipients directly. (write_recipients_to_stream): Removed. (write_one_recipient_to_stream): Removed. (camel_mime_message_init): Setup recipients hashtable, rather than usign the recipients stuff. (set_recipient_list_from_string): Killed, a violent and lengthy death. (process_header): Simplified recipient handling code a lot. (received_date_str, sent_date_str, reply_to_str, subject_str, from_str): Removed some oddly-defined global statics. (camel_mime_message_class_init): Dont initialise above variables anymore. (init_header_name_table): Removed, use a table to init this, and do it in class init (2 lines of code ...). * camel-news-address.c: Class to represent news addresses - currently empty, and not built. * camel-internet-address.h: Class to represent internet (email) addresses. * camel-address.h: Abstract class to represent (lists of) addresses. svn path=/trunk/; revision=2671
* Remove. We weren't using the fields that made this different fromDan Winship2000-04-271-0/+1
| | | | | | | | | | | | | * 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
* sink the content object after referencing it.Dan Winship2000-04-271-2/+4
| | | | | | | | | | | * camel-medium.c (set_content_object): sink the content object after referencing it. * camel-mime-part.c: fix various little things in the handling of CamelMedium methods. Change camel_mime_part_set_text to the more generic camel_mime_part_set_content. svn path=/trunk/; revision=2643
* Big cleanup of camel-stream-*, got rid of 3 classes, improved the interfaces,NotZed2000-04-261-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and fixed at least one problem (end of stream never happening in certain cases). Things that can fail now have a way of saying they failed too. So much for taking ANZAC day off to get drunk! 2000-04-26 NotZed <NotZed@HelixCode.com> * camel-seekable-substream.c (stream_seek): Changed to have absolute seek semantics, not relative to the bounds. * camel-seekable-stream.c (reset): When we reset, seek to the start of the bound, if there is one. (stream_tell): Make tell virtual. * camel-stream-filter.c (do_available): Removed. * camel-stream-buffer.c: Remove leading _'s from static functions. (stream_read): Renamed from read(). Fancy that conflicting! (my boo!) Others too. * providers/pop3/camel-pop3-folder.c (get_message_by_number): Changed to stream_mem interface. * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed for streamfs interface changes, and implement a failure case. (_append_message): Changed for fs stream interface change. * camel-multipart.c (print_part): Iterate rahter than callback. I hate glists's interface (hence, move this to write_to_stream). (write_to_stream): Return an error (yuck, this is a royal PITA to do with the stream write interface). * camel-mime-message.c: Removed leading _ from static names. * camel-mime-part.h: construct_from_parser() now returns an error code. * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Changed to use a camel-data-wrapper instead of a camel-simple-data-wrapper (no change needed elsewhere?). (simple_data_wrapper_construct_from_parser): Fixes for stream-mem interface changes. * camel-simple-data-wrapper.[ch], camel-simple-data-wrapper-stream.[ch], camel-stream-data-wrapper.[ch], removed. Fixed including of these files. * camel-mime-part.c (camel_mime_part_set_text): Remove the use of the camel-simple-data-wrapper-stream, just use a mem stream. (write_to_stream): Renamed from my_* (construct_from_stream): Return an error on error. * camel-stream-mem.c (camel_stream_mem_new*): Remove mode parameter. * camel-stream-mem.h (enum CamelStreamMemMode): Removed. It wasn't used at all. * camel-data-wrapper.h: Add camel_data_wrapper_new() to create these. (write_to_stream, construct_from_stream): Return an error indicator for success. Fixed all methods to match (ICK). * Makefile.am (libcamel_la_SOURCES): Remove camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c, camel-stream-data-wrapper.c. Obsoleted by code re-use! * camel-data-wrapper.c (construct_from_stream): Change the default implementation to just set the output stream == construction stream. Well, this lets me get rid of both simple-data-wrapper and stream-data-wrapper (unused anyway), and simple-data-wrapper-stream in one hit. CamelDataWrapper is now also a concrete class. (write_to_stream): Use camel_stream_write_to_stream() to calculate/return values (and save code). Include <errno.h> for obvious reasons. * camel-stream.c (eos): Provide a default implementation of .eos(). (camel_stream_write_to_stream): Make it return an error code on error. (camel_stream_printf): Changed to return the number of bytes written/error. (camel_stream_available): Removed. * camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to use unix modes and so forth (wasn't used for anything but new file creation and didn't work well either). * camel-stream-fs.c: Removed leading _'s for names. And removed some virtual method 'documentation'. (destroy): Dont try and close a closed/error fd. Only report error if close returns -1. Moved all the code to finalise(), and killed this function. (init_with_fd): Properly setup the seek offset, if it is a valid and seekable file descriptor. (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the seekable stream. (init_with_name): Return error codes. (init_with_name_and_bounds): Ditto. (camel_stream_fs_new_with_name): REturn NULL object if it failed. (camel_stream_fs_new_with_name_and_bounds): Return NULL object on failure. Changed with_name* api's to take unix open style args and flags. (read): The bounded stream bounds checking seemed off, simplified code a bit. (write): Implement bounds checking for writing, the comment was wrong, it could make sense to bound writing. Cleaned up a little. (available): Gone. (eos): Removed. Use CamelStream's implementation now. (close): Reset the fd to -1, provide a warning for bad usage. (seek): Cleaned up. Changed the behaviour a little, the returned offset is the absolute position in the file, even in bounded streams. (seek): Seek from end mirrors lseek() behaviour (reverse seeking). 2000-04-25 NotZed <NotZed@HelixCode.com> * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof indicator to other parent classes. * camel-stream.c (camel_stream_printf): New utility function. Obvious use. * camel-stream-mem.c: Removed leading _'s from static func's. (camel_stream_mem_new_with_byte_array): Fixed for api changes, set the owner for the byte array to us. : Removed A bunch of gtk doc stuff for static (implementation) functions. (available): Removed. (write): Fixed the write implementation so that seek() works on a seekable memory stream, as expected. Seeking past the end of the buffer has unix semantics (filling with 0). (available): Removed. (write): Implement seekable stream bounded stream. (read): Implement seekable stream bounded stream. (close): Dont free the stream_mem if we're not the owner. (seek): Allow to seek beyond the end of memory area, implement bounds checking. (seek): Set errno on bad policy. * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t. (new_with_buffer): Changed len to be a size_t. (set_buffer, set_byte_array): New interface functions. (struct _CamelStreamMem): Removed position, it is stored in the superclass. * camel-stream.h: Removed some of the seemingly random whitespace. Removed the available method (its not impelemented/useful enough). * camel-seekable-substream.c (init_with_seekable_stream_and_bounds): Remove the data_available stuff, it hasn't been properly implemented/finished, and may never work (unfortunately *sigh). (reemit_parent_signal): Removed part of the above change. (set_bounds): Removed (moved to seekable-stream). : Fixed up some of the generally unreadable indenting (sorry, wrapping at 80 characters with camels_really_long_function_names() just_doesnt_work_very_well_does_it(). (available): Removed. (stream_seek): Fixup for object changes. Make sure we return -1 if the parent stream can't seek. * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New function to bound any seekable stream. : Removed _'s. (camel_seekable_stream_class_init): Implement an init function, to setup the stream bounds to unbound. * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual method set_bounds for seekable streams. (CAMEL_STREAM_UNBOUND): New define for no bound. * camel-seekable-substream.h (struct _CamelSeekableSubstream): Removed sup_bound and inf_bound, moved to CamelSeekableStream (and renamed, and changed to off_t's). (new_with_seekable_stream_and_bounds): Use off_t as the bounds. (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual? Removed. * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek to accept an off_t as the offset. (struct _CamelSeekableStream): Renamed cur_pos to position and changed it to an off_t type. (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants from lseek(). (get_current_position): Renamed to tell(). * camel-stream-buffer.h: Commented out set_vbuf - never implemented. svn path=/trunk/; revision=2624
* No longer call data_wrapper_repository_init.NotZed2000-04-241-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-24 NotZed <NotZed@HelixCode.com> * camel.c (camel_init): No longer call data_wrapper_repository_init. * camel-medium.c (write_to_stream): Moved (back) to camel-mime-part. (add_header): (set_header): (remove_header): (get_header): Make all these abstract, and spit warnings if called. I guess it could manage the list, but well, it doesn't. * camel-medium.h (struct _CamelMedium): Dont store headers here, the implementor is the only one who knows their format. (CamelMediumClass): Changed header values to be void *'s. They need not be strings? * camel-simple-data-wrapper.c (construct_from_stream): And we're back. Set the output stream. (construct_from_parser): Moved to camel-mime-part-utils. * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Create the contents of multipart and simple messages. * camel-multipart.c (construct_from_parser): Moved to camel-mime-part-utils. (separate_part): Removed. * camel-mime-part.c (construct_from_stream): Back again! This now switches over to using a mime parser for any mime parts, only. (my_write_to_stream): Write our headers and so forth here. (add_header): Add header directly, parent class is abstract. (remove_header): Ditto. (set_header): Ditto. * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream): Remade abstract. (camel_data_wrapper_construct_from_parser): Moved to camel_mime_part. * camel-data-wrapper.h: Put back construct_from_stream. * camel-mime-part.h: Put construct_from_parser in here, the data-wrapper shouldn't know about mime. Ok, so now to undo half of the last hours changes ... duh. 2a51,93 * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use construct_from_stream instead of set_input_stream(). * camel-simple-data-wrapper-stream.c (camel_simple_data_wrapper_stream_construct): REmoved the destroy callback code. (wrapper_destroy_cb): Removed. * camel-simple-data-wrapper.h: Add prototype for _construct() method. * camel.c: Include unicode.h to kill a warning. * camel-data-wrapper.h (CameldataWrapperClass): Removed construct_from_stream virtual method. Removed get/set input stream. * data-wrapper-repository.[ch]: Removed&from build. Obsoleted? The justification as is follows: It is mixing storage protocol/format with message architecture. It really just doesn't serve any purpose, as each medium implementor will have to have its own type->handler mapping, and the only current implementor, mimepart has a very simple structure and no need for this. * camel-medium.c (write_to_stream): Moved here from most of the stuff in camel-mime-part. Well, the MEDIUM is the one that knows what the headers are, and the content is, let it write it out. * camel-mime-part-utils.c (camel_mime_part_construct_content): Copied from camel-mime-part.c, removed handling of message followon state (moved to camel-mime-message). (camel_mime_part_construct_content_from_parser): Renamed from construct_content. (camel_mime_part_construct_headers_from_stream): (camel_mime_part_construct_content_from_stream): (camel_mime_part_store_stream_in_buffer): Removed. Replaced by the new construct from parser stuff. * camel-mime-message.c (construct_from_parser): Do construct_from_parser for mime-message. (_write_to_stream): Set the mime-version header for medium to write out, rather than writing it out ourselves. 4a96,102 (construct_from_stream): Removed. (camel_data_wrapper_construct_from_stream): Changed to a helper function, creates a mime_parser, and constructs from that. (set_input_stream): Removed. (camel_data_wrapper_set_input_stream): Removed. (get_input_stream): Removed. (camel_data_wrapper_get_input_stream): Removed. 11a110,111 (_get_message_by_uid): Use construct_from_stream() instead of creating our own parser. 16a117,131 (camel_mime_part_construct_content): Removed to camel-mime-part-utils.c (my_get_output_stream): Removed. The streeam is in the data-wrapper. (my_get_content_object): Removed. The content object is stored in the medium. If none is there, the object wasn't created properly. (my_write_content_to_stream): Removed. The content object is the one that knows how to write itself out!!!!!!!! (my_write_to_stream): Remove the base header writing stuff - has been moved to camel-medium, where it belongs. This can just be used to check for mandatory headers. (my_construct_from_stream): Removed. (my_set_input_stream): What the hell, i'll remove this too. Nobody seems to understand how it differs from create from stream, and they both seem to serve the same purpose ... 19a135,136 (construct_from_stream): Removed! Job taken over by construct_from_parser. 24a142 (set_input_stream): REmoved. Replaced by construct_from_parser. svn path=/trunk/; revision=2577
* Ref the folder after setting it in the new message.NotZed2000-04-221-39/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-22 NotZed <NotZed@HelixCode.com> * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref the folder after setting it in the new message. * camel-mime-part.c (my_set_content_object): Have the headers follow the content-type change here too. (my_write_to_stream): Dont write content-type here, automatically stored in the headers ... (my_write_to_stream): Use header_disposition_format() to format the content-disposition header. (my_write_to_stream): Removed old code, all headers are now stored in the camel-medium level, always. Need to do the same with camel-mime-message i suppose ... * camel-mime-utils.c (header_content_type_is): Handle empty types. * gmime-content-field.c (gmime_content_field_write_to_stream): Use header_content_type_format() to format it. 2000-04-21 NotZed <NotZed@HelixCode.com> * camel-mime-utils.h: Add prototype for header_param_list_free. * camel-recipient.c: New function to remove all the types of a recipient list. I think this whole object needs a major review. * camel-mime-message.c (camel_mime_message_class_init): Removed parse_header_pair override, override add_header instead. (_parse_header_pair): Renamed to add_header. (remove_header): Add this method, to make sure we keep upto date with removed headers too. (_set_field): If given a NULL value, clear it out. (_set_recipient_list_from_string): Constify. (set_header): Override set_header from camel_medium. (process_header): Local function to handle set/add/remove of each header we know about. * camel-mime-part.c (camel_mime_part_class_init): Removed parse_header_pair setup. (my_parse_header_pair): Moved into add_header(), removed. (my_set_disposition): Allow a NULL disposition to clear it. (my_set_content_id): Allow NULL content id to clear it. (remove_header): Track removed headers. (my_set_description): Allow NULL description to clear it. (my_set_content_MD5): Make sure we copy the md5 value, and allow a NULL value to reset it. (my_set_filename): Copy the filename. (my_set_header_lines): Removed. Nothing uses it, it doesn't actually serve any purpose. (camel_mime_part_set_header_lines): Ditto. (my_get_header_lines): Ditto. (camel_mime_part_get_header_lines): Ditto. (camel_mime_part_class_init): Remove *_header_lines setup. (camel_mime_part_init): Remove header_lines init. (my_finalize): Remove header_lines finalise. (my_write_to_stream): Write the headers here. This is just WRONG, camel_medium should be doing this. (my_get_output_stream): Kill a warning. (camel_mime_part_encoding_to_string): Ditto. (camel_mime_part_set_description): Unvirtualiase, use add_header() to do the processing. (my_set_description): Removed. (set_disposition): Renamed from my_set_disposition. (camel_mime_part_get_description): Get the descriptionf rom the get_header method. (my_get_description): Removed. (my_set_filename): Removed. (camel_mime_part_get_filename): Get the parameter from the disposition. (camel_mime_part_encoding_from_string): Handle NULL string. (camel_mime_part_init): Remove reference to filename. (my_finalize): Dont free filename. * camel-mime-part.h (CamelMimePartClass): Removed parse_header_pair() method, it doesn't add anything that add_header() can't be used for. (CamelMimePartClass): Remove *_header_lines methods. (struct _CamelMimePart): Remove header_lines list. (struct _CamelMimePart): Removed filename attribute. * camel-medium.c (camel_medium_init): Init headers to null, not a hashtable. (add_header): Append the headers as a list. (remove_header): Remove headers as a list. (get_header): Likewise for lookup. (free_header): Removed, no longer needed. (finalize): Free headers using header_raw_clear(). (camel_medium_set_header): New function, to reset and override all values of a header with a new value. * camel-medium.h (struct _CamelMedium): Changed to use a header_raw struct rather than a hash table, to store headers (many headers can occur multiple times). * camel-mime-utils.c (header_raw_find_next): New function, allows you to find multi-valued header fields. (header_disposition_format): New function to format/create content-disposition header string. (header_param_list_format_append): Function to format parameter lists into a GString. (header_content_type_format): Function to format content-type into a usable format. (header_set_param): allow NULL value to remove the parameter. (decode_token): Renamed from header_decode_token. (header_decode_token): New interface for external use. (quoted_decode): Made static to kill annoying warnings. (g_strdup_len): Killed, replaced with calls to g_strndup(). (rfc2047_decode_word): Made static to kill warnings. (decode_coded_string): Terminated. (g_string_append_len): Made static to kill warnings. (header_decode_text): Made static to kill warnings. (header_decode_text): Constify. (rfc2047_decode_word): Constify. (header_param): Constify. (header_content_type_new): Copy the type/subtype strings. (header_param_list_decode): Made static. (header_param_list_format_append): Made static. (quoted_decode): Constify. (g_string_append_len): Constify. (header_token_decode): New function to decode a single token. * providers/mbox/camel-mbox-summary.c (header_write): Append a trailing \n when writing headers. (strdup_trim): Killed a warning. (camel_mbox_summary_set_uid): Make sure the next uid is at least 1 higher than any existing one. (header_evolution_decode): Use header_token_decode to get the token. * camel-mime-parser.c (folder_scan_header): Strip the trailing \n of the end of all header lines. svn path=/trunk/; revision=2551
* MERGE NEW_PARSER branch into HEAD, fixed conflicts.NotZed2000-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-20 NotZed <NotZed@HelixCode.com> * MERGE NEW_PARSER branch into HEAD, fixed conflicts. * gmime-content-field.c (_print_parameter): Duh, removed again (@@#$@ cvs merge). * camel-mime-utils.c (header_content_type_is): Constify. (header_content_type_unref): Killed a couple warnings. * camel-folder.c (_init): Removed more log crap. * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for summary changes. * providers/mbox/camel-mbox-folder.c (_get_message_by_number): Fixed for new summary interface. Added a warning for using this broken api. (_get_message_by_uid): Fixed for message new with session vanishing. svn path=/trunk/; revision=2531
* fix the name of "Helix Code, Inc." in all the copyrightsDan Winship2000-03-101-1/+1
| | | | svn path=/trunk/; revision=2091
* New header with the typedefs for all camel classes. Now the class headersDan Winship2000-02-191-4/+3
| | | | | | | | | | | | | | | * 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
* include gmime-base64.h various compilation and runtime fixes.bertrand2000-02-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-15 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-mime-part.c: include gmime-base64.h various compilation and runtime fixes. (_set_input_stream): store the input substream for the content object. * camel/camel-data-wrapper.h: declare the set/get function on input/output stream. * camel/camel-mime-part.c (_get_content_object): don't use a temporary mem stream. * camel/camel-seekable-substream.c (_seek): (_eos): (_read): the substream can be unlimited in length * camel/camel-data-wrapper.c (camel_data_wrapper_class_init): set the get/set_input/output_stream methods. * camel/camel-multipart.c (_construct_from_stream): camel_stream_seek -> camel_seekable_stream_seek work on the new parser scheme. temporary sync to laptop. svn path=/trunk/; revision=1781
* make a blocking version of the header parser. When the fs stream usesbertrand2000-02-151-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org> * camel/gmime-utils.c (get_header_array_from_stream): make a blocking version of the header parser. When the fs stream uses gnome-vfs, this should be changed. (gmime_read_line_from_stream): ditto. 2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-stream-fs.c: everywhere, when using the cur_pos field, do it on the CamelSeekableStream object. (_seek): small fix. * camel/camel-seekable-stream.c (camel_seekable_stream_seek): s/camel_stream_seek/camel_seekable_stream_seek/g * camel/camel-seekable-stream.h: (struct ): added a field to store the current position. * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): New function. Allows to get the current position of a seekable stream. In fact much more changes, but I am lazy. This is the begining of some major changes in camel. svn path=/trunk/; revision=1778
* Updated my e-mail address to reflect my new employmentBertrand Guiheneuf2000-01-041-1/+1
| | | | svn path=/trunk/; revision=1533
* Fix copyright informations once againBertrand Guiheneuf1999-12-151-1/+1
| | | | svn path=/trunk/; revision=1489
* More work:Ettore Perazzoli1999-11-171-1/+1
| | | | | | | - Fixed some Camel API naming issues. - Moved the message composer stuff to the `composer' directory. svn path=/trunk/; revision=1395
* Added streaming capability to CamelDataWrapper. This makes it possible, forEttore Perazzoli1999-11-171-7/+19
| | | | | | | example, to build multipart messages out of files that are on disk without loading them in memory. svn path=/trunk/; revision=1394
* Copyright changeBertrand Guiheneuf1999-10-231-1/+4
| | | | svn path=/trunk/; revision=1348
* Address updateBertrand Guiheneuf1999-08-301-1/+1
| | | | svn path=/trunk/; revision=1147
* text parameter declared constbertrand1999-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-08-28 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-mime-part.c (camel_mime_part_set_text): text parameter declared const * camel/camel-mime-part-utils.c (camel_mime_part_store_stream_in_buffer): actually test correctly nb_bytes_read_chunk is >0 * camel/gstring-util.c: * camel/gmime-content-field.c: * camel/providers/MH/camel-mh-folder.c: * camel/camel-stream-fs.c: include string.h * camel/camel-stream-mem.c (_write): return the numver of written bytes. * camel/camel-stream-buffered-fs.c (_eos): return sthg * camel/camel-stream.c (default_camel_seek): return something. * Started to work on new recipient code. * fixed various leaks. svn path=/trunk/; revision=1146
* contruct the content from the buffer before calling CamelMediumbertrand1999-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-08-26 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-mime-part.c (_get_content_object): contruct the content from the buffer before calling CamelMedium implementation. (_construct_from_stream): Do not construct the content by default, just store the content bytes in a temporary buffer. Content will be constructed only at caller request (when calling CamelMedium::get_content_object) Providers with better access to the messages (mbox/MH ...) will have to provider lighter implementation, that is shall not read content at all unless the caller asks for it (again with get_content). * camel/camel-mime-part-utils.c: new file, groups mime-part related utils. Meant to be used by providers subclassing MimeMessage. (camel_mime_part_construct_headers_from_stream): (camel_mime_part_construct_content_from_stream): no more useless temporary hash table. * camel/camel-mime-part.c (_construct_from_stream): calls mime-part-utils functions now. * camel/gmime-utils.c (_store_header_pair_from_string): do not use hash table to store header, use an array instead. svn path=/trunk/; revision=1145
* new file, groups mime-part related utils. Meant to be used by providersbertrand1999-08-261-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | 1999-08-26 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-mime-part-utils.c: new file, groups mime-part related utils. Meant to be used by providers subclassing MimeMessage. (camel_mime_part_construct_headers_from_stream): (camel_mime_part_construct_content_from_stream): no more useless temporary hash table. * camel/camel-mime-part.c (_construct_from_stream): calls mime-part-utils functions now. * camel/gmime-utils.c (_store_header_pair_from_string): do not use hash table to store header, use an array instead. * MimePart cleanup. Not complete yet. Content must not be parsed when constructing but only when content object is requested. Default implementation will keep content in a stream. svn path=/trunk/; revision=1144
* now descend from CamelMedium.bertrand1999-08-261-16/+4
| | | | | | | | | | | 1999-08-25 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-mime-part.c: now descend from CamelMedium. * tests/test1.c (main): all headers must be strdup'ed (main): unref created objects svn path=/trunk/; revision=1143
* La tout n'est qu'ordre et beaute,Bertrand Guiheneuf1999-08-261-1/+1
| | | | | | Luxe, calme et voluptee. svn path=/trunk/; revision=1142
* new class. Will handle all sort of information media (Mime mail messages,bertrand1999-08-251-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-08-24 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-medium.c (camel_medium_class_init): new class. Will handle all sort of information media (Mime mail messages, Lotus Notes mail messages, postit notes, faxes, who knows .... :) CamelMimePart will inherit from it. * camel/camel-mime-part.c (_set_disposition): (_set_description): description and disposition parameters are now const. * camel/gmime-content-field.c (gmime_content_field_free): added assertion code. * camel/providers/MH/camel-mh-folder.c (_get_message): uses buffered stream. * camel/camel-stream-buffered-fs.c: new stream to accelerate file ops. Thanks to jwz, I've decided to add a level of abstraction to Camel. In the future, it should be able to handle other mail systems, but also non-mail information vehicles. Enough for today. Roller time! svn path=/trunk/; revision=1140
* merge a lot of work. Rough ChangeLog will followBertrand Guiheneuf1999-08-011-57/+59
| | | | svn path=/trunk/; revision=1052
* Implemented base64 encoder based on CamelStreams. Should theMiguel de Icaza1999-07-151-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-07-13 Miguel de Icaza <miguel@gnu.org> * camel/gmime-base64.c (gmime_encode_base64): Implemented base64 encoder based on CamelStreams. Should the encoder/decoder be a Stream itself? * camel/gmime-utils.c: include config.h here. * camel/url-util.c: ditto. * camel/gstring-util.c: ditto. * camel/gmime-content-field.c: ditto. * camel/camel-stream.c: ditto. * camel/camel-stream-fs.c: ditto. * camel/camel-store.c: ditto. * camel/camel-simple-data-wrapper.c: ditto. * camel/camel-session.c: ditto. * camel/camel-service.c: ditto. * camel/camel-mime-part.c: ditto. * camel/camel-mime-message.c: ditto. * camel/camel-log.c: ditto. * camel/camel-data-wrapper.c: ditto * camel/camel-folder.c: ditto. * camel/camel-stream.c (camel_stream_write): Moved api documentation to the places that they document. (camel_stream_class_init): Virtual classes do not need to have a default implementation. So null them all. (camel_stream_write): Return value from write. (camel_stream_available): implement. (camel_stream_write_strings): documented. * devel-docs/query/virtual-folder-in-depth.sgml: Small reformatting 1999-06-28 bertrand <Bertrand.Guiheneuf@inria.fr> * tests/test2.c (main): now use CamelDataWrapper::contruct_form_stream to test svn path=/trunk/; revision=1024
* new field (content_type) and associated methods. (camel_mime_part_init):bertrand1999-06-281-1/+4
| | | | | | | | | | | | | | | | | | | 1999-06-28 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-mime-part.c: new field (content_type) and associated methods. (camel_mime_part_init): initialize content_type field. (_parse_header_pair): now set content_type MimePart field instead of using DataWrapper Mime typing facility. 1999-06-28 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-data-wrapper.h: s/content_type/mime_type/ 1 svn path=/trunk/; revision=1002
* moved all the content-type stuff here. (camel_data_wrapper_init):bertrand1999-06-231-5/+0
| | | | | | | | | | | | | | | | 1999-06-22 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-data-wrapper.c (_get_content_type): moved all the content-type stuff here. (camel_data_wrapper_init): initialize the instance content-type field. * camel/camel-mime-part.c (_parse_header_pair): parse Content-Type stuff in header. (_write_to_stream): write the content type stuff to the stream. svn path=/trunk/; revision=985
* new function, returns "type/subtype" mime type string.bertrand1999-06-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel/gmime-content-field.c (gmime_content_field_get_mime_type): new function, returns "type/subtype" mime type string. (gmime_content_field_construct_from_string): new function, construbt a content_field object form a string. be used to set the mime_type from a string. * camel/camel-mime-part.c (_set_content_type): (camel_mime_part_set_content_type): (_get_content_type): (_get_content_type): new methods. 1999-06-21 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/gmime-utils.c (get_header_table_from_stream): replace CR/LF+'\t' with ' ' * camel/camel-mime-message.c (_set_recipient_list_from_string): trim \t when splitting * camel/gmime-utils.c (get_header_table_from_file): corrected bug in scanning tabulations ('t' -> '\t') * tests/test2.c (main): read mail.test instead of mail1.test * camel/camel-mime-part.c (_add_header): added comments svn path=/trunk/; revision=984
* Commit of all Netherlands changes.Bertrand Guiheneuf1999-06-191-0/+1
| | | | | | | | All mime stuff uses streams now, and it still works. Bertrand svn path=/trunk/; revision=981
* syncBertrand Guiheneuf1999-05-281-1/+2
| | | | svn path=/trunk/; revision=949
* a bunch of get/set header field method done. Does nothing yet though.Bertrand Guiheneuf1999-05-141-1/+2
| | | | | | | | | | | * camel/camel-mime-message.h: a bunch of get/set header field method done. Does nothing yet though. * camel/camel-mime-message.[ch] : new file. svn path=/trunk/; revision=923
* disposition is now a full GMimeContentField object.Bertrand Guiheneuf1999-05-131-1/+1
| | | | | | | | | | | | | | | | | | | * camel/camel-mime-part.h (struct ): disposition is now a full GMimeContentField object. * camel/gmime-content-field.c: new file handle "type/subtype ;parameter=value ; parameter=value ..." BNF grammar elements (gmime_content_field_write_to_file): new func * camel/gmime-utils.c (gmime_write_header_pair_to_file): namespace change Some work on mime stuff. Mime part can save itself into a file. This stuff is boring. svn path=/trunk/; revision=921
* overload wrapper class method. (_write_to_file): start to write some textbertrand1999-05-121-0/+1
| | | | | | | | | | | 1999-05-11 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-mime-part.c (_write_to_file): overload wrapper class method. (_write_to_file): start to write some text in file. svn path=/trunk/; revision=904
* static functions naming follows gnome coding style guide.bertrand1999-05-121-0/+2
| | | | | | | | | | | | | | 1999-05-11 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-store.c: * camel/camel-service.c: * camel/camel-folder.c: * camel/camel-data-wrapper.c: * camel/camel-mime-part.c: static functions naming follows gnome coding style guide. svn path=/trunk/; revision=902
* implemented public interfacesBertrand Guiheneuf1999-05-111-0/+36
| | | | | | | | 1999-05-11 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> * camel/camel-mime-part.h: implemented public interfaces svn path=/trunk/; revision=901
* A bunch of new set/get func.Bertrand Guiheneuf1999-05-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | 1999-05-10 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> * camel/camel-mime-part.c (__camel_mime_part_get_header_lines): (__camel_mime_part_set_header_lines): (__camel_mime_part_get_content_languages): (__camel_mime_part_set_content_languages): (__camel_mime_part_get_encoding): (__camel_mime_part_set_encoding): (__camel_mime_part_get_content_MD5): (__camel_mime_part_set_content_MD5): (__camel_mime_part_get_content_id): (__camel_mime_part_set_content_id): A bunch of new set/get func. * camel/gstring-util.c (g_string_list_free): convenience function for string list complete deallocation. svn path=/trunk/; revision=900
* new methodbertrand1999-05-101-0/+9
| | | | | | | | | | | | 1999-05-09 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-mime-part.c (__camel_mime_part_add_header): new method * camel/camel-mime-part.h (struct CamelMimePart): added core fields. svn path=/trunk/; revision=899
* new class. models a mime mail part.bertrand1999-05-091-0/+72
1999-05-08 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-mime-part.[ch]: new class. models a mime mail part. svn path=/trunk/; revision=894