Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / servers / exchange / storage / e-folder-tree.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* e-folder-tree.h
3  *
4  * Copyright (C) 2000  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_TREE_H_
24 #define _E_FOLDER_TREE_H_
25
26 #include <glib.h>
27
28 typedef struct EFolderTree EFolderTree;
29
30 typedef void (* EFolderDestroyNotify)   (EFolderTree *tree, const char *path, void *data, void *closure);
31 typedef void (* EFolderTreeForeachFunc) (EFolderTree *tree, const char *path, void *data, void *closure);
32
33 EFolderTree *e_folder_tree_new               (EFolderDestroyNotify    folder_destroy_notify,
34                                               void                   *closure);
35                                             
36 void        e_folder_tree_destroy            (EFolderTree            *folder_tree);
37                                             
38 gboolean    e_folder_tree_add                (EFolderTree            *folder_tree,
39                                               const char             *path,
40                                               void                   *data);
41 gboolean    e_folder_tree_remove             (EFolderTree            *folder_tree,
42                                               const char             *path);
43
44 int         e_folder_tree_get_count          (EFolderTree            *folder_tree);
45
46 void       *e_folder_tree_get_folder         (EFolderTree            *folder_tree,
47                                               const char             *path);
48 GList      *e_folder_tree_get_subfolders     (EFolderTree            *folder_tree,
49                                               const char             *path);
50                                             
51 void        e_folder_tree_foreach            (EFolderTree            *folder_tree,
52                                               EFolderTreeForeachFunc  foreach_func,
53                                               void                   *data);
54
55 const char *e_folder_tree_get_path_for_data  (EFolderTree            *folder_tree,
56                                               const void             *data);
57
58 #endif /* _E_FOLDER_TREE_H_ */