1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-folder.h: class for an imap folder */
6 * Dan Winship <danw@ximian.com>
7 * Jeffrey Stedfast <fejj@ximian.com>
9 * Copyright (C) 2000, 2001 Ximian, Inc.
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of version 2 of the GNU Lesser General Public
13 * License as published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
27 #ifndef CAMEL_IMAP_FOLDER_H
28 #define CAMEL_IMAP_FOLDER_H 1
30 #include "camel-imap-types.h"
31 #include <camel/camel-disco-folder.h>
32 #include <camel/camel-folder-search.h>
34 #define CAMEL_IMAP_FOLDER_TYPE (camel_imap_folder_get_type ())
35 #define CAMEL_IMAP_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolder))
36 #define CAMEL_IMAP_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolderClass))
37 #define CAMEL_IS_IMAP_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_FOLDER_TYPE))
41 struct _CamelImapFolder {
42 CamelDiscoFolder parent_object;
44 struct _CamelImapFolderPrivate *priv;
46 CamelFolderSearch *search;
47 CamelImapMessageCache *cache;
49 unsigned int need_rescan:1;
50 unsigned int need_refresh:1;
51 unsigned int read_only:1;
55 CamelDiscoFolderClass parent_class;
59 } CamelImapFolderClass;
63 CamelFolder *camel_imap_folder_new (CamelStore *parent,
64 const char *folder_name,
65 const char *folder_dir,
68 void camel_imap_folder_selected (CamelFolder *folder,
69 CamelImapResponse *response,
72 void camel_imap_folder_changed (CamelFolder *folder, int exists,
73 GArray *expunged, CamelException *ex);
75 CamelStream *camel_imap_folder_fetch_data (CamelImapFolder *imap_folder,
77 const char *section_text,
81 /* Standard Camel function */
82 CamelType camel_imap_folder_get_type (void);
86 #endif /* CAMEL_IMAP_FOLDER_H */