From 8fbfb0ae4829f216501380e2f63ed6b4cc1a3306 Mon Sep 17 00:00:00 2001 From: bertrand Date: Fri, 21 Jan 2000 22:46:46 +0000 Subject: added camel-mbox-provider.c to the mbox provider sources. 2000-01-21 bertrand * camel/providers/mbox/Makefile.am (libcamelmbox_la_SOURCES): added camel-mbox-provider.c to the mbox provider sources. * camel/providers/mbox/camel-mbox-provider.c: provider registration code. * camel/providers/mbox/camel-mbox-folder.c (_get_message_count): implemented (_append_message): implemented * camel/providers/mbox/camel-mbox-parser.c (initialize_buffer): use \0 to mark the end of the buffer. (read_next_buffer_chunk): ditto. (read_header): test the presence of a \0 instead of reading the eof field (read_message_begining): idem. (camel_mbox_parse_file): idem. Remove the eof field from the parser structure. (read_next_buffer_chunk): removed some nasty bugs again. svn path=/trunk/; revision=1604 --- camel/providers/mbox/camel-mbox-provider.c | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 camel/providers/mbox/camel-mbox-provider.c (limited to 'camel/providers/mbox/camel-mbox-provider.c') diff --git a/camel/providers/mbox/camel-mbox-provider.c b/camel/providers/mbox/camel-mbox-provider.c new file mode 100644 index 0000000000..c10e42f95e --- /dev/null +++ b/camel/providers/mbox/camel-mbox-provider.c @@ -0,0 +1,48 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* camel-mbox-provider.c: mbox provider registration code */ + +/* + * Authors : + * Bertrand Guiheneuf + * + * Copyright (C) 2000 HelixCode (www.helixcode.com). + * + * 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 "config.h" +#include "camel-mbox-store.h" +#include "camel-provider.h" +#include "camel-log.h" + + +static CamelProvider _mbox_provider = { + (GtkType) 0, + PROVIDER_STORE, + "mbox", + "Camel default mbox provider", + "This the first full fledged local mail provider", + (GModule *) NULL +}; + + + +CamelProvider * +camel_provider_module_init () +{ + _mbox_provider.object_type = camel_mbox_store_get_type(); + return &_mbox_provider; +} -- cgit