Commit Graph

9 Commits

Author SHA1 Message Date
300101f470 Use camel_mkdir().
2003-07-07  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): Use
	camel_mkdir().

	* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Use
	camel_mkdir().

	* camel-session.c (get_storage_path): Use camel_mkdir().

	* camel-store.c (camel_mkdir_hier): Removed.

	* camel-data-cache.c (camel_data_cache_new): Updated to use
	camel_mkdir().
	(data_cache_path): Same.

	* camel-file-utils.c (camel_mkdir): Renamed and documented.
	(camel_file_util_safe_filename): Documented.
	(camel_read): Moved here from camel-io.c
	(camel_write): Same.

	* camel-io.[c,h]: Removed.

	* camel-uid-cache.c (camel_uid_cache_new): Use the
	camel-file-utils.c version of mkdir.

svn path=/trunk/; revision=21753
2003-07-07 20:58:24 +00:00
be9db81541 Like camel_url_encode, but works directly on an existing GString.
* camel-url.c (append_url_encoded): Like camel_url_encode, but
	works directly on an existing GString.
	(camel_url_to_string, output_param): Use it.
	(camel_url_encode): Likewise. Remove "escape_unsafe" arg since the
	"unsafe" chars are the ones that should *always* be escaped, and
	the places we were passing FALSE were wrong.
	(camel_url_decode): replace with a new version

	* camel-file-utils.c (camel_file_util_safe_filename): Remove extra
	arg to camel_url_encode.

	* tests/misc/url.c (main): Add tests of basic URL parsing and
	unparsing

svn path=/trunk/; revision=20545
2003-03-27 15:37:47 +00:00
d4e1fb42e0 helper, build fingerprint. (camel_certdb_nss_cert_get): Helper for nss
2002-10-15  Not Zed  <NotZed@Ximian.com>

        * camel-tcp-stream-ssl.c (cert_fingerprint): helper, build
        fingerprint.
        (camel_certdb_nss_cert_get): Helper for nss certs.  Lookup cert.
        As well as fingerprint, the whole raw cert is checked for
        validity.
        (camel_certdb_nss_cert_add): Add an nss cert to a certdb, also
        saves the cert by fingerprint in ~/.camel_certs/.
        (ssl_bad_cert): Changed to use above functions to simplify logic.
        (ssl_bad_cert): Also added non-compiled code which mimics what
        mozilla does, but it doesn't work right :-/
        (camel_certdb_nss_cert_set): Save the raw cert associated with a
        cert.

        * camel-certdb.c (certdb_cert_free): Free the raw cert data if
        set.

2002-10-14  Not Zed  <NotZed@Ximian.com>

        * camel-file-utils.c (camel_file_util_encode_string): Encode a
        length of 0 as 1, not 0, to match the decode code.

svn path=/trunk/; revision=18385
2002-10-17 03:56:13 +00:00
e1fa571225 Don't #include camel-mime-filter-save.h, we don't use it.
2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
	we don't use it.

	* camel-file-utils.c: Fixed a few 'might be used uninitialized'
	warnings which were real problems.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Save the raw mime
	stream for any/all signed parts.

	* camel-mime-part.c (camel_mime_part_init): Initialize our raw
	stream to NULL.
	(camel_mime_part_finalize): Unref our raw stream, if we have one.
	(write_to_stream): If we have a raw stream, write that out instead
	of re-encoding.

	* camel-mime-filter-save.[c,h]: Rewritten to save to a stream
	rather than a file.

svn path=/trunk/; revision=15867
2002-02-28 02:28:12 +00:00
d46cb0fd8d Completely new implementation of NNTP.
2001-11-30  Not Zed  <NotZed@Ximian.com>

        * providers/nntp/camel-nntp-*.c:

        Completely new implementation of NNTP.

        Doesn't support subscriptions yet (lists all folders), but should
        be more reliable (faster?), and has an integrated cache.

        * camel-exception.c (camel_exception_new): Use e_memchunks for
        exception blocks.
        (camel_exception_free): Same.

        * camel-data-cache.[ch]: New object for managing on-disk caches of
        anything that can be stored in a camel-stream.

        * camel-file-utils.c (camel_file_util_mkdir): New function, just a
        nicer place to put this (than camel-store), should be removed from
        camel-store.
        (camel_file_util_safe_filename): New function to url-encode a
        filename.

        * camel-mime-parser.c (drop_states): New func to drop the parser
        state to initial state.
        (folder_scan_init_with_fd):
        (folder_scan_init_with_stream): Call above func to reset state if
        the stream is changed on us so we can change streams to reuse a
        parser object.

svn path=/trunk/; revision=14822
2001-11-30 03:09:38 +00:00
08fb7329cb Fixing the license text.
svn path=/trunk/; revision=14212
2001-10-27 16:59:46 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
cf9e3919bc Don't claim failure when reading/writing the empty string.
* camel-file-utils.c (camel_file_util_encode_string,
	camel_file_util_decode_string): Don't claim failure when
	reading/writing the empty string.

svn path=/trunk/; revision=12829
2001-09-14 19:50:47 +00:00
84e075645b New file, with the int, string, time_t, and off_t encode/decode routines
* camel-file-utils.c: New file, with the int, string, time_t, and
	off_t encode/decode routines from camel-folder-summary.c moved
	here and renamed, for the enjoyment of non-CamelFolderSummary
	subclasses.

	* Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
	(libcamelinclude_HEADERS): and camel-file-utils.h

	* camel-folder-summary.c: Remove functions that were moved to
	camel-file-utils.c, update uses of them for the new names.
	(camel_folder_summary_{en,de}code_token are still here.)

	* providers/local/camel-mbox-summary.c: Use camel_file_util_*
	names

	* providers/imap/camel-imap-summary.c: Use camel_file_util_* names

	* providers/imap/camel-imap-store.c (imap_store_setup_online,
	imap_store_setup_offline): Use camel_file_util_* names, which
	makes much more sense since this isn't folder summary stuff.

svn path=/trunk/; revision=9590
2001-04-26 19:44:50 +00:00