Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / providers / imap / camel-imap-folder.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-folder.h: class for an imap folder */
3
4 /* 
5  * Authors:
6  *   Dan Winship <danw@ximian.com>
7  *   Jeffrey Stedfast <fejj@ximian.com> 
8  *
9  * Copyright (C) 2000, 2001 Ximian, Inc.
10  *
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.
14  *
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.
19  *
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
23  * USA
24  */
25
26
27 #ifndef CAMEL_IMAP_FOLDER_H
28 #define CAMEL_IMAP_FOLDER_H 1
29
30 #include "camel-imap-types.h"
31 #include <camel/camel-disco-folder.h>
32 #include <camel/camel-folder-search.h>
33
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))
38
39 G_BEGIN_DECLS
40
41 struct _CamelImapFolder {
42         CamelDiscoFolder parent_object;
43
44         struct _CamelImapFolderPrivate *priv;
45         
46         CamelFolderSearch *search;
47         CamelImapMessageCache *cache;
48
49         unsigned int need_rescan:1;
50         unsigned int need_refresh:1;
51         unsigned int read_only:1;
52 };
53
54 typedef struct {
55         CamelDiscoFolderClass parent_class;
56
57         /* Virtual methods */   
58         
59 } CamelImapFolderClass;
60
61
62 /* public methods */
63 CamelFolder *camel_imap_folder_new (CamelStore *parent,
64                                     const char *folder_name,
65                                     const char *folder_dir,
66                                     CamelException *ex);
67
68 void camel_imap_folder_selected (CamelFolder *folder,
69                                  CamelImapResponse *response,
70                                  CamelException *ex);
71
72 void camel_imap_folder_changed (CamelFolder *folder, int exists,
73                                 GArray *expunged, CamelException *ex);
74
75 CamelStream *camel_imap_folder_fetch_data (CamelImapFolder *imap_folder,
76                                            const char *uid,
77                                            const char *section_text,
78                                            gboolean cache_only,
79                                            CamelException *ex);
80
81 /* Standard Camel function */
82 CamelType camel_imap_folder_get_type (void);
83
84 G_END_DECLS
85
86 #endif /* CAMEL_IMAP_FOLDER_H */