aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-fs.c
Commit message (Collapse)AuthorAgeFilesLines
* don't forget to set the state to 0 after 3. (my_read_encode): don't forgetbertrand2000-03-031-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-03-02 bertrand <bertrand@helixcode.com> * camel-stream-b64.c (my_read_encode): don't forget to set the state to 0 after 3. (my_read_encode): don't forget to encode, even in state 3. * camel-simple-data-wrapper.c: static functions are prefixed with my_ instead of _ * camel-multipart.c: static functions are prefixed with my_ instead of _ (my_write_to_stream): commented. (my_write_to_stream): warning in case the boudary is set but is a zero length string. * camel-mime-part.c (camel_mime_part_encoding_from_string): remove debug trace. * camel-mime-part.c: Replaced all static functions with name begining with _ by the same name begining with "my_" to prevent the possible conflicts with system symbols Dan warned us about. Mime mail generation works now, at least with b64 encoding. QP needs to be done now. svn path=/trunk/; revision=2016
* use camel_stream_reset instead of seek. The formatter should be able tobertrand2000-02-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-formatter.c (handle_text_plain): (handle_text_html): use camel_stream_reset instead of seek. The formatter should be able to work with all streams, not only seekable streams. In the case where some provider implementation would not be able to provide a reset method to their stream, implementors would have to find a workaround. * camel/camel-session.c (camel_session_new): use (void) instean of () in function decl. * camel/camel-folder.c: ifdef async operation related code. * camel/camel-seekable-stream.c (_seek): added a warning. (_reset): default implementation of reset for seekable stream. * camel/camel-mime-message.h: set_received_date declaration fix. cosmetic changes. * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init): use (void) instead of (). * camel/camel-stream.c (camel_stream_reset): new method for CamelStream. svn path=/trunk/; revision=1835
* don't seek the begining of the substream. (_eos): fix eos conditionbertrand2000-02-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | 2000-02-16 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-seekable-substream.c (_set_bounds): don't seek the begining of the substream. (_eos): fix eos condition testing. (_finalize): unref parent stream (_init_with_seekable_stream_and_bounds): ref parent stream * camel/gstring-util.c (g_string_equal_for_hash): (g_string_equal_for_glist): return type is int. * camel/camel.h: * camel/camel.c (camel_init): use (void) instead of (). A lot of other small changes to make the set_input_stream scheme work. It actually works. svn path=/trunk/; revision=1798
* include gmime-base64.h various compilation and runtime fixes.bertrand2000-02-151-1/+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
* use the eos stream method. (gmime_read_line_from_stream): ditto.bertrand2000-02-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | 2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org> * camel/gmime-utils.c (get_header_array_from_stream): use the eos stream method. (gmime_read_line_from_stream): ditto. * camel/camel-stream-fs.h (struct ): add the eof field cosmetics changes. * camel/camel-stream-fs.c (camel_stream_fs_init): set eof. (_read): set eof on end of file. (_eos): implemented. * 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. svn path=/trunk/; revision=1780
* use the eos stream method. (gmime_read_line_from_stream): ditto.bertrand2000-02-151-5/+11
| | | | | | | | | | | | | | | | | | | | | | | 2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org> * camel/gmime-utils.c (get_header_array_from_stream): use the eos stream method. (gmime_read_line_from_stream): ditto. * camel/camel-stream-fs.h (struct ): add the eof field cosmetics changes. * camel/camel-stream-fs.c (camel_stream_fs_init): set eof. (_read): set eof on end of file. (_eos): implemented. * 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. svn path=/trunk/; revision=1779
* make a blocking version of the header parser. When the fs stream usesbertrand2000-02-151-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* + * camel/camel-stream-fs.c (_init_with_name): Set stream_fs->fd toMatthew Loper2000-02-141-2/+9
| | | | | | | | | | + -1 if we fail to load the file. + (camel_stream_fs_new_with_name): If stream_fs->fd is -1, return + NULL. These changes make it so that a CamelStreamFs won't be + created if you give it a bogus filename; they may be replaced once + exception handling is in place. svn path=/trunk/; revision=1767
* parent class is seekable stream, not streambertrand2000-02-111-1/+1
| | | | | | | | | 2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-stream-fs.c (camel_stream_fs_class_init): parent class is seekable stream, not stream svn path=/trunk/; revision=1731
* parent class is now CamelSeekableStream idem idem idem idem (_seek):bertrand2000-01-251-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-01-24 bertrand <bertrand@helixcode.com> * camel/camel-seekable-stream.c: * camel/camel-seekable-stream.h: * camel/camel-simple-data-wrapper-stream.h: parent class is now CamelSeekableStream * camel/camel-stream-buffered-fs.h: idem * camel/camel-stream-buffered-fs.c: idem * camel/camel-stream-mem.h: idem * camel/camel-stream-mem.c: idem (_seek): change declaration * camel/camel-stream-fs.c: parent class is now CamelSeekableStream (_seek): change declaration * camel/camel-stream-fs.h: parent class is now CamelSeekableStream Major compatible change in the stream hierarchy. Removed the seek method from the general streams so that we can use them as "DataSources". svn path=/trunk/; revision=1622
* converted all gint64 variables into guint32.bertrand2000-01-251-18/+28
| | | | | | | | | | | | | | | | 2000-01-24 bertrand <bertrand@helixcode.com> * camel/camel-stream-fs.[ch]: converted all gint64 variables into guint32. * camel/camel-stream-fs.c (_read): fix stupid bug. (_write): ditto. * camel/camel-exception.c (camel_exception_new): don't forget to clean the exception when creating it. svn path=/trunk/; revision=1621
* add recipient_list to the recipients, not recipients_list. I don't knowbertrand2000-01-241-11/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-01-24 bertrand <bertrand@helixcode.com> * camel/camel-recipient.c (camel_recipient_table_add_list): add recipient_list to the recipients, not recipients_list. I don't know what that variable was doing here. 2000-01-23 bertrand <bertrand@helixcode.com> * camel/camel-store.c (camel_store_get_session): added a public get_session method. * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): (camel_mbox_load_summary): load/save message sizes in the summary file * camel/providers/mbox/camel-mbox-summary.h: added a size field to the message information structure. * camel/providers/mbox/camel-mbox-utils.c (parsed_information_to_mbox_summary): copy message size to the mbox summary information too. * camel/camel-stream-fs.c (_seek): updated to work with bounded fs streams. (_write): ditto. (_read): ditto. * camel/camel-stream-fs.h (struct ): added the cur_pos, inf_bound and sup_bound members to allow for bounded fs stream. * camel/camel-stream-fs.c (_set_bounds): new func. (_init_with_fd_and_bounds): idem. (_init_with_name_and_bounds): idem. New functions to allow the usage of bounded fs streams. The bounded fs stream allow, for example, to make a stream from a message stored in an mbox file. svn path=/trunk/; revision=1620
* 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
* Copyright changeBertrand Guiheneuf1999-10-231-1/+4
| | | | svn path=/trunk/; revision=1348
* When using g_free (obj) don't test if obj != NULL g_free () already dobertrand1999-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 1999-09-01 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-folder.c (_finalize): (_set_name): * camel/camel-mime-message.c (_finalize): * camel/camel-mime-part.c (_finalize): (_set_description): (_set_disposition): * camel/camel-service.c (_finalize): * camel/camel-stream-fs.c (_finalize): * camel/gmime-content-field.c: (gmime_content_field_construct_from_string): * camel/url-util.c (g_url_free): When using g_free (obj) don't test if obj != NULL g_free () already do that. Thanks to elerium for the feedback. 19 svn path=/trunk/; revision=1151
* Address updateBertrand Guiheneuf1999-08-301-1/+1
| | | | svn path=/trunk/; revision=1147
* text parameter declared constbertrand1999-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* new class. Will handle all sort of information media (Mime mail messages,bertrand1999-08-251-10/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* name parameter is const. This fixes a bug in destroy ()bertrand1999-08-211-4/+4
| | | | | | | | | 1999-08-20 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-stream-fs.c (camel_stream_fs_new_with_name): name parameter is const. This fixes a bug in destroy () svn path=/trunk/; revision=1135
* return the number of bytes read. How can this have ever worked ?bertrand1999-08-181-2/+5
| | | | | | | | | | | | | | | | 1999-08-17 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-stream.c (camel_stream_read): return the number of bytes read. How can this have ever worked ? (camel_stream_flush): don't return anything. * camel/gmime-utils.c (get_header_table_from_stream): mem leak fixed. + various other mem leaks. svn path=/trunk/; revision=1120
* Message creation still consumes a lot ofbertrand1999-08-111-0/+40
| | | | | | | | | | | | | | | | | memory (maybe 2000k) and I really don't understand why. As soon as I get gtk working on SunOS, purify should hopefully give me the answer. 1999-08-11 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-service.c (_finalize): * camel/camel-stream-fs.c (_finalize): (_destroy): close file descriptor. * camel/camel-stream-mem.c (_finalize): * camel/camel-store.c (_finalize): * camel/camel-folder.c (_finalize): svn path=/trunk/; revision=1104
* finshed implementation (_delete_messages): implemented.bertrand1999-08-051-1/+1
| | | | | | | | | | 1999-08-04 bertrand <Bertrand.Guiheneuf@aful.org> * camel/providers/MH/camel-mh-folder.c (_delete): finshed implementation (_delete_messages): implemented. svn path=/trunk/; revision=1076
* new memory buffer based stream.Bertrand Guiheneuf1999-08-021-1/+26
| | | | | | | | | | | | | | | | | * camel/camel-stream-mem.c: * camel/camel-stream-mem.h: new memory buffer based stream. * camel/camel-stream-fs.c (_seek): implementation for file system based stream. * camel/camel-stream.c (camel_stream_seek): new method. * camel/camel-stream-fs.c (camel_stream_fs_class_init): pass CamelStreamFsClass instead of CamelStreamClass. svn path=/trunk/; revision=1056
* merge a lot of work. Rough ChangeLog will followBertrand Guiheneuf1999-08-011-14/+11
| | | | svn path=/trunk/; revision=1052
* Implemented base64 encoder based on CamelStreams. Should theMiguel de Icaza1999-07-151-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Various patches from Ulrich Drepper <drepper at cygnus.com>bertrand1999-06-251-1/+1
| | | | | | | | | | | | | | | | | | | 1999-06-24 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-mime-message.c (_write_one_recipient_to_stream): includes gmime-utils header. patch from Ulrich Drepper <drepper at cygnus.com> set separator string in write_header_with_glist_to_stream() * camel/camel-log.c (camel_log): patch from Ulrich Drepper <drepper at cygnus.com> Do not use stderr in initialization of logfile descriptor. * camel/camel-stream-fs.c (camel_stream_fs_new_with_name): patch from Ulrich Drepper <drepper at cygnus.com> initialize mode field in open(). svn path=/trunk/; revision=994
* Commit of all Netherlands changes.Bertrand Guiheneuf1999-06-191-7/+23
| | | | | | | | All mime stuff uses streams now, and it still works. Bertrand svn path=/trunk/; revision=981
* use new stream code instead of raw file * stuff.bertrand1999-05-311-0/+234
1999-05-31 bertrand <Bertrand.Guiheneuf@inria.fr> * tests/test2.c (main): use new stream code instead of raw file * stuff. * camel/gmime-utils.c (get_header_table_from_stream): new func. Will replace get_header_table_from_file and will be used to parse headers from files as well as from memory buffers. * camel/camel-stream-fs.c: CamelStream Subclass. File system based stream. svn path=/trunk/; revision=961