Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / servers / exchange / storage / e-folder.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* e-folder.h
3  *
4  * Copyright (C) 2000, 2001, 2002  Ximian, Inc.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of version 2 of the GNU Lesser General Public
8  * License as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  *
20  * Author: Ettore Perazzoli
21  */
22
23 #ifndef _E_FOLDER_H_
24 #define _E_FOLDER_H_
25
26 #include <glib-object.h>
27 #include <gtk/gtkdnd.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #pragma }
32 #endif /* __cplusplus */
33
34 #define E_TYPE_FOLDER                   (e_folder_get_type ())
35 #define E_FOLDER(obj)                   (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_FOLDER, EFolder))
36 #define E_FOLDER_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_FOLDER, EFolderClass))
37 #define E_IS_FOLDER(obj)                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_FOLDER))
38 #define E_IS_FOLDER_CLASS(klass)        (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_FOLDER))
39 #define E_FOLDER_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_FOLDER, EFolderClass))
40
41 typedef struct EFolder        EFolder;
42 typedef struct EFolderPrivate EFolderPrivate;
43 typedef struct EFolderClass   EFolderClass;
44
45 struct EFolder {
46         GObject parent;
47
48         EFolderPrivate *priv;
49 };
50
51 struct EFolderClass {
52         GObjectClass parent_class;
53
54         /* Methods.  */
55         gboolean (* accept_drop) (EFolder *folder,
56                                   GdkDragContext *context,
57                                   const char *target_type,
58                                   GtkSelectionData *selection_data);
59
60         /* Signals.  */
61         void (* changed) (EFolder *folder);
62         void (* name_changed) (EFolder *folder);
63 };
64
65 GType    e_folder_get_type   (void);
66 void     e_folder_construct  (EFolder    *folder,
67                               const char *name,
68                               const char *type,
69                               const char *description);
70 EFolder *e_folder_new        (const char *name,
71                               const char *type,
72                               const char *description);
73
74 const char *e_folder_get_name             (EFolder *folder);
75 const char *e_folder_get_type_string      (EFolder *folder);
76 const char *e_folder_get_description      (EFolder *folder);
77 const char *e_folder_get_physical_uri     (EFolder *folder);
78 int         e_folder_get_unread_count     (EFolder *folder);
79 gboolean    e_folder_get_highlighted      (EFolder *folder);
80 gboolean    e_folder_get_is_stock         (EFolder *folder);
81 gboolean    e_folder_get_can_sync_offline (EFolder *folder);
82 gboolean    e_folder_get_has_subfolders   (EFolder *folder);
83 const char *e_folder_get_custom_icon_name (EFolder *folder);
84 int         e_folder_get_sorting_priority (EFolder *folder);
85
86 void  e_folder_set_name              (EFolder *folder, const char *name);
87 void  e_folder_set_type_string       (EFolder *folder, const char *type);
88 void  e_folder_set_description       (EFolder *folder, const char *description);
89 void  e_folder_set_physical_uri      (EFolder *folder, const char *physical_uri);
90 void  e_folder_set_unread_count      (EFolder *folder, int unread_count);
91 void  e_folder_set_child_highlight   (EFolder *folder, gboolean highlighted);
92 void  e_folder_set_is_stock          (EFolder *folder, gboolean is_stock);
93 void  e_folder_set_can_sync_offline  (EFolder *folder, gboolean can_sync_offline);
94 void  e_folder_set_has_subfolders    (EFolder *folder, gboolean has_subfolders);
95 void  e_folder_set_custom_icon       (EFolder *folder, const char *icon_name);
96 void  e_folder_set_sorting_priority  (EFolder *folder, int sorting_priority);
97
98 gboolean e_folder_accept_drop        (EFolder *folder, GdkDragContext *context,
99                                       const char *target_type,
100                                       GtkSelectionData *selection_data);
101 #ifdef __cplusplus
102 }
103 #endif /* __cplusplus */
104
105 #endif /* _E_FOLDER_H_ */