aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authornobody <nobody@localhost>1999-05-12 05:59:47 +0800
committernobody <nobody@localhost>1999-05-12 05:59:47 +0800
commite3dd3105891dc1fc1f65d31397d9f9aaf8ef2868 (patch)
tree9ee46a5ef674bdf62325cdb23bc745c6c14aab51 /camel
parent6f235e02f3ac099e25dbcd6f97e7fb905dc3b869 (diff)
downloadgsoc2013-evolution-GNUMERIC_0_26.tar
gsoc2013-evolution-GNUMERIC_0_26.tar.gz
gsoc2013-evolution-GNUMERIC_0_26.tar.bz2
gsoc2013-evolution-GNUMERIC_0_26.tar.lz
gsoc2013-evolution-GNUMERIC_0_26.tar.xz
gsoc2013-evolution-GNUMERIC_0_26.tar.zst
gsoc2013-evolution-GNUMERIC_0_26.zip
This commit was manufactured by cvs2svn to create tagGNUMERIC_0_26
'GNUMERIC_0_26'. svn path=/tags/GNUMERIC_0_26/; revision=913
Diffstat (limited to 'camel')
-rw-r--r--camel/.cvsignore7
-rw-r--r--camel/Makefile.am44
-rw-r--r--camel/README57
-rw-r--r--camel/camel-data-wrapper.c174
-rw-r--r--camel/camel-data-wrapper.h83
-rw-r--r--camel/camel-folder.c658
-rw-r--r--camel/camel-folder.h126
-rw-r--r--camel/camel-log.c39
-rw-r--r--camel/camel-log.h49
-rw-r--r--camel/camel-mime-part.c457
-rw-r--r--camel/camel-mime-part.h122
-rw-r--r--camel/camel-mime-utils.c36
-rw-r--r--camel/camel-mime-utils.h46
-rw-r--r--camel/camel-provider.c29
-rw-r--r--camel/camel-provider.h54
-rw-r--r--camel/camel-service.c277
-rw-r--r--camel/camel-service.h82
-rw-r--r--camel/camel-session.c132
-rw-r--r--camel/camel-session.h82
-rw-r--r--camel/camel-store.c220
-rw-r--r--camel/camel-store.h85
-rw-r--r--camel/gstring-util.c227
-rw-r--r--camel/gstring-util.h58
-rw-r--r--camel/providers/.cvsignore2
-rw-r--r--camel/providers/MH/.cvsignore6
-rw-r--r--camel/providers/MH/Makefile.am26
-rw-r--r--camel/providers/MH/camel-mh-folder.c112
-rw-r--r--camel/providers/MH/camel-mh-folder.h70
-rw-r--r--camel/providers/MH/camel-mh-store.c89
-rw-r--r--camel/providers/MH/camel-mh-store.h71
-rw-r--r--camel/providers/Makefile.am3
-rw-r--r--camel/url-util.c405
-rw-r--r--camel/url-util.h50
33 files changed, 0 insertions, 3978 deletions
diff --git a/camel/.cvsignore b/camel/.cvsignore
deleted file mode 100644
index fd6b811c68..0000000000
--- a/camel/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
diff --git a/camel/Makefile.am b/camel/Makefile.am
deleted file mode 100644
index bf82c40452..0000000000
--- a/camel/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = providers
-
-libcamelincludedir = $(includedir)/camel
-
-
-lib_LTLIBRARIES = libcamel.la
-
-INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \
- -I$(top_srcdir)/intl \
- $(GTK_INCLUDEDIR)
-
-libcamel_la_SOURCES = \
- camel-log.c \
- camel-data-wrapper.c \
- camel-folder.c \
- camel-mime-part.c \
- camel-mime-utils.c \
- camel-provider.c \
- camel-service.c \
- camel-session.c \
- camel-store.c \
- gstring-util.c \
- url-util.c
-
-libcamelinclude_HEADERS = \
- camel-log.h \
- camel-data-wrapper.h \
- camel-folder.h \
- camel-mime-part.h \
- camel-mime-utils.c \
- camel-provider.h \
- camel-service.h \
- camel-session.h \
- camel-store.h \
- gstring-util.h \
- url-util.h
-
-
-libcamel_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
-
-
-EXTRA_DIST = README
diff --git a/camel/README b/camel/README
deleted file mode 100644
index 44f93fa6d8..0000000000
--- a/camel/README
+++ /dev/null
@@ -1,57 +0,0 @@
-
- CAMEL
-
-
- A generic Messaging Library
-
-
- ----
-
-
-Introduction:
--------------
-
-Camel will be a generic messaging library. It will evntually support
-the standard messaging system for receiving and sending messages.
-It aims at being the backend for the future gnome-mailer system.
-
-The name "camel" stands for ... nothing. Open area of developpement there.
-You know, that "bazaar" thing. Maybe could we organize a big contest on
-gnome-list to find the best signification :)
-
-Camel draws heacily from JavaMail and the IMAP4rev1 RFC.
-people wanting to hack on a provider are recommended to read the JavaMail
-API specification but CMC and MAPI are of interest too.
-
-Please, before starting anything, wait for me to finish the abstract classes.
-Some parts are not definitive yet.
-
-
-Organization:
--------------
-
-The library is roughly a set of abstract classes, some kind of generic
-"interfaces" (idl interfaces, not java interfaces ).
-
-Particular implementations are called providers.
-
-Here are the basic objects:
-
-* CamelService : an abstract class representing an access to a server.
-Handles the connection and authentication to any server.
-
-* CamelStore (CamelService): A hierarchy of folders on a server.
-
-* CamelFolder : An object containing messages. A folder is always associated
-to a store.
-
-* CamelMessage : An object contained in folders. Is defined by a set of
-attribute and a content. (Attributes are generally: The date it was received,
-the sender address, .....)
-
-* CamelTransport (CamelService): A way to send messages.
-
-....
-...
-
-
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
deleted file mode 100644
index 8933546167..0000000000
--- a/camel/camel-data-wrapper.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camelDataWrapper.c : Abstract class for a data_wrapper */
-
-/** THIS IS MOSTLY AN ABSTRACT CLASS THAT SHOULD HAVE BEEN AN
- INTERFACE. **/
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-data-wrapper.h"
-
-static GtkObjectClass *parent_class=NULL;
-
-/* Returns the class for a CamelDataWrapper */
-#define CDH_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (GTK_OBJECT(so)->klass)
-
-static void _write_to_buffer(CamelDataWrapper *data_wrapper, gchar *buffer);
-static void _write_to_file(CamelDataWrapper *data_wrapper, FILE *file);
-static void _construct_from_buffer(CamelDataWrapper *data_wrapper, gchar *buffer, guint size);
-static void _construct_from_file (CamelDataWrapper *data_wrapper, FILE *file, guint size);
-
-static void
-camel_data_wrapper_class_init (CamelDataWrapperClass *camel_data_wrapper_class)
-{
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- /* virtual method definition */
- camel_data_wrapper_class->write_to_buffer = _write_to_buffer;
- camel_data_wrapper_class->write_to_file = _write_to_file;
- camel_data_wrapper_class->construct_from_buffer = _construct_from_buffer;
- camel_data_wrapper_class->construct_from_file = _construct_from_file;
-
- /* virtual method overload */
-}
-
-
-
-
-
-
-
-GtkType
-camel_data_wrapper_get_type (void)
-{
- static GtkType camel_data_wrapper_type = 0;
-
- if (!camel_data_wrapper_type) {
- GtkTypeInfo camel_data_wrapper_info =
- {
- "CamelDataWrapper",
- sizeof (CamelDataWrapper),
- sizeof (CamelDataWrapperClass),
- (GtkClassInitFunc) camel_data_wrapper_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_data_wrapper_type = gtk_type_unique (gtk_object_get_type (), &camel_data_wrapper_info);
- }
-
- return camel_data_wrapper_type;
-}
-
-
-
-
-/**
- * _write_to_buffer: write data content in a byte buffer
- * @data_wrapper: the data wrapper object
- * @buffer: byte buffer where data will be written
- *
- * This method must be overriden by subclasses
- * Data must be written in the bytes buffer
- * in a architecture independant fashion.
- * If data is a standard data (for example an jpg image)
- * it must be serialized in the buffer exactly as it
- * would be saved on disk. A simple dump of the buffer in
- * a file should be sufficient for the data to be
- * re-read by a foreign application.
- *
- **/
-static void
-_write_to_buffer(CamelDataWrapper *data_wrapper, gchar *buffer)
-{
- /* nothing */
-}
-
-
-/**
- * camel_data_wrapper_write_to_buffer: write data in a memory buffer
- * @data_wrapper: the data wrapper object
- * @buffer: byte buffer where data will be written
- *
- * Write data content in a buffer. Data is stored in a machine
- * independant format.
- *
- **/
-void
-camel_data_wrapper_write_to_buffer(CamelDataWrapper *data_wrapper, gchar *buffer)
-{
- CDH_CLASS(data_wrapper)->write_to_buffer (data_wrapper, buffer);
-}
-
-
-
-static void
-_write_to_file(CamelDataWrapper *data_wrapper, FILE *file)
-{
- /* nothing */
-}
-
-
-/**
- * camel_data_wrapper_write_to_file: write data in a binary file
- * @data_wrapper: the data wrapper object
- * @file: file descriptoe where to write data
- *
- * Write data content in a binary file.
- *
- **/
-void
-camel_data_wrapper_write_to_file(CamelDataWrapper *data_wrapper, FILE *file)
-{
- CDH_CLASS(data_wrapper)->write_to_file (data_wrapper, file);
-}
-
-
-static void
-_construct_from_buffer(CamelDataWrapper *data_wrapper, gchar *buffer, guint size)
-{
- /* nothing */
-}
-
-void
-camel_data_wrapper_construct_from_buffer(CamelDataWrapper *data_wrapper, gchar *buffer, guint size)
-{
- CDH_CLASS(data_wrapper)->construct_from_buffer (data_wrapper, buffer, size);
-}
-
-
-
-static void
-_construct_from_file (CamelDataWrapper *data_wrapper, FILE *file, guint size)
-{
- /* nothing */
-}
-
-void
-camel_data_wrapper_construct_from_file (CamelDataWrapper *data_wrapper, FILE *file, guint size)
-{
- CDH_CLASS(data_wrapper)->construct_from_file (data_wrapper, file, size);
-}
-
-
-
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
deleted file mode 100644
index a4ec0220e2..0000000000
--- a/camel/camel-data-wrapper.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camelDataWrapper.h : Abstract class for a data wrapper */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_DATA_WRAPPER_H
-#define CAMEL_DATA_WRAPPER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <gtk/gtk.h>
-#include <stdio.h>
-
-
-
-
-#define CAMEL_DATA_WRAPPER_TYPE (camel_data_wrapper_get_type ())
-#define CAMEL_DATA_WRAPPER(obj) (GTK_CHECK_CAST((obj), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapper))
-#define CAMEL_DATA_WRAPPER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapperClass))
-#define IS_CAMEL_DATA_WRAPPER(o) (GTK_CHECK_TYPE((o), CAMEL_DATA_WRAPPER_TYPE))
-
-
-typedef struct
-{
- GtkObject parent_object;
-
- GString *mime_type;
-
-} CamelDataWrapper;
-
-
-
-typedef struct {
- GtkObjectClass parent_class;
-
- /* Virtual methods */
- void (*write_to_buffer) (CamelDataWrapper *data_wrapper, gchar *buffer);
- void (*write_to_file) (CamelDataWrapper *data_wrapper, FILE *file);
- void (*construct_from_buffer) (CamelDataWrapper *data_wrapper, gchar *buffer, guint size);
- void (*construct_from_file) (CamelDataWrapper *data_wrapper, FILE *file, guint size);
-
-} CamelDataWrapperClass;
-
-
-
-/* Standard Gtk function */
-GtkType camel_data_wrapper_get_type (void);
-
-
-/* public methods */
-void camel_data_wrapper_write_to_buffer(CamelDataWrapper *data_wrapper, gchar *buffer);
-void camel_data_wrapper_write_to_file(CamelDataWrapper *data_wrapper, FILE *file);
-void camel_data_wrapper_construct_from_buffer(CamelDataWrapper *data_wrapper, gchar *buffer, guint size);
-void camel_data_wrapper_construct_from_file (CamelDataWrapper *data_wrapper, FILE *file, guint size);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DATA_WRAPPER_H */
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
deleted file mode 100644
index 09ba5a7fa9..0000000000
--- a/camel/camel-folder.c
+++ /dev/null
@@ -1,658 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camelFolder.c : Abstract class for an email folder */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-folder.h"
-#include "gstring-util.h"
-
-static GtkObjectClass *parent_class=NULL;
-
-/* Returns the class for a CamelFolder */
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-
-static void _init_with_store (CamelFolder *folder, CamelStore *parent_store);
-static void _open (CamelFolder *folder, CamelFolderOpenMode mode);
-static void _close (CamelFolder *folder, gboolean expunge);
-static void _set_name (CamelFolder *folder, GString *name_);
-static void _set_full_name (CamelFolder *folder, GString *name);
-static GString *_get_name (CamelFolder *folder);
-static GString *_get_full_name (CamelFolder *folder);
-static gboolean _can_hold_folders (CamelFolder *folder);
-static gboolean _can_hold_messages(CamelFolder *folder);
-static gboolean _exists (CamelFolder *folder);
-static gboolean _is_open (CamelFolder *folder);
-static CamelFolder *_get_folder (CamelFolder *folder, GString *folder_name);
-static gboolean _create (CamelFolder *folder);
-static gboolean _delete (CamelFolder *folder, gboolean recurse);
-static gboolean _delete_messages (CamelFolder *folder);
-static CamelFolder *_get_parent_folder (CamelFolder *folder);
-static CamelStore *_get_parent_store (CamelFolder *folder);
-static CamelFolderOpenMode _get_mode (CamelFolder *folder);
-static GList *_list_subfolders (CamelFolder *folder);
-static GList *_expunge (CamelFolder *folder);
-
-static void
-camel_folder_class_init (CamelFolderClass *camel_folder_class)
-{
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- /* virtual method definition */
- camel_folder_class->init_with_store = _init_with_store;
- camel_folder_class->open = _open;
- camel_folder_class->close = _close;
- camel_folder_class->set_name = _set_name;
- camel_folder_class->get_name = _get_name;
- camel_folder_class->can_hold_folders = _can_hold_folders;
- camel_folder_class->can_hold_messages = _can_hold_messages;
- camel_folder_class->exists = _exists;
- camel_folder_class->is_open = _is_open;
- camel_folder_class->get_folder = _get_folder;
- camel_folder_class->create = _create;
- camel_folder_class->delete = _delete;
- camel_folder_class->delete_messages = _delete_messages;
- camel_folder_class->get_parent_folder = _get_parent_folder;
- camel_folder_class->get_parent_store = _get_parent_store;
- camel_folder_class->get_mode = _get_mode;
- camel_folder_class->list_subfolders = _list_subfolders;
- camel_folder_class->expunge = _expunge;
- /* virtual method overload */
-}
-
-
-
-
-
-
-
-GtkType
-camel_folder_get_type (void)
-{
- static GtkType camel_folder_type = 0;
-
- if (!camel_folder_type) {
- GtkTypeInfo camel_folder_info =
- {
- "CamelFolder",
- sizeof (CamelFolder),
- sizeof (CamelFolderClass),
- (GtkClassInitFunc) camel_folder_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_folder_type = gtk_type_unique (gtk_object_get_type (), &camel_folder_info);
- }
-
- return camel_folder_type;
-}
-
-
-
-
-/**
- * _init_with_store: init the folder by setting its parent store.
- * @folder: folder object to initialize
- * @parent_store: parent store object of the folder
- *
- *
- **/
-static void
-_init_with_store(CamelFolder *folder, CamelStore *parent_store)
-{
- g_assert(folder);
- g_assert(parent_store);
-
- folder->parent_store = parent_store;
-}
-
-
-
-
-/**
- * _open: Open a folder
- * @folder:
- * @mode: open mode (R/W/RW ?)
- *
- **/
-static void
-_open(CamelFolder *folder, CamelFolderOpenMode mode)
-{
- folder->open_state = FOLDER_OPEN;
- folder->open_mode = mode;
-}
-
-
-/**
- * _close:Close a folder.
- * @folder:
- * @expunge: if TRUE, the flagged message are deleted.
- *
- * Put a folder in its closed state, and possibly
- * expunge the flagged messages.
- **/
-static void
-_close(CamelFolder *folder, gboolean expunge)
-{
- if (expunge) CF_CLASS(folder)->expunge(folder);
- folder->open_state = FOLDER_CLOSE;
-}
-
-
-
-
-/**
- * _set_name:set the (short) name of the folder
- * @folder: folder
- * @name: new name of the folder
- *
- * set the name of the folder.
- * The old name object is freed.
- *
- **/
-static void
-_set_name(CamelFolder *folder, GString *name)
-{
- if (folder->name) g_string_free(folder->name, 0);;
- folder->name = name;
-}
-
-
-
-/**
- * _set_full_name:set the (full) name of the folder
- * @folder: folder
- * @name: new name of the folder
- *
- * set the name of the folder.
- * The old name object is freed.
- *
- **/
-static void
-_set_full_name(CamelFolder *folder, GString *name)
-{
- if (folder->full_name) g_string_free(folder->full_name, 0);;
- folder->full_name = name;
-}
-
-
-
-
-/**
- * _get_name: get the (short) name of the folder
- * @folder:
- *
- * get the name of the folder. The fully qualified name
- * can be obtained with the get_full_ame method (not implemented)
- *
- * Return value: name of the folder
- **/
-static GString *
-_get_name(CamelFolder *folder)
-{
- return folder->name;
-}
-
-
-/**
- * _get_full_name:get the (full) name of the folder
- * @folder: folder to get the name
- *
- * get the name of the folder.
- *
- * Return value: full name of the folder
- **/
-static GString *
-_get_full_name(CamelFolder *folder)
-{
- return folder->full_name;
-}
-
-
-
-/**
- * _can_hold_folders: tests if the folder can contain other folders
- * @folder:
- *
- *
- *
- * Return value:
- **/
-static gboolean
-_can_hold_folders(CamelFolder *folder)
-{
- return folder->can_hold_folders;
-}
-
-
-
-
-/**
- * _can_hold_messages: tests if the folder can contain messages
- * @folder:
- *
- *
- *
- * Return value:
- **/
-static gboolean
-_can_hold_messages(CamelFolder *folder)
-{
- return folder->can_hold_messages;
-}
-
-
-
-/**
- * _exists: tests if the folder object exists on the store.
- * @folder:
- *
- *
- *
- * Return value:
- **/
-static gboolean
-_exists(CamelFolder *folder)
-{
- return folder->exists_on_store;
-}
-
-
-
-/**
- * _is_open:
- * @folder:
- *
- *
- *
- * Return value:
- **/
-static gboolean
-_is_open(CamelFolder *folder)
-{
- return (folder->open_state==FOLDER_OPEN);
-}
-
-
-
-
-/**
- * _get_folder: return the (sub)folder object that
- * is specified.
- *
- * This method returns a folder objects. This folder
- * is necessarily a subfolder of the current folder.
- * It is an error to ask a folder begining with the
- * folder separator character.
- *
- * @folder : the folder
- * @folderName: subfolder path. NULL if the subfolder object
- * could not be created
- **/
-static CamelFolder *
-_get_folder(CamelFolder *folder, GString *folder_name)
-{
- g_warning("getFolder called on the abstract CamelFolder class\n");
- return NULL;
-}
-
-/**
- * camel_folder_get_folder: return the (sub)folder object that
- * is specified.
- *
- * This method returns a folder objects. This folder
- * is necessarily a subfolder of the current folder.
- * It is an error to ask a folder begining with the
- * folder separator character.
- *
- * @folder : the folder
- * @folderName: subfolder path. NULL if the subfolder object
- * could not be created
- **/
-CamelFolder *
-camel_folder_get_folder(CamelFolder *folder, GString *folder_name)
-{
- return (CF_CLASS(folder)->get_folder(folder,folder_name));
-}
-
-
-
-
-/**
- * _create:
- * @folder:
- *
- * this routine handles the recursion mechanism.
- * Children classes have to implement the actual
- * creation mechanism. They must call this method
- * before physically creating the folder in order
- * to be sure the parent folder exists.
- *
- * Return value:
- **/
-static gboolean
-_create(CamelFolder *folder)
-{
- GString *prefix;
- gchar dich_result;
- CamelFolder *parent;
- gchar sep;
-
-
- g_assert(folder->parent_store);
- g_assert(folder->name);
-
- if ( CF_CLASS(folder)->exists(folder) ) return TRUE;
- sep = camel_store_get_separator(folder->parent_store);
- if (folder->parent_folder) camel_folder_create(folder->parent_folder);
- else {
- if (folder->full_name) {
- dich_result = g_string_right_dichotomy(folder->full_name, sep, &prefix, NULL, STRIP_TRAILING);
- if (dich_result!='o') {
- g_warning("I have to handle the case where the path is not OK\n");
- return FALSE;
- } else {
- parent = camel_store_get_folder(folder->parent_store, prefix);
- camel_folder_create(parent);
- gtk_object_unref (GTK_OBJECT(parent));
- }
- }
- }
- return TRUE;
-}
-
-
-/**
- * camel_folder_create: create the folder object on the physical store
- * @folder: folder object to create
- *
- * This routine physically creates the folder object on
- * the store. Having created the object does not
- * mean the folder physically exists. If it does not
- * exists, this routine will create it.
- * if the folder full name contains more than one level
- * of hierarchy, all folders between the current folder
- * and the last folder name will be created if not existing.
- *
- * Return value:
- **/
-gboolean
-camel_folder_create(CamelFolder *folder)
-{
- return (CF_CLASS(folder)->create(folder));
-}
-
-
-
-
-
-/**
- * _delete: delete folder
- * @folder: folder to delete
- * @recurse: true is subfolders must also be deleted
- *
- * Delete a folder and its subfolders (if recurse is TRUE).
- * The scheme is the following:
- * 1) delete all messages in the folder
- * 2) if recurse is FALSE, and if there are subfolders
- * return FALSE, else delete current folder and retuen TRUE
- * if recurse is TRUE, delete subfolders, delete
- * current folder and return TRUE
- *
- * subclasses implementing a protocol with a different
- * deletion behaviour must emulate this one or implement
- * empty folders deletion and call this routine which
- * will do all the works for them.
- * Opertions must be done in the folllowing order:
- * - call this routine
- * - delete empty folder
- *
- * Return value: true if the folder has been deleted
- **/
-static gboolean
-_delete (CamelFolder *folder, gboolean recurse)
-{
- GList *subfolders=NULL;
- GList *sf;
- gboolean ok;
-
- g_assert(folder);
-
- /* method valid only on closed folders */
- if (folder->open_state != FOLDER_CLOSE) return FALSE;
-
- /* delete all messages in the folder */
- CF_CLASS(folder)->delete_messages(folder);
-
- subfolders = CF_CLASS(folder)->list_subfolders(folder);
- if (recurse) { /* delete subfolders */
- if (subfolders) {
- sf = subfolders;
- do {
- CF_CLASS(sf->data)->delete(sf->data, TRUE);;
- } while (sf = sf->next);
- }
- } else if (subfolders) return FALSE;
-
-
- return TRUE;
-}
-
-
-
-/**
- * camel_folder_delete: delete a folder
- * @folder: folder to delete
- * @recurse: TRUE if subfolders must be deleted
- *
- * Delete a folder. All messages in the folder
- * are deleted before the folder is deleted.
- * When recurse is true, all subfolders are
- * deleted too. When recurse is FALSE and folder
- * contains subfolders, all messages are deleted,
- * but folder deletion fails.
- *
- * Return value: TRUE if deletion was successful
- **/
-gboolean camel_folder_delete (CamelFolder *folder, gboolean recurse)
-{
- return CF_CLASS(folder)->delete(folder, recurse);
-}
-
-
-
-
-
-/**
- * _delete_messages: delete all messages in the folder
- * @folder:
- *
- *
- *
- * Return value:
- **/
-static gboolean
-_delete_messages(CamelFolder *folder)
-{
- return TRUE;
-}
-
-
-/**
- * camel_folder_delete_messages: delete all messages in the folder
- * @folder: folder
- *
- * delete all messages stored in a folder
- *
- * Return value: TRUE if the messages could be deleted
- **/
-gboolean
-camel_folder_delete_messages (CamelFolder *folder)
-{
- return CF_CLASS(folder)->delete_messages(folder);
-}
-
-
-
-
-
-
-/**
- * _get_parent_folder: return parent folder
- * @folder: folder to get the parent
- *
- *
- *
- * Return value:
- **/
-static CamelFolder *
-_get_parent_folder (CamelFolder *folder)
-{
- return folder->parent_folder;
-}
-
-
-/**
- * camel_folder_get_parent_folder:return parent folder
- * @folder: folder to get the parent
- *
- *
- *
- * Return value:
- **/
-CamelFolder *
-camel_folder_get_parent_folder (CamelFolder *folder)
-{
- return CF_CLASS(folder)->get_parent_folder(folder);
-}
-
-
-/**
- * _get_parent_store: return parent store
- * @folder: folder to get the parent
- *
- *
- *
- * Return value:
- **/
-static CamelStore *
-_get_parent_store (CamelFolder *folder)
-{
- return folder->parent_store;
-}
-
-
-/**
- * camel_folder_get_parent_store:return parent store
- * @folder: folder to get the parent
- *
- *
- *
- * Return value:
- **/
-CamelStore *
-camel_folder_get_parent_store (CamelFolder *folder)
-{
- return CF_CLASS(folder)->get_parent_store(folder);
-}
-
-
-
-/**
- * _get_mode: return the open mode of a folder
- * @folder:
- *
- *
- *
- * Return value: open mode of the folder
- **/
-static CamelFolderOpenMode
-_get_mode(CamelFolder *folder)
-{
- return folder->open_mode;
-}
-
-
-/**
- * camel_folder_get_mode: return the open mode of a folder
- * @folder:
- *
- *
- *
- * Return value: open mode of the folder
- **/
-CamelFolderOpenMode
-camel_folder_get_mode(CamelFolder *folder)
-{
- return CF_CLASS(folder)->get_mode(folder);
-}
-
-
-
-
-static GList *
-_list_subfolders(CamelFolder *folder)
-{
- return NULL;
-}
-
-
-/**
- * camel_folder_list_subfolders: list subfolders in a folder
- * @folder: the folder
- *
- * List subfolders in a folder.
- *
- * Return value: list of subfolders
- **/
-GList *
-camel_folder_list_subfolders(CamelFolder *folder)
-{
- return CF_CLASS(folder)->list_subfolders(folder);
-}
-
-
-
-
-static GList *
-_expunge(CamelFolder *folder)
-{
- return NULL;
-}
-
-
-/**
- * camel_folder_expunge: physically delete messages marked as DELETED
- * @folder: the folder
- *
- * Delete messages which have been marked as deleted.
- *
- *
- * Return value: list of expunged message objects.
- **/
-GList *
-camel_folder_expunge(CamelFolder *folder)
-{
- return CF_CLASS(folder)->expunge(folder);
-}
-
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
deleted file mode 100644
index 8d4a9f4aef..0000000000
--- a/camel/camel-folder.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camelFolder.h : Abstract class for an email folder */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_FOLDER_H
-#define CAMEL_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <gtk/gtk.h>
-
-typedef struct _CamelFolder CamelFolder;
-
-#include "camel-store.h"
-
-#define CAMEL_FOLDER_TYPE (camel_folder_get_type ())
-#define CAMEL_FOLDER(obj) (GTK_CHECK_CAST((obj), CAMEL_FOLDER_TYPE, CamelFolder))
-#define CAMEL_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_FOLDER_TYPE, CamelFolderClass))
-#define IS_CAMEL_FOLDER(o) (GTK_CHECK_TYPE((o), CAMEL_FOLDER_TYPE))
-
-typedef enum {
- FOLDER_OPEN,
- FOLDER_CLOSE
-} CamelFolderState;
-
-typedef enum {
- FOLDER_OPEN_UNKNOWN, /* folder open mode is unknown */
- FOLDER_OPEN_READ, /* folder is read only */
- FOLDER_OPEN_READ_WRITE /* folder is read/write */
-} CamelFolderOpenMode;
-
-
-
-struct _CamelFolder
-{
- GtkObject parent_object;
-
- GList *message_list;
- gboolean can_hold_folders;
- gboolean can_hold_messages;
- gboolean exists_on_store;
- CamelFolderOpenMode open_mode;
- CamelFolderState open_state;
- GString *name;
- GString *full_name;
- CamelStore *parent_store;
- CamelFolder *parent_folder;
-
-};
-
-
-
-typedef struct {
- GtkObjectClass parent_class;
-
- /* Virtual methods */
- void (*init_with_store) (CamelFolder *folder, CamelStore *parent_store);
- void (*open) (CamelFolder *object, CamelFolderOpenMode mode);
- void (*close) (CamelFolder *folder, gboolean expunge);
- void (*set_name) (CamelFolder *folder, GString *name);
- void (*set_full_name) (CamelFolder *folder, GString *name);
- GString * (*get_name) (CamelFolder *folder);
- GString * (*get_full_name) (CamelFolder *folder);
- gboolean (*can_hold_folders) (CamelFolder *folder);
- gboolean (*can_hold_messages) (CamelFolder *folder);
- gboolean (*exists) (CamelFolder *folder);
- gboolean (*is_open) (CamelFolder *folder);
- CamelFolder * (*get_folder) (CamelFolder *folder, GString *folder_name);
- gboolean (*create) (CamelFolder *folder);
- gboolean (*delete) (CamelFolder *folder, gboolean recurse);
- gboolean (*delete_messages) (CamelFolder *folder);
- CamelFolder * (*get_parent_folder) (CamelFolder *folder);
- CamelStore * (*get_parent_store) (CamelFolder *folder);
- CamelFolderOpenMode (*get_mode) (CamelFolder *folder);
- GList * (*list_subfolders) (CamelFolder *folder);
- GList * (*expunge) (CamelFolder *folder);
-} CamelFolderClass;
-
-
-
-/* Standard Gtk function */
-GtkType camel_folder_get_type (void);
-
-
-/* public methods */
-CamelFolder *camel_folder_get_folder(CamelFolder *folder, GString *folder_name);
-gboolean camel_folder_create(CamelFolder *folder);
-gboolean camel_folder_delete (CamelFolder *folder, gboolean recurse);
-gboolean camel_folder_delete_messages (CamelFolder *folder);
-CamelFolder *camel_folder_get_parent_folder (CamelFolder *folder);
-CamelStore *camel_folder_get_parent_store (CamelFolder *folder);
-CamelFolderOpenMode camel_folder_get_mode(CamelFolder *folder);
-GList *camel_folder_list_subfolders(CamelFolder *folder);
-GList *camel_folder_expunge(CamelFolder *folder);
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_FOLDER_H */
diff --git a/camel/camel-log.c b/camel/camel-log.c
deleted file mode 100644
index fba71e9414..0000000000
--- a/camel/camel-log.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include "camel-log.h"
-
-int camel_debug_level = 10;
-FILE *camel_log_file_descriptor = stderr;
-
-void
-camel_log(CamelLogLevel level, const gchar *format, ... )
-{
- va_list args;
- if (level<=camel_debug_level)
- {
- va_start(args, format);
- vfprintf(camel_log_file_descriptor, format, args);
- va_end (args);
- }
-}
diff --git a/camel/camel-log.h b/camel/camel-log.h
deleted file mode 100644
index 2e68fdc770..0000000000
--- a/camel/camel-log.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef CAMEL_LOG_H
-#define CAMEL_LOG_H
-
-
-#include <stdarg.h>
-#include <glib.h>
-#include <stdio.h>
-
-extern int camel_debug_level;
-extern FILE *camel_log_file_descriptor;
-
-typedef enum {
- NO_LOG = 0,
- FULL_DEBUG = 10
-} CamelLogLevel;
-
-/* the goal here is to be able to have a hard maximum log
-level, given at compilation time, and a soft one, given at
-runtime (with camel_debug_level). For the moment, only
-soft level is implmented, but one day, when performance
-become important, I will set the hard one too */
-
-#define CAMEL_LOG(level, args...) camel_log(level,##args)
-
-extern void camel_log(CamelLogLevel level, const gchar *format, ... );
-
-#endif /* CAMEL_LOG_H */
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
deleted file mode 100644
index 3427dccf8f..0000000000
--- a/camel/camel-mime-part.c
+++ /dev/null
@@ -1,457 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camelMimePart.c : Abstract class for a mime_part */
-
-/** THIS IS MOSTLY AN ABSTRACT CLASS THAT SHOULD HAVE BEEN AN
- INTERFACE. **/
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-mime-part.h"
-#include <stdio.h>
-
-
-static CamelDataWrapperClass *parent_class=NULL;
-
-/* Returns the class for a CamelMimePart */
-#define CMP_CLASS(so) CAMEL_MIME_PART_CLASS (GTK_OBJECT(so)->klass)
-
-static void _add_header (CamelMimePart *mime_part, GString *header_name, GString *header_value);
-static void _remove_header (CamelMimePart *mime_part, GString *header_name);
-static GString *_get_header (CamelMimePart *mime_part, GString *header_name);
-static void _set_description (CamelMimePart *mime_part, GString *description);
-static GString *_get_description (CamelMimePart *mime_part);
-static void _set_disposition (CamelMimePart *mime_part, GString *disposition);
-static GString *_get_disposition (CamelMimePart *mime_part);
-static void _set_filename (CamelMimePart *mime_part, GString *filename);
-static GString *_get_filename (CamelMimePart *mime_part);
-static void _set_content_id (CamelMimePart *mime_part, GString *content_id);
-static GString *_get_content_id (CamelMimePart *mime_part);
-static void _set_content_MD5 (CamelMimePart *mime_part, GString *content_MD5);
-static GString *_get_content_MD5 (CamelMimePart *mime_part);
-static void _set_encoding (CamelMimePart *mime_part, GString *encoding);
-static GString *_get_encoding (CamelMimePart *mime_part);
-static void _set_content_languages (CamelMimePart *mime_part, GList *content_languages);
-static GList *_get_content_languages (CamelMimePart *mime_part);
-static void _set_header_lines (CamelMimePart *mime_part, GList *header_lines);
-static GList *_get_header_lines (CamelMimePart *mime_part);
-
-static CamelDataWrapper *_get_content_object(CamelMimePart *mime_part);
-static void _write_to_file(CamelDataWrapper *data_wrapper, FILE *file);
-
-
-
-
-static void
-camel_mime_part_class_init (CamelMimePartClass *camel_mime_part_class)
-{
- CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (camel_mime_part_class);
- parent_class = gtk_type_class (camel_data_wrapper_get_type ());
-
- /* virtual method definition */
- camel_mime_part_class->add_header=_add_header;
- camel_mime_part_class->remove_header=_remove_header;
- camel_mime_part_class->get_header=_get_header;
- camel_mime_part_class->set_description=_set_description;
- camel_mime_part_class->get_description=_get_description;
- camel_mime_part_class->set_disposition=_set_disposition;
- camel_mime_part_class->get_disposition=_get_disposition;
- camel_mime_part_class->set_filename=_set_filename;
- camel_mime_part_class->get_filename=_get_filename;
- camel_mime_part_class->set_content_id=_set_content_id;
- camel_mime_part_class->get_content_id=_get_content_id;
- camel_mime_part_class->set_content_MD5=_set_content_MD5;
- camel_mime_part_class->get_content_MD5=_get_content_MD5;
- camel_mime_part_class->set_encoding=_set_encoding;
- camel_mime_part_class->get_encoding=_get_encoding;
- camel_mime_part_class->set_content_languages=_set_content_languages;
- camel_mime_part_class->get_content_languages=_get_content_languages;
- camel_mime_part_class->set_header_lines=_set_header_lines;
- camel_mime_part_class->get_header_lines=_get_header_lines;
-
- camel_mime_part_class->get_content_object = _get_content_object;
-
- /* virtual method overload */
- camel_data_wrapper_class->write_to_file = _write_to_file;
-}
-
-
-
-
-
-
-
-GtkType
-camel_mime_part_get_type (void)
-{
- static GtkType camel_mime_part_type = 0;
-
- if (!camel_mime_part_type) {
- GtkTypeInfo camel_mime_part_info =
- {
- "CamelMimePart",
- sizeof (CamelMimePart),
- sizeof (CamelMimePartClass),
- (GtkClassInitFunc) camel_mime_part_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_mime_part_type = gtk_type_unique (camel_data_wrapper_get_type (), &camel_mime_part_info);
- }
-
- return camel_mime_part_type;
-}
-
-
-
-
-static void
-_add_header (CamelMimePart *mime_part, GString *header_name, GString *header_value)
-{
- gboolean header_exists;
- GString *old_header_name;
- GString *old_header_value;
-
- header_exists = g_hash_table_lookup_extended (mime_part->headers, header_name,
- (gpointer *) &old_header_name,
- (gpointer *) &old_header_value);
- if (header_exists) {
- g_string_free (old_header_name, TRUE);
- g_string_free (old_header_value, TRUE);
- }
-
- g_hash_table_insert (mime_part->headers, header_name, header_value);
-}
-
-
-void
-camel_mime_part_add_header (CamelMimePart *mime_part, GString *header_name, GString *header_value)
-{
- CMP_CLASS(mime_part)->add_header(mime_part, header_name, header_value);
-}
-
-
-
-static void
-_remove_header (CamelMimePart *mime_part, GString *header_name)
-{
-
- gboolean header_exists;
- GString *old_header_name;
- GString *old_header_value;
-
- header_exists = g_hash_table_lookup_extended (mime_part->headers, header_name,
- (gpointer *) &old_header_name,
- (gpointer *) &old_header_value);
- if (header_exists) {
- g_string_free (old_header_name, TRUE);
- g_string_free (old_header_value, TRUE);
- }
-
- g_hash_table_remove (mime_part->headers, header_name);
-
-}
-
-void
-camel_mime_part_remove_header (CamelMimePart *mime_part, GString *header_name)
-{
- CMP_CLASS(mime_part)->remove_header(mime_part, header_name);
-}
-
-
-
-static GString *
-_get_header (CamelMimePart *mime_part, GString *header_name)
-{
-
- GString *old_header_name;
- GString *old_header_value;
- GString *header_value;
-
- header_value = (GString *)g_hash_table_lookup (mime_part->headers, header_name);
- return header_value;
-}
-
-GString *
-camel_mime_part_get_header (CamelMimePart *mime_part, GString *header_name)
-{
- return CMP_CLASS(mime_part)->get_header (mime_part, header_name);
-}
-
-
-
-static void
-_set_description (CamelMimePart *mime_part, GString *description)
-{
- if (mime_part->description) g_free(mime_part->description);
- mime_part->description = description;
-}
-
-void
-camel_mime_part_set_description (CamelMimePart *mime_part, GString *description)
-{
- CMP_CLASS(mime_part)->set_description (mime_part, description);
-}
-
-
-
-
-static GString *
-_get_description (CamelMimePart *mime_part)
-{
- return mime_part->description;
-}
-
-GString *
-camel_mime_part_get_description (CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_description (mime_part);
-}
-
-
-
-static void
-_set_disposition (CamelMimePart *mime_part, GString *disposition)
-{
- if (mime_part->disposition) g_free(mime_part->disposition);
- mime_part->disposition = disposition;
-}
-
-
-void
-camel_mime_part_set_disposition (CamelMimePart *mime_part, GString *disposition)
-{
- CMP_CLASS(mime_part)->set_disposition (mime_part, disposition);
-}
-
-
-
-static GString *
-_get_disposition (CamelMimePart *mime_part)
-{
- return mime_part->disposition;
-}
-
-
-GString *
-camel_mime_part_get_disposition (CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_disposition (mime_part);
-}
-
-
-
-static void
-_set_filename (CamelMimePart *mime_part, GString *filename)
-{
- if (mime_part->filename) g_free(mime_part->filename);
- mime_part->filename = filename;
-}
-
-
-void
-camel_mime_part_set_filename (CamelMimePart *mime_part, GString *filename)
-{
- CMP_CLASS(mime_part)->set_filename (mime_part, filename);
-}
-
-
-
-static GString *
-_get_filename (CamelMimePart *mime_part)
-{
- return mime_part->filename;
-}
-
-
-GString *
-camel_mime_part_get_filename (CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_filename (mime_part);
-}
-
-
-/* this routine must not be public */
-static void
-_set_content_id (CamelMimePart *mime_part, GString *content_id)
-{
- if (mime_part->content_id) g_free(mime_part->content_id);
- mime_part->content_id = content_id;
-}
-
-
-static GString *
-_get_content_id (CamelMimePart *mime_part)
-{
- return mime_part->content_id;
-}
-
-
-GString *
-camel_mime_part_get_content_id (CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_content_id (mime_part);
-}
-
-
-/* this routine must not be public */
-static void
-_set_content_MD5 (CamelMimePart *mime_part, GString *content_MD5)
-{
- if (mime_part->content_MD5) g_free(mime_part->content_MD5);
- mime_part->content_MD5 = content_MD5;
-}
-
-
-static GString *
-_get_content_MD5 (CamelMimePart *mime_part)
-{
- return mime_part->content_MD5;
-}
-
-GString *
-camel_mime_part_get_content_MD5 (CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_content_MD5 (mime_part);
-}
-
-
-
-static void
-_set_encoding (CamelMimePart *mime_part, GString *encoding)
-{
- if (mime_part->encoding) g_free(mime_part->encoding);
- mime_part->encoding = encoding;
-}
-
-void
-camel_mime_part_set_encoding (CamelMimePart *mime_part, GString *encoding)
-{
- CMP_CLASS(mime_part)->set_encoding (mime_part, encoding);
-}
-
-
-
-static GString *
-_get_encoding (CamelMimePart *mime_part)
-{
- return mime_part->encoding;
-}
-
-GString *
-camel_mime_part_get_encoding (CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_encoding (mime_part);
-}
-
-
-
-
-static void
-_set_content_languages (CamelMimePart *mime_part, GList *content_languages)
-{
- if (mime_part->content_languages) g_string_list_free(mime_part->content_languages);
- mime_part->content_languages = content_languages;
-}
-
-void
-camel_mime_part_set_content_languages (CamelMimePart *mime_part, GList *content_languages)
-{
- CMP_CLASS(mime_part)->set_content_languages (mime_part, content_languages);
-}
-
-
-
-static GList *
-_get_content_languages (CamelMimePart *mime_part)
-{
- return mime_part->content_languages;
-}
-
-
-GList *
-camel_mime_part_get_content_languages (CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_content_languages (mime_part);
-}
-
-
-
-static void
-_set_header_lines (CamelMimePart *mime_part, GList *header_lines)
-{
- if (mime_part->header_lines) g_string_list_free(mime_part->header_lines);
- mime_part->header_lines = header_lines;
-}
-
-void
-camel_mime_part_set_header_lines (CamelMimePart *mime_part, GList *header_lines)
-{
- CMP_CLASS(mime_part)->set_header_lines (mime_part, header_lines);
-}
-
-
-
-static GList *
-_get_header_lines (CamelMimePart *mime_part)
-{
- return mime_part->header_lines;
-}
-
-
-
-GList *
-camel_mime_part_get_header_lines (CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_header_lines (mime_part);
-}
-
-
-
-
-static CamelDataWrapper *
-_get_content_object(CamelMimePart *mime_part)
-{
- return mime_part->content;
-
-}
-CamelDataWrapper *
-camel_mime_part_get_content_object(CamelMimePart *mime_part)
-{
- return CMP_CLASS(mime_part)->get_content_object (mime_part);
-}
-
-#ifdef WHPTF
-#warning : WHPTF is already defined !!!!!!
-#endif
-#define WHPTF camel_mime_utils_write_header_pair_to_file
-
-static void
-_write_to_file(CamelDataWrapper *data_wrapper, FILE *file)
-{
- CamelMimePart *mp = CAMEL_MIME_PART (data_wrapper);
- WHPTF (file, "Content-type", CAMEL_DATA_WRAPPER(mp)->mime_type);
- WHPTF (file, "Content-Description", mp->description);
-
-}
-
diff --git a/camel/camel-mime-part.h b/camel/camel-mime-part.h
deleted file mode 100644
index 8f067fd403..0000000000
--- a/camel/camel-mime-part.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camelMimePart.h : class for a mime part */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MIME_PART_H
-#define CAMEL_MIME_PART_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <gtk/gtk.h>
-#include "camel-data-wrapper.h"
-
-
-
-#define CAMEL_MIME_PART_TYPE (camel_mime_part_get_type ())
-#define CAMEL_MIME_PART(obj) (GTK_CHECK_CAST((obj), CAMEL_MIME_PART_TYPE, CamelMimePart))
-#define CAMEL_MIME_PART_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MIME_PART_TYPE, CamelMimePartClass))
-#define IS_CAMEL_MIME_PART(o) (GTK_CHECK_TYPE((o), CAMEL_MIME_PART_TYPE))
-
-
-
-typedef struct
-{
- CamelDataWrapper parent_object;
-
- GHashTable *headers;
- GString *description;
- GString *disposition;
- GString *content_id;
- GString *content_MD5;
- GList *content_languages;
- GString *encoding;
- GString *filename;
- GList *header_lines;
-
- CamelDataWrapper *content; /* part real content */
-
-} CamelMimePart;
-
-
-
-typedef struct {
- CamelDataWrapperClass parent_class;
-
- /* Virtual methods */
- void (*add_header) (CamelMimePart *mime_part, GString *header_name, GString *header_value);
- void (*remove_header) (CamelMimePart *mime_part, GString *header_name);
- GString * (*get_header) (CamelMimePart *mime_part, GString *header_name);
- void (*set_description) (CamelMimePart *mime_part, GString *description);
- GString * (*get_description) (CamelMimePart *mime_part);
- void (*set_disposition) (CamelMimePart *mime_part, GString *disposition);
- GString * (*get_disposition) (CamelMimePart *mime_part);
- void (*set_filename) (CamelMimePart *mime_part, GString *filename);
- GString * (*get_filename) (CamelMimePart *mime_part);
- void (*set_content_id) (CamelMimePart *mime_part, GString *content_id);
- GString * (*get_content_id) (CamelMimePart *mime_part);
- void (*set_content_MD5) (CamelMimePart *mime_part, GString *content_MD5);
- GString * (*get_content_MD5) (CamelMimePart *mime_part);
- void (*set_encoding) (CamelMimePart *mime_part, GString *encoding);
- GString * (*get_encoding) (CamelMimePart *mime_part);
- void (*set_content_languages) (CamelMimePart *mime_part, GList *content_languages);
- GList * (*get_content_languages) (CamelMimePart *mime_part);
- void (*set_header_lines) (CamelMimePart *mime_part, GList *header_lines);
- GList * (*get_header_lines) (CamelMimePart *mime_part);
-
- CamelDataWrapper * (*get_content_object) (CamelMimePart *mime_part);
-} CamelMimePartClass;
-
-
-
-/* Standard Gtk function */
-GtkType camel_mime_part_get_type (void);
-
-
-/* public methods */
-void camel_mime_part_add_header (CamelMimePart *mime_part, GString *header_name, GString *header_value);
-void camel_mime_part_remove_header (CamelMimePart *mime_part, GString *header_name);
-GString *camel_mime_part_get_header (CamelMimePart *mime_part, GString *header_name);
-void camel_mime_part_set_description (CamelMimePart *mime_part, GString *description);
-GString *camel_mime_part_get_description (CamelMimePart *mime_part);
-void camel_mime_part_set_disposition (CamelMimePart *mime_part, GString *disposition);
-GString *camel_mime_part_get_disposition (CamelMimePart *mime_part);
-void camel_mime_part_set_filename (CamelMimePart *mime_part, GString *filename);
-GString *camel_mime_part_get_filename (CamelMimePart *mime_part);
-GString *camel_mime_part_get_content_id (CamelMimePart *mime_part);
-GString *camel_mime_part_get_content_MD5 (CamelMimePart *mime_part);
-void camel_mime_part_set_encoding (CamelMimePart *mime_part, GString *encoding);
-GString *camel_mime_part_get_encoding (CamelMimePart *mime_part);
-void camel_mime_part_set_content_languages (CamelMimePart *mime_part, GList *content_languages);
-GList *camel_mime_part_get_content_languages (CamelMimePart *mime_part);
-void camel_mime_part_set_header_lines (CamelMimePart *mime_part, GList *header_lines);
-GList *camel_mime_part_get_header_lines (CamelMimePart *mime_part);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MIME_PART_H */
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
deleted file mode 100644
index fde9202730..0000000000
--- a/camel/camel-mime-utils.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mime-utils.c : misc utilities for mime */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#include "camel-mime-utils.h"
-void
-camel_mime_utils_write_header_pair_to_file(FILE* file, gchar* name, GString *value)
-{
- g_assert(name);
-
- if ((value) && (value->str))
- fprintf(file, "%s: %s\n", name, value->str);
-}
-
-
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
deleted file mode 100644
index acc86de26e..0000000000
--- a/camel/camel-mime-utils.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mime-utils.h : misc utilities for mime */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MIME_UTILS_H
-#define CAMEL_MIME_UTILS_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-#include <stdio.h>
-
-void camel_mime_utils_write_header_pair_to_file(FILE* file, gchar* name, GString *value);
-
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MIME_UTILS_H */
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
deleted file mode 100644
index 238b83ce29..0000000000
--- a/camel/camel-provider.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-provider.c : provider management */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-/*
-
- Here will be the routine to load providers (plugins)
- and register them */
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
deleted file mode 100644
index 54b9ef2a2a..0000000000
--- a/camel/camel-provider.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-provider.h : provider management */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_PROVIDER_H
-#define CAMEL_PROVIDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-typedef enum {
- PROVIDER_STORE,
- PROVIDER_TRANSPORT
-} ProviderType;
-
-
-typedef struct {
- GtkType object_type; /* used to create instance of the provider */
- ProviderType provider_type; /* is a store or a transport */
- gchar *protocol; /* name of the protocol ("imap"/"smtp"/"mh" ...) */
- gchar *provider_name; /* name of the provider ("Raymond the imap provider") */
- gchar *description; /* Useful when multiple providers are available for a same protocol */
-} CamelProvider;
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_PROVIDER_H */
diff --git a/camel/camel-service.c b/camel/camel-service.c
deleted file mode 100644
index 2ca3d6f352..0000000000
--- a/camel/camel-service.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camelService.c : Abstract class for an email service */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-service.h"
-
-static GtkObjectClass *parent_class=NULL;
-
-/* Returns the class for a CamelService */
-#define CSERV_CLASS(so) CAMEL_SERVICE_CLASS (GTK_OBJECT(so)->klass)
-
-static void _connect(CamelService *service);
-static void _connect_to_with_login_passwd(CamelService *service, GString *host, GString *login, GString *passwd);
-static void _connect_to_with_login_passwd_port(CamelService *service, GString *host, GString *login, GString *passwd, guint port);
-static gboolean _is_connected(CamelService *service);
-static void _set_connected(CamelService *service, gboolean state);
-static GString *_get_url(CamelService *service);
-
-static void
-camel_service_class_init (CamelServiceClass *camel_service_class)
-{
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- /* virtual method definition */
- camel_service_class->connect = _connect;
- camel_service_class->connect_to_with_login_passwd = _connect_to_with_login_passwd;
- camel_service_class->connect_to_with_login_passwd_port = _connect_to_with_login_passwd_port;
- camel_service_class->is_connected = _is_connected;
- camel_service_class->set_connected = _set_connected;
- camel_service_class->get_url = _get_url;
-
- /* virtual method overload */
-}
-
-
-
-
-
-
-
-GtkType
-camel_service_get_type (void)
-{
- static GtkType camel_service_type = 0;
-
- if (!camel_service_type) {
- GtkTypeInfo camel_service_info =
- {
- "CamelService",
- sizeof (CamelService),
- sizeof (CamelServiceClass),
- (GtkClassInitFunc) camel_service_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_service_type = gtk_type_unique (gtk_object_get_type (), &camel_service_info);
- }
-
- return camel_service_type;
-}
-
-
-
-
-
-/**
- * _connect : connect to a service
- *
- * connect to the service using the parameters
- * stored in the session it is initialized with
- * WARNING: session not implemented for the moment
- *
- * @service: object to connect
- **/
-static void
-_connect(CamelService *service)
-{
- CSERV_CLASS(service)->set_connected(service, TRUE);
-}
-
-
-/**
- * camel_service_connect : connect to a service
- *
- * connect to the service using the parameters
- * stored in the session it is initialized with
- * WARNING: session not implemented for the moment
- *
- * @service: object to connect to
- **/
-void
-camel_service_connect(CamelService *service)
-{
- CSERV_CLASS(service)->connect(service);
-}
-
-
-
-/**
- * _connect_to: connect to the specified address
- *
- * Connect to the service, but do not use the session
- * default parameters to retrieve server's address
- *
- * @service: object to connect
- * @host: host to connect to
- * @login: user name used to log in
- * @passwd: password used to log in
- **/
-static void
-_connect_to_with_login_passwd(CamelService *service, GString *host, GString *login, GString *passwd)
-{
- CSERV_CLASS(service)->set_connected(service, TRUE);
-}
-
-/**
- * camel_service_connect_to_with_login_passwd: connect a service
- * @service: the service to connect
- * @host: host to connect to
- * @login: login to connect with
- * @passwd: password to connect with
- *
- * Connect to a service, but do not use the session
- * default parameters to retrieve server's address
- *
- **/
-void
-camel_service_connect_to_with_login_passwd(CamelService *service, GString *host, GString *login, GString *passwd)
-{
- CSERV_CLASS(service)->connect_to_with_login_passwd (service, host, login, passwd);
-}
-
-
-
-/**
- * _connect_to:login:password : connect to the specified address
- *
- * Connect to the service, but do not use the session
- * default parameters to retrieve server's address
- *
- * @service: object to connect
- * @host: host to connect to
- * @login: user name used to log in
- * @passwd: password used to log in
- * @port: port to connect to
- *
- **/
-static void
-_connect_to_with_login_passwd_port(CamelService *service, GString *host, GString *login, GString *passwd, guint port)
-{
- CSERV_CLASS(service)->set_connected(service, TRUE);
-}
-
-
-/**
- * camel_service_connect_to_with_login_passwd_port: connect a service
- * @service: the service to connect
- * @host: host to connect to
- * @login: login to connect with
- * @passwd: password to connect with
- * @port: port to connect to
- *
- * Connect to a service, but do not use the session
- * default parameters to retrieve server's address
- *
- **/
-void
-camel_service_connect_to_with_login_passwd_port(CamelService *service, GString *host, GString *login, GString *passwd, guint port)
-{
- CSERV_CLASS(service)->connect_to_with_login_passwd_port (service, host, login, passwd, port);
-}
-
-
-
-
-/**
- * _is_connected: test if the service object is connected
- *
- *
- * @service: object to test
- *
- **/
-static gboolean
-_is_connected(CamelService *service)
-{
- return service->connected;
-}
-
-
-/**
- * camel_service_is_connected: test if a service object is connected
- *
- * @service: the service
- *
- *
- *
- * Return value: TRUE is the service is connected
- **/
-gboolean
-camel_service_is_connected(CamelService *service)
-{
- return CSERV_CLASS(service)->is_connected(service);
-}
-
-
-/**
- * _set_connected: set the connected state
- *
- * This routine has to be called by providers to set the
- * connection state, mainly when the service is disconnected
- * wheras the close() method has not been called.
- *
- * @service: object to set the state of
- * @state: connected/disconnected
- *
- **/
-static void
-_set_connected(CamelService *service, gboolean state)
-{
- service->connected = state;
-}
-
-
-
-/**
- * _get_url: get url representing a service
- * @service: the service
- *
- * This method merely returns the "url" field. Subclasses
- * may provide more active implementations.
- *
- * Return value:
- **/
-static GString *
-_get_url(CamelService *service)
-{
- return service->url;
-}
-
-/**
- * camel_service_get_url: get the url representing a service
- * @service: the service
- *
- * returns the URL representing a service. For security reasons
- * This routine may not always return the password.
- *
- * Return value: the url name
- **/
-GString *
-camel_service_get_url(CamelService *service)
-{
- return CSERV_CLASS(service)->get_url(service);
-}
-
-
diff --git a/camel/camel-service.h b/camel/camel-service.h
deleted file mode 100644
index d22f97a6bc..0000000000
--- a/camel/camel-service.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-service.h : Abstract class for an email service */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_SERVICE_H
-#define CAMEL_SERVICE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <gtk/gtk.h>
-
-#define CAMEL_SERVICE_TYPE (camel_service_get_type ())
-#define CAMEL_SERVICE(obj) (GTK_CHECK_CAST((obj), CAMEL_SERVICE_TYPE, CamelService))
-#define CAMEL_SERVICE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SERVICE_TYPE, CamelServiceClass))
-#define IS_CAMEL_SERVICE(o) (GTK_CHECK_TYPE((o), CAMEL_SERVICE_TYPE))
-
-
-
-typedef struct {
- GtkObject parent_object;
-
- gboolean connected;
- GString *url; /* This may be a full object ? */
-
-} CamelService;
-
-
-
-typedef struct {
- GtkObjectClass parent_class;
-
- void (*connect) (CamelService *service);
- void (*connect_to_with_login_passwd) (CamelService *service, GString *host, GString *login, GString *passwd);
- void (*connect_to_with_login_passwd_port) (CamelService *service, GString *host, GString *login, GString *passwd, guint port);
- gboolean (*is_connected) (CamelService *service);
- void (*set_connected) (CamelService *service, gboolean state);
- GString * (*get_url) (CamelService *service);
-
-} CamelServiceClass;
-
-
-
-
-/* public methods */
-void camel_service_connect (CamelService *service);
-gboolean camel_service_is_connected (CamelService *service);
-void camel_service_connect_to_with_login_passwd (CamelService *service, GString *host, GString *login, GString *passwd);
-void camel_service_connect_to_with_login_passwd_port (CamelService *service, GString *host, GString *login, GString *passwd, guint port);
-GString *camel_service_get_url(CamelService *service);
-/* Standard Gtk function */
-GtkType camel_service_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SERVICE_H */
-
diff --git a/camel/camel-session.c b/camel/camel-session.c
deleted file mode 100644
index 42f681f626..0000000000
--- a/camel/camel-session.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-session.c : Abstract class for an email session */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-session.h"
-#include "gstring-util.h"
-
-static GtkObjectClass *parent_class=NULL;
-
-/* Returns the class for a CamelSession */
-#define CSS_CLASS(so) CAMEL_SESSION_CLASS (GTK_OBJECT(so)->klass)
-
-
-static void
-camel_session_class_init (CamelSessionClass *camel_session_class)
-{
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- /* virtual method definition */
- /* virtual method overload */
-}
-
-
-
-
-
-static void
-camel_session_init (CamelSession *session)
-{
- session->store_provider_list = g_hash_table_new (g_str_hash, g_str_equal);
- session->transport_provider_list = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-
-
-GtkType
-camel_session_get_type (void)
-{
- static GtkType camel_session_type = 0;
-
- if (!camel_session_type) {
- GtkTypeInfo camel_session_info =
- {
- "CamelSession",
- sizeof (CamelSession),
- sizeof (CamelSessionClass),
- (GtkClassInitFunc) camel_session_class_init,
- (GtkObjectInitFunc) camel_session_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_session_type = gtk_type_unique (gtk_object_get_type (), &camel_session_info);
- }
-
- return camel_session_type;
-}
-
-
-/**
- * camel_session_set_provider: set the default provider for a protocol
- * @session: session object for wich the provider will the default
- * @provider: provider object
- *
- * Set the default implementation for a protocol. The protocol
- * is determined by provider->protocol field (See CamelProtocol).
- * It overrides the default provider for this protocol.
- *
- **/
-void
-camel_session_set_provider (CamelSession *session, CamelProvider *provider)
-{
- GHashTable *table;
-
- g_assert(session);
- g_assert(provider);
-
- if (provider->provider_type == PROVIDER_STORE)
- table = session->store_provider_list;
- else
- table = session->transport_provider_list;
-
- g_hash_table_insert (table, (gpointer)(provider->protocol), (gpointer)(provider));
-
-}
-
-
-
-
-
-/**
- * camel_session_get_store_from_provider: create a folder instance for a given provider
- * @session: session object the folder will be initialized with
- * @provider: provider folder to instantiate
- *
- *
- *
- * Return value: the newly instantiated folder
- **/
-CamelStore *
-camel_session_get_store_from_provider (CamelSession *session, CamelProvider *provider)
-{
- CamelStore *store;
-
- g_assert(session);
- g_assert(provider);
-
- store = CAMEL_STORE (gtk_object_new (provider->object_type, NULL));
-#warning set the url to a useful value.
- camel_store_init(store, session, NULL);
- return store;
-}
diff --git a/camel/camel-session.h b/camel/camel-session.h
deleted file mode 100644
index 0fb881ea72..0000000000
--- a/camel/camel-session.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-session.h : Abstract class for an email session */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_SESSION_H
-#define CAMEL_SESSION_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <gtk/gtk.h>
-
-typedef struct _CamelSession CamelSession;
-
-#include "camel-provider.h"
-#include "camel-store.h"
-
-#define CAMEL_SESSION_TYPE (camel_session_get_type ())
-#define CAMEL_SESSION(obj) (GTK_CHECK_CAST((obj), CAMEL_SESSION_TYPE, CamelSession))
-#define CAMEL_SESSION_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SESSION_TYPE, CamelSessionClass))
-#define IS_CAMEL_SESSION(o) (GTK_CHECK_TYPE((o), CAMEL_SESSION_TYPE))
-
-
-
-
-struct _CamelSession
-{
- GtkObject parent_object;
- GHashTable *store_provider_list; /* providers are identified by their protocol */
- GHashTable *transport_provider_list;
-
-
-};
-
-
-
-typedef struct {
- GtkObjectClass parent_class;
-
- /* Virtual methods */
-
-} CamelSessionClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_session_get_type (void);
-
-
-
-void camel_session_set_provider (CamelSession *session, CamelProvider *provider);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SESSION_H */
diff --git a/camel/camel-store.c b/camel/camel-store.c
deleted file mode 100644
index 61c5216780..0000000000
--- a/camel/camel-store.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camelStore.c : Abstract class for an email store */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-store.h"
-
-static GtkObjectClass *parent_class=NULL;
-
-/* Returns the class for a CamelStore */
-#define CS_CLASS(so) CAMEL_STORE_CLASS (GTK_OBJECT(so)->klass)
-
-static void _set_separator(CamelStore *store, gchar sep);
-static CamelFolder *_get_root_folder(CamelStore *store);
-static CamelFolder *_get_default_folder(CamelStore *store);
-static void _init(CamelStore *store, CamelSession *session, GString *url_name);
-
-
-
-static void
-camel_store_class_init (CamelStoreClass *camel_store_class)
-{
- parent_class = gtk_type_class (camel_service_get_type ());
-
- /* virtual method definition */
- camel_store_class->init = _init;
- camel_store_class->set_separator = _set_separator;
- camel_store_class->get_separator = camel_store_get_separator;
- camel_store_class->get_folder = camel_store_get_folder;
- camel_store_class->get_root_folder = _get_root_folder;
- camel_store_class->get_default_folder = _get_default_folder;
- /* virtual method overload */
-}
-
-
-
-
-
-
-
-GtkType
-camel_store_get_type (void)
-{
- static GtkType camel_store_type = 0;
-
- if (!camel_store_type) {
- GtkTypeInfo camel_store_info =
- {
- "CamelStore",
- sizeof (CamelStore),
- sizeof (CamelStoreClass),
- (GtkClassInitFunc) camel_store_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_store_type = gtk_type_unique (CAMEL_SERVICE_TYPE, &camel_store_info);
- }
-
- return camel_store_type;
-}
-
-
-
-
-
-/**
- * camel_store_init: call store's init method
- * @store: the store to initialize
- * @session: session which instantiates the store
- * @url_name: URL defining the store
- *
- * This routine is called by the session object from which this
- * store is created. It must not be called directly.
- *
- **/
-void
-camel_store_init(CamelStore *store, CamelSession *session, GString *url_name)
-{
- g_assert(store);
- CS_CLASS(store)->init(store, session, url_name);
-}
-
-
-/**
- * init: method called by a session object to
- * initialize a store object
- * @store: the store to initialize
- * @session: session which instantiates the store
- * @url_name: URL defining the store
- *
- * This routine is called by the session object from which this
- * store is created.
- *
- **/
-static void
-_init(CamelStore *store, CamelSession *session, GString *url_name)
-{
-
-
- g_assert(session);
- g_assert(url_name);
-
- store->session = session;
- store->url_name = url_name;
-}
-
-
-
-/**
- * camel_store_set_separator: set the character which separates this folder
- * path from the folders names in a lower level of hierarchy.
- *
- * @store:
- * @sep:
- *
- **/
-static void
-_set_separator(CamelStore *store, gchar sep)
-{
- store->separator = sep;
-}
-
-
-
-/**
- * camel_store_get_separator: return the character which separates this folder
- * path from the folders names in a lower level of hierarchy.
- *
- * @store: store
- *
- **/
-gchar
-camel_store_get_separator(CamelStore *store)
-{
- g_assert(store);
- return store->separator;
-}
-
-
-
-
-/**
- * camel_store_get_folder: return the folder corresponding to a path.
- *
- * Returns the folder corresponding to the path "name".
- * If the path begins with the separator caracter, it
- * is relative to the root folder. Otherwise, it is
- * relative to the default folder.
- * The folder does not necessarily exist on the store.
- * To make sure it already exists, use its "exists" method.
- * If it does not exist, you can create it with its
- * "create" method.
- *
- * @store: store
- * @folder_name: name of the folder to get
- *
- * Return value: the folder
- **/
-CamelFolder *
-camel_store_get_folder(CamelStore *store, GString *folder_name)
-{
-
-#warning fill this part in.
- return NULL;
-}
-
-
-/**
- * camel_store_get_root_folder : return the toplevel folder
- *
- * Returns the folder which is at the top of the folder
- * hierarchy. This folder is generally different from
- * the default folder.
- *
- * @Return value: the tolevel folder.
- **/
-static CamelFolder *
-_get_root_folder(CamelStore *store)
-{
- return NULL;
-}
-
-/**
- * camel_store_get_default_folder : return the store default folder
- *
- * The default folder is the folder which is presented
- * to the user in the default configuration. The default
- * is often the root folder.
- *
- * @Return value: the default folder.
- **/
-static CamelFolder *
-_get_default_folder(CamelStore *store)
-{
- return NULL;
-}
-
-
-
diff --git a/camel/camel-store.h b/camel/camel-store.h
deleted file mode 100644
index df8409f92e..0000000000
--- a/camel/camel-store.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-store.h : Abstract class for an email store */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_STORE_H
-#define CAMEL_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <gtk/gtk.h>
-
-typedef struct _CamelStore CamelStore;
-
-#include "camel-folder.h"
-#include "camel-service.h"
-#include "camel-session.h"
-
-#define CAMEL_STORE_TYPE (camel_store_get_type ())
-#define CAMEL_STORE(obj) (GTK_CHECK_CAST((obj), CAMEL_STORE_TYPE, CamelStore))
-#define CAMEL_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STORE_TYPE, CamelStoreClass))
-#define IS_CAMEL_STORE(o) (GTK_CHECK_TYPE((o), CAMEL_STORE_TYPE))
-
-
-struct _CamelStore
-{
- CamelService parent_object;
-
- CamelSession *session;
- GString *url_name;
- gchar separator;
-};
-
-
-
-typedef struct {
- CamelServiceClass parent_class;
-
- void (*init) (CamelStore *store, CamelSession *session, GString *url_name);
- void (*set_separator) (CamelStore *store, gchar sep);
- gchar (*get_separator) (CamelStore *store);
- CamelFolder * (*get_folder) (CamelStore *store, GString *folder_name);
- CamelFolder * (*get_root_folder) (CamelStore *store);
- CamelFolder * (*get_default_folder) (CamelStore *store);
-
-} CamelStoreClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_store_get_type (void);
-
-void camel_store_init(CamelStore *store, CamelSession *session, GString *url_name);
-CamelFolder *camel_store_get_folder(CamelStore *store, GString *folder_name);
-gchar camel_store_get_separator(CamelStore *store);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_STORE_H */
diff --git a/camel/gstring-util.c b/camel/gstring-util.c
deleted file mode 100644
index 05cdc08beb..0000000000
--- a/camel/gstring-util.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* gstring-util : utilities for gstring object */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-
-#include "gstring-util.h"
-#include "camel-log.h"
-
-
-/**
- * g_string_equals : test if two string are equal
- *
- * @string1 : first string
- * @string2 : second string
- *
- * @Return Value : true if the strings equal, false otherwise
- **/
-gboolean
-g_string_equals(GString *string1, GString *string2)
-{
- g_assert(string1);
- g_assert(string2);
- return !strcmp(string1->str, string2->str);
-}
-
-
-
-/**
- * g_string_clone : clone a GString
- *
- * @string : the string to clone
- *
- * @Return Value : the clone ...
- **/
-GString *
-g_string_clone(GString *string)
-{
- return g_string_new( g_strdup(string->str) );
-}
-
-
-
-
-/**
- * right_dichotomy : return the strings before and/or after
- * the last occurence of the specified separator
- *
- * This routine returns the string before and/or after
- * a character given as an argument.
- * if the separator is the last character, prefix and/or
- * suffix is set to NULL and result is set to 'l'
- * if the separator is not in the list, prefix and/or
- * suffix is set to NULL and result is set to 'n'
- * When the operation succedeed, the return value is 'o'
- *
- * @sep : separator
- * @prefix: pointer to be field by the prefix object
- * the prefix is not returned when the given pointer is NULL
- * @suffix: pointer to be field by the suffix object
- * the suffix is not returned when the given pointer is NULL
- *
- * @Return Value : result of the operation ('o', 'l' or 'n')
- *
- **/
-gchar
-g_string_right_dichotomy( GString *string, gchar sep, GString **prefix, GString **suffix, DichotomyOption options)
-{
- gchar *str, *tmp;
- gint pos, len, first;
-
- CAMEL_LOG(FULL_DEBUG,\
- "Entering rightDichotomy: \n\tseparator=%c \n\tprefix=%p \n\tsuffix=%p \n\toptions=%ld\n",\
- sep, prefix, suffix, options);
- g_assert( tmp=string->str );
- len = strlen(tmp);
- if (!len) {
- if (prefix) *prefix=NULL;
- if (suffix) *suffix=NULL;
- CAMEL_LOG(FULL_DEBUG,"rightDichotomy: string is empty\n");
- return 'n';
- }
- first = 0;
-
- if ( (options & STRIP_LEADING ) && (tmp[first] == sep) )
- do {first++;} while ( (first<len) && (tmp[first] == sep) );
-
- if (options & STRIP_TRAILING )
- while (tmp[len-1] == sep)
- len--;
-
- if (first==len) {
- if (prefix) *prefix=NULL;
- if (suffix) *suffix=NULL;
- CAMEL_LOG(FULL_DEBUG,"rightDichotomy: after stripping, string is empty\n");
- return 'n';
- }
-
- pos = len;
-
- do {
- pos--;
- } while ((pos>=first) && (tmp[pos]!=sep));
-
-
- if (pos<first)
- {
- if (suffix) *suffix=NULL;
- if (prefix) *prefix=NULL;
- CAMEL_LOG(FULL_DEBUG,"rightDichotomy: separator not found\n");
- return 'n';
- }
-
- /* if we have stripped trailongs separators, we should */
- /* never enter here */
- if (pos==len-1)
- {
- if (suffix) *suffix=NULL;
- if (prefix) *prefix=NULL;
- CAMEL_LOG(FULL_DEBUG,"rightDichotomy: separator is last character\n");
- return 'l';
- }
-
- if (prefix) /* return the prefix */
- {
- str = g_strndup(tmp,pos);
- *prefix = g_string_new(str);
- g_free(str);
- }
- if (suffix) /* return the suffix */
- {
- str = g_strdup(tmp+pos+1);
- *suffix = g_string_new(str);
- g_free(str);
- }
-
- return 'o';
-}
-
-
-
-/**
- * g_string_append_g_string : append a GString to another GString
- *
- * @dest_string : string which will be appended
- * @other_string : string to append
- *
- **/
-void
-g_string_append_g_string(GString *dest_string, GString *other_string)
-{
- g_assert(other_string);
- g_assert(dest_string);
- g_assert(other_string->str);
-
- g_string_append(dest_string, other_string->str);
-}
-
-
-
-/**
- * g_string_equal_for_hash: test equality of two GStrings for hash tables
- * @v: string 1
- * @v2: string 2
- *
- *
- *
- * Return value:
- **/
-g_string_equal_for_hash (gconstpointer v, gconstpointer v2)
-{
- return strcmp ( ((const GString*)v)->str, ((const GString*)v2)->str) == 0;
-}
-
-
-/**
- * g_string_hash: computes a hash value for a Gstring
- * @v: Gstring object
- *
- *
- *
- * Return value:
- **/
-guint
-g_string_hash (gconstpointer v)
-{
- return g_str_hash(((const GString*)v)->str);
-}
-
-
-
-
-/* utility func : frees a GString element in a GList */
-static void
-__g_string_list_free_string (gpointer data, gpointer user_data)
-{
- GString *string = (GString *)data;
- g_string_free(string, TRUE);
-}
-
-
-void
-g_string_list_free (GList *string_list)
-{
- g_list_foreach(string_list, __g_string_list_free_string, NULL);
- g_list_free(string_list);
-}
diff --git a/camel/gstring-util.h b/camel/gstring-util.h
deleted file mode 100644
index fcd2c5dc69..0000000000
--- a/camel/gstring-util.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* gstring-util : utilities for gstring object */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#ifndef GSTRING_UTIL_H
-#define GSTRING_UTIL_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-
-typedef enum {
- NONE = 0,
- STRIP_TRAILING = 1,
- STRIP_LEADING = 2
-
-} DichotomyOption;
-
-
-gboolean g_string_equals(GString *string1, GString *string2);
-GString *g_string_clone(GString *string);
-gchar g_string_right_dichotomy( GString *string, gchar sep, GString **prefix, GString **suffix, DichotomyOption options);
-void g_string_append_g_string(GString *dest_string, GString *other_string);
-
-gboolean g_string_equal_for_hash (gconstpointer v, gconstpointer v2);
-guint g_string_hash (gconstpointer v);
-void g_string_list_free (GList *string_list);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* GSTRING_UTIL_H */
diff --git a/camel/providers/.cvsignore b/camel/providers/.cvsignore
deleted file mode 100644
index b840c21800..0000000000
--- a/camel/providers/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile \ No newline at end of file
diff --git a/camel/providers/MH/.cvsignore b/camel/providers/MH/.cvsignore
deleted file mode 100644
index 2e7b174532..0000000000
--- a/camel/providers/MH/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-*.lo
-*.la
-.libs
diff --git a/camel/providers/MH/Makefile.am b/camel/providers/MH/Makefile.am
deleted file mode 100644
index 0f52c9fb40..0000000000
--- a/camel/providers/MH/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS =
-
-libcamelmhincludedir = $(includedir)/camel
-
-
-lib_LTLIBRARIES = libcamelmh.la
-
-INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \
- -I$(top_srcdir)/intl \
- $(GTK_INCLUDEDIR) -I$(top_srcdir)/camel
-
-libcamelmh_la_SOURCES = \
- camel-mh-folder.c \
- camel-mh-store.c
-
-libcamelmhinclude_HEADERS = \
- camel-mh-folder.h \
- camel-mh-store.h
-
-
-libcamelmh_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
-
-
-EXTRA_DIST =
diff --git a/camel/providers/MH/camel-mh-folder.c b/camel/providers/MH/camel-mh-folder.c
deleted file mode 100644
index d875182564..0000000000
--- a/camel/providers/MH/camel-mh-folder.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mh-folder.c : Abstract class for an email folder */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-mh-folder.h"
-
-static CamelFolderClass *parent_class=NULL;
-
-/* Returns the class for a CamelMhFolder */
-#define CMHF_CLASS(so) CAMEL_MH_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CMHS_CLASS(so) CAMEL_STORE_CLASS (GTK_OBJECT(so)->klass)
-
-static void camel_mh_folder_set_name(CamelFolder *folder, GString *name);
-
-
-static void
-camel_mh_folder_class_init (CamelMhFolderClass *camel_mh_folder_class)
-{
- parent_class = gtk_type_class (camel_folder_get_type ());
-
- /* virtual method definition */
- /* virtual method overload */
- CAMEL_FOLDER_CLASS(camel_mh_folder_class)->set_name = camel_mh_folder_set_name;
-}
-
-
-
-
-
-
-
-GtkType
-camel_mh_folder_get_type (void)
-{
- static GtkType camel_mh_folder_type = 0;
-
- if (!camel_mh_folder_type) {
- GtkTypeInfo camel_mh_folder_info =
- {
- "CamelMhFolder",
- sizeof (CamelMhFolder),
- sizeof (CamelMhFolderClass),
- (GtkClassInitFunc) camel_mh_folder_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_mh_folder_type = gtk_type_unique (CAMEL_FOLDER_TYPE, &camel_mh_folder_info);
- }
-
- return camel_mh_folder_type;
-}
-
-
-/**
- * camel_mh_folder_set_name: set the name of an MH folder
- * @folder: the folder to set the name
- * @name: a string representing the (short) name
- *
- *
- *
- **/
-static void
-camel_mh_folder_set_name(CamelFolder *folder, GString *name)
-{
- GString *root_dir_path;
- GString *full_dir_path;
- CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
- gchar separator;
-
- g_assert(folder);
- g_assert(name);
- g_assert(folder->parent_store);
-
- /* call default implementation */
- parent_class->set_name (folder, name);
-
- if (mh_folder->directory_path) g_string_free (mh_folder->directory_path, 0);
-
- separator = camel_store_get_separator (folder->parent_store);
-
-
- root_dir_path = camel_mh_store_get_toplevel_dir (CAMEL_MH_STORE(folder->parent_store));
- full_dir_path = g_string_clone(root_dir_path);
- g_string_append_c(full_dir_path, separator);
- g_string_append_g_string(full_dir_path, name);
- mh_folder->directory_path = full_dir_path;
-
-
-}
diff --git a/camel/providers/MH/camel-mh-folder.h b/camel/providers/MH/camel-mh-folder.h
deleted file mode 100644
index 2e9fbb47f0..0000000000
--- a/camel/providers/MH/camel-mh-folder.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mh-folder.h : Abstract class for an email folder */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MH_FOLDER_H
-#define CAMEL_MH_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <gtk/gtk.h>
-#include "camel-folder.h"
-/* #include "camel-store.h" */
-
-#define CAMEL_MH_FOLDER_TYPE (camel_mh_folder_get_type ())
-#define CAMEL_MH_FOLDER(obj) (GTK_CHECK_CAST((obj), CAMEL_MH_FOLDER_TYPE, CamelMhFolder))
-#define CAMEL_MH_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MH_FOLDER_TYPE, CamelMhFolderClass))
-#define IS_CAMEL_MH_FOLDER(o) (GTK_CHECK_TYPE((o), CAMEL_MH_FOLDER_TYPE))
-
-
-typedef struct {
- CamelFolder parent_object;
-
- GString *directory_path;
-
-} CamelMhFolder;
-
-
-
-typedef struct {
- CamelFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelMhFolderClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_mh_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MH_FOLDER_H */
diff --git a/camel/providers/MH/camel-mh-store.c b/camel/providers/MH/camel-mh-store.c
deleted file mode 100644
index 2a1258a7b9..0000000000
--- a/camel/providers/MH/camel-mh-store.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mh-store.c : class for an mh store */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-mh-store.h"
-#include "camel-mh-folder.h"
-
-static GtkObjectClass *parent_class=NULL;
-
-/* Returns the class for a CamelMhStore */
-#define CS_CLASS(so) CAMEL_MH_STORE_CLASS (GTK_OBJECT(so)->klass)
-
-
-
-static void
-camel_mh_store_class_init (CamelMhStoreClass *camel_mh_store_class)
-{
- parent_class = gtk_type_class (camel_store_get_type ());
-
- /* virtual method definition */
- /* virtual method overload */
-}
-
-
-
-
-
-
-
-GtkType
-camel_mh_store_get_type (void)
-{
- static GtkType camel_mh_store_type = 0;
-
- if (!camel_mh_store_type) {
- GtkTypeInfo camel_mh_store_info =
- {
- "CamelMhStore",
- sizeof (CamelMhStore),
- sizeof (CamelMhStoreClass),
- (GtkClassInitFunc) camel_mh_store_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_mh_store_type = gtk_type_unique (CAMEL_FOLDER_TYPE, &camel_mh_store_info);
- }
-
- return camel_mh_store_type;
-}
-
-
-
-
-/** These evil public functions are here for test only **/
-void
-camel_mh_store_set_toplevel_dir(CamelMhStore *store, GString *toplevel)
-{
- store->toplevel_dir = toplevel;
- CAMEL_STORE(store)->separator = '/';
-}
-
-
-GString *
-camel_mh_store_get_toplevel_dir(CamelMhStore *store)
-{
- return store->toplevel_dir;
-}
diff --git a/camel/providers/MH/camel-mh-store.h b/camel/providers/MH/camel-mh-store.h
deleted file mode 100644
index 058eb48c64..0000000000
--- a/camel/providers/MH/camel-mh-store.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mhstore.h : class for an mh store */
-
-/*
- *
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MH_STORE_H
-#define CAMEL_MH_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <gtk/gtk.h>
-#include "camel-store.h"
-
-#define CAMEL_MH_STORE_TYPE (camel_mh_store_get_type ())
-#define CAMEL_MH_STORE(obj) (GTK_CHECK_CAST((obj), CAMEL_MH_STORE_TYPE, CamelMhStore))
-#define CAMEL_MH_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MH_STORE_TYPE, CamelMhStoreClass))
-#define IS_CAMEL_MH_STORE(o) (GTK_CHECK_TYPE((o), CAMEL_MH_STORE_TYPE))
-
-
-typedef struct {
- CamelStore parent_object;
-
- GString *toplevel_dir;
-
-} CamelMhStore;
-
-
-
-typedef struct {
- CamelStoreClass parent_class;
-
-
-} CamelMhStoreClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_mh_store_get_type (void);
-
-void camel_mh_store_set_toplevel_dir(CamelMhStore *store, GString *toplevel);
-GString *camel_mh_store_get_toplevel_dir(CamelMhStore *store);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MH_STORE_H */
diff --git a/camel/providers/Makefile.am b/camel/providers/Makefile.am
deleted file mode 100644
index 7bdc7a7eab..0000000000
--- a/camel/providers/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = MH
diff --git a/camel/url-util.c b/camel/url-util.c
deleted file mode 100644
index 1b784385f5..0000000000
--- a/camel/url-util.c
+++ /dev/null
@@ -1,405 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* url-util.c : utility functions to parse URLs */
-
-
-/*
- * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-/*
- Here we deal with URL following the general scheme:
- protocol://user:password@host:port/name
- where name is a path-like string (ie dir1/dir2/....)
- See rfc1738 for the complete description of
- Uniform Ressource Locators
-
- Bertrand. */
-/*
- XXX TODO: recover the words between #'s or ?'s after the path */
-
-
-#include "url-util.h"
-
-/* general item finder */
-/* it begins the search at position @position in @url,
- returns true when the item is found, amd set position after the item */
-typedef gboolean find_item_func(GString *url, GString **item, guint *position, gboolean *error);
-
-/* used to find one item (protocol, then user .... */
-typedef struct {
- char *item_name; /* item name : for debug only */
- GString **item_value; /* where the item value will go */
- find_item_func *find_func; /* item finder */
-} FindStepStruct;
-
-static gboolean find_protocol(GString *url, GString **item, guint *position, gboolean *error);
-static gboolean find_user(GString *url, GString **item, guint *position, gboolean *error);
-static gboolean find_passwd(GString *url, GString **item, guint *position, gboolean *error);
-static gboolean find_host(GString *url, GString **item, guint *position, gboolean *error);
-static gboolean find_port(GString *url, GString **item, guint *position, gboolean *error);
-static gboolean find_path(GString *url, GString **item, guint *position, gboolean *error);
-
-
-
-/**
- * new_g_url: create an Gurl object from a string
- * @url_string: The string containing the URL to scan
- *
- * This routine takes a GString and parses it as an
- * URL of the form:
- * protocol://user:password@host:port/path
- * there is no test on the values. For example,
- * "port" can be a string, not only a number !
- * The Gurl structure fields ar filled with
- * the scan results. When a member of the
- * general URL can not be found, the corresponding
- * Gurl member is NULL
- *
- * Return value: a Gurl structure containng the URL items.
- **/
-Gurl *g_url_new(GString* url_string)
-{
- Gurl *g_url;
-
- GString *protocol;
- GString *user;
- GString *passwd;
- GString *host;
- GString *port;
- GString *path;
-
- guint position=0;
- gboolean error;
- gboolean found;
- guint i;
-
- g_url = g_new(Gurl,1);
-
-#define NB_STEP_URL 6
- {
- FindStepStruct step[NB_STEP_URL] = {
- { "protocol", &(g_url->protocol), find_protocol},
- { "user", &(g_url->user), find_user},
- { "password", &(g_url->passwd), find_passwd},
- { "host", &(g_url->host), find_host},
- { "port", &(g_url->port), find_port},
- { "path", &(g_url->path), find_path}
- };
-
- for (i=0; i<NB_STEP_URL; i++) {
- found = step[i].find_func(url_string,
- step[i].item_value,
- &position,
- &error);
- }
- }
-
- return g_url;
-}
-
-
-
-
-
-/** So, yes, I must admit there would have been more elegant
- ways to do this, but it works, and quite well :) */
-
-
-static gboolean
-find_protocol(GString *url, GString **item, guint *position, gboolean *error)
-{
-
- guint i;
- gchar *str_url;
- gint len_url;
- gchar *str_protocol;
-
- str_url = url->str;
- len_url = url->len;
-
- *item = NULL;
- *error = FALSE;
- i=*position;
-
- /* find a ':' */
- while ( (i<len_url) && (str_url[i] != ':') ) i++;
-
- if (i==len_url) return FALSE;
- i++;
-
- /* check if it is followed by a "//" */
- if ((i<len_url) && (str_url[i++] == '/'))
- if ((i<len_url) && (str_url[i++] == '/'))
- {
-
- str_protocol = g_strndup(str_url, i-3);
- *item = g_string_new(str_protocol);
- *position=i;
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-
-
-static gboolean
-find_user(GString *url, GString **item, guint *position, gboolean *error)
-{
- guint i;
- guint at_pos;
-
- gchar *str_url;
- gint len_url;
- gchar *str_user;
-
- str_url = url->str;
- len_url = url->len;
-
- *item = NULL;
- i=*position;
-
-
- /* find a '@' */
- while ((i<len_url) && (str_url[i] != '@')) i++;
-
- if (i==len_url) return FALSE;
- at_pos = i;
- i = *position;
-
- /* find a ':' */
- while ( (i<at_pos) && (str_url[i] != ':') ) i++;
-
- /* now if i has not been incremented at all, there is no user */
- if (i == *position) {
- (*position)++;
- return FALSE;
- }
-
- str_user = g_strndup(str_url+ *position, i - *position);
- *item = g_string_new(str_user);
- if (i<at_pos) *position=i+1; /* there was a ':', skip it */
- else *position=i;
-
- return TRUE;
-}
-
-static gboolean
-find_passwd(GString *url, GString **item, guint *position, gboolean *error)
-{
- guint i;
-
- gchar *str_url;
- gint len_url;
- gchar *str_passwd;
-
- str_url = url->str;
- len_url = url->len;
-
- *item = NULL;
- i=*position;
-
-
- /* find a '@' */
- while ((i<len_url) && (str_url[i] != '@')) i++;
-
- if (i==len_url) return FALSE;
- /*i has not been incremented at all, there is no passwd */
- if (i == *position) {
- *position = i+1;
- return FALSE;
- }
-
- str_passwd = g_strndup(str_url+ *position, i - *position);
- *item = g_string_new(str_passwd);
- *position=i+1; /* skip it the '@' */
-
- return TRUE;
-}
-
-
-
-static gboolean
-find_host(GString *url, GString **item, guint *position, gboolean *error)
-{
- guint i;
- guint slash_pos;
-
- gchar *str_url;
- gint len_url;
- gchar *str_host;
-
- str_url = url->str;
- len_url = url->len;
-
- *item = NULL;
- i=*position;
-
-
- /* find a '/' */
- while ((i<len_url) && (str_url[i] != '/')) i++;
-
- slash_pos = i;
- i = *position;
-
- /* find a ':' */
- while ( (i<slash_pos) && (str_url[i] != ':') ) i++;
-
- /* at this point if i has not been incremented at all,
- there is no host */
- if (i == *position) {
- (*position)++;
- return FALSE;
- }
-
- str_host = g_strndup(str_url+ *position, i - *position);
- *item = g_string_new(str_host);
- if (i<slash_pos) *position=i+1; /* there was a ':', skip it */
- else *position=i;
-
- return TRUE;
-}
-
-
-static gboolean
-find_port(GString *url, GString **item, guint *position, gboolean *error)
-{
- guint i;
- guint slash_pos;
-
- gchar *str_url;
- gint len_url;
- gchar *str_port;
-
- str_url = url->str;
- len_url = url->len;
-
- *item = NULL;
- i=*position;
-
-
- /* find a '/' */
- while ((i<len_url) && (str_url[i] != '/')) i++;
-
- slash_pos = i;
- i = *position;
-
- /* find a ':' */
- while ( (i<slash_pos) && (str_url[i] != ':') ) i++;
-
- /* at this point if i has not been incremented at all,
- there is no port */
- if (i == *position) return FALSE;
-
- str_port = g_strndup(str_url+ *position, i - *position);
- *item = g_string_new(str_port);
- *position = i;
- return TRUE;
-}
-
-
-static gboolean
-find_path(GString *url, GString **item, guint *position, gboolean *error)
-{
- guint i;
-
- gchar *str_url;
- gint len_url;
- gchar *str_path;
-
- str_url = url->str;
- len_url = url->len;
-
- *item = NULL;
- i=*position;
-
-
- /* find a '#' */
- while ((i<len_url) && (str_url[i] != '#') && (str_url[i] != '?')) i++;
-
- /*i has not been incremented at all, there is no path */
- if (i == *position) return FALSE;
-
- str_path = g_strndup(str_url+ *position, i - *position);
- *item = g_string_new(str_path);
- *position=i;
-
-
- return TRUE;
-}
-
-
-/* to tests this file :
- gcc -o test_url_util `glib-config --cflags` -DTEST_URL_UTIL url-util.c `glib-config --libs`
- ./test_url_util URL
-*/
-#ifdef TEST_URL_UTIL
-
-
-
-int
-main (int argc, char **argv)
-{
-
- GString *url;
- GString *protocol;
- GString *user;
- GString *passwd;
- GString *host;
- GString *port;
- GString *path;
- guint position=0;
- gboolean error;
- gboolean found;
- guint i;
- guint i_pos;
-
-#define NB_STEP_TEST 6
- FindStepStruct test_step[NB_STEP_TEST] = {
- { "protocol", &protocol, find_protocol},
- { "user", &user, find_user},
- { "password", &passwd, find_passwd},
- { "host", &host, find_host},
- { "port", &port, find_port},
- { "path", &path, find_path}
- };
- url = g_string_new(argv[1]);
- printf("URL to test : %s\n\n", url->str);
- for (i=0; i<NB_STEP_TEST; i++) {
- found = test_step[i].find_func(url,
- test_step[i].item_value,
- &position,
- &error);
- if (found) {
- printf("\t\t\t\t** %s found : %s\n",
- test_step[i].item_name,
- (*test_step[i].item_value)->str);
- } else printf("** %s not found in URL\n", test_step[i].item_name);
- printf("next item position:\n");
- printf("%s\n", url->str);
- for(i_pos=0; i_pos<position; i_pos++) printf(" ");
- printf("^\n");
-
- }
-
-}
-
-#endif /* TEST_URL_UTIL */
diff --git a/camel/url-util.h b/camel/url-util.h
deleted file mode 100644
index 74dab30b14..0000000000
--- a/camel/url-util.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* url-util.h : utility functions to parse URLs */
-
-/*
- * Copyright (C) Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef URL_UTIL_H
-#define URL_UTIL_H 1
-
-#include <glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-typedef struct {
- GString *protocol;
- GString *user;
- GString *passwd;
- GString *host;
- GString *port;
- GString *path;
-} Gurl;
-
-Gurl *g_url_new(GString* url_string);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* URL_UTIL_H */