aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage.h
blob: 3bddafe73a80229da4ddcf2cf0226fb27078aaa7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* e-storage.h
 *
 * Copyright (C) 2000  Helix Code, Inc.
 *
 * 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.
 *
 * Author: Ettore Perazzoli
 */

#ifndef _E_STORAGE_H_
#define _E_STORAGE_H_

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <gtk/gtkobject.h>

#include "evolution-shell-component-client.h"

#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */

#define E_TYPE_STORAGE          (e_storage_get_type ())
#define E_STORAGE(obj)          (GTK_CHECK_CAST ((obj), E_TYPE_STORAGE, EStorage))
#define E_STORAGE_CLASS(klass)      (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_STORAGE, EStorageClass))
#define E_IS_STORAGE(obj)       (GTK_CHECK_TYPE ((obj), E_TYPE_STORAGE))
#define E_IS_STORAGE_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_STORAGE))


typedef struct _EStorage        EStorage;
typedef struct _EStoragePrivate EStoragePrivate;
typedef struct _EStorageClass   EStorageClass;

enum _EStorageResult {
    E_STORAGE_OK,
    E_STORAGE_GENERICERROR,
    E_STORAGE_EXISTS,
    E_STORAGE_INVALIDTYPE,
    E_STORAGE_IOERROR,
    E_STORAGE_NOSPACE,
    E_STORAGE_NOTFOUND,
    E_STORAGE_NOTIMPLEMENTED,
    E_STORAGE_PERMISSIONDENIED,
    E_STORAGE_UNSUPPORTEDOPERATION,
    E_STORAGE_UNSUPPORTEDTYPE
};
typedef enum _EStorageResult EStorageResult;

typedef void (* EStorageResultCallback) (EStorage *storage, EStorageResult result, void *data);

#include "e-folder.h"

struct _EStorage {
    GtkObject parent;

    EStoragePrivate *priv;
};

struct _EStorageClass {
    GtkObjectClass parent_class;

    /* Signals.  */

    void * (* new_folder)     (EStorage *storage, const char *path);
    void * (* updated_folder) (EStorage *storage, const char *path);
    void * (* removed_folder) (EStorage *storage, const char *path);

    /* Virtual methods.  */

    GList      * (* get_subfolder_paths)  (EStorage *storage, const char *path);
    EFolder    * (* get_folder)           (EStorage *storage, const char *path);
    const char * (* get_name)             (EStorage *storage);

    void         (* async_create_folder)  (EStorage *storage, const char *path,
                           const char *type, const char *description,
                           EStorageResultCallback callback, void *data);
    void         (* async_remove_folder)  (EStorage *storage, const char *path,
                           EStorageResultCallback callback, void *data);
};


GtkType   e_storage_get_type   (void);
void      e_storage_construct  (EStorage   *storage,
                const char *toplevel_node_uri,
                const char *toplevel_node_type);
EStorage *e_storage_new        (const char *toplevel_node_uri,
                const char *toplevel_node_type);

gboolean    e_storage_path_is_relative      (const char *path);
gboolean    e_storage_path_is_absolute      (const char *path);

GList      *e_storage_get_subfolder_paths   (EStorage   *storage,
                         const char *path);
EFolder    *e_storage_get_folder            (EStorage   *storage,
                         const char *path);

const char *e_storage_get_name                (EStorage *storage);
const char *e_storage_get_toplevel_node_uri   (EStorage *storage);
const char *e_storage_get_toplevel_node_type  (EStorage *storage);

/* Folder operations.  */

void        e_storage_async_create_folder  (EStorage               *storage,
                        const char             *path,
                        const char             *type,
                        const char             *description,
                        EStorageResultCallback  callback,
                        void                   *data);
void        e_storage_async_remove_folder  (EStorage               *storage,
                        const char             *path,
                        EStorageResultCallback  callback,
                        void                   *data);

const char *e_storage_result_to_string     (EStorageResult          result);

/* Utility functions.  */

char *e_storage_get_path_for_physical_uri  (EStorage   *storage,
                        const char *physical_uri);

/* Protected.  C++ anyone?  */
gboolean  e_storage_new_folder      (EStorage *storage, const char *path, EFolder *folder);
gboolean  e_storage_updated_folder  (EStorage *storage, const char *path);
gboolean  e_storage_removed_folder  (EStorage *storage, const char *path);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _E_STORAGE_H_ */
ebsd-ports-gnome/commit/x11-servers?h=gnome-3.24&id=ece45792bcea7b175f1c4ef04221d31f3b8d3149'>Fix plist for sparc64. Should be a no-op on other archs, but bumplinimon2007-11-202-13/+14 * Add temporary fix for LEDs. Proper fix will be available in nextflz2007-10-292-1/+21 * Restore default optimization on RELENG_7.flz2007-10-241-4/+0 * - Explicit some configure arguments.flz2007-10-101-11/+7 * Change to new x11-drivers category.nork2007-10-069-382/+0 * Teach xorg-server that FreeBSD >= 700053 supports PCI domains andmarius2007-09-303-0/+395 * Switch autoconf dependencies from 2.53 or 2.59 to 2.61.linimon2007-09-301-2/+2 * - Update X.org ports to 7.3.flz2007-09-1427-406/+147 * - Consistencify descriptionsdanfe2007-07-031-4/+2 * Fix missing Xlibs dependency.danfe2007-07-031-0/+1 * - Fix the build with recent GCC [1]danfe2007-07-013-10/+135 * Band-aid over memory hungry gcc 4.2 when compiling xf86ScanPci.c.lesi2007-06-222-0/+15 * Clenup share/X11 directory upon deinstall.lesi2007-05-312-0/+2 * xorg-fontserver moved from x11-servers to x11-fonts (xfs).flz2007-05-209-160/+0 * - Welcome X.org 7.2 \o/.flz2007-05-20105-3671/+1156 * Fix loading modules on current by adding patch from devel/imake-6 sincelesi2007-02-232-1/+40 * Add vendor patch preventing overwiting of data on the stack or otherlesi2007-01-282-1/+9 * Respect X11BASE.laszlof2006-12-011-0/+5 * - Fix install with Xorg 6.9.0, unbreakpav2006-11-193-14/+31 * Add some old internal FreeType definitions to fix the server runtime. Thesemarcus2006-10-221-1/+4 * Remove the FreeType EXTRA_PATCHES now that they are in XFree86-4-libraries.marcus2006-10-183-12/+3 * Chase the GNOME X11BASE to LOCALBASE move, and fix the build with themarcus2006-10-1414-4/+789 * BROKEN: Does not installkris2006-09-171-0/+2 * NO_PACKAGE is not appropriatekris2006-09-031-1/+0 * Fix crash by bad pcf font.lesi2006-08-265-1/+100 * Fix crash by bad pcf font.lesi2006-08-267-4/+107 * - Add support to Intel 945GMmnag2006-08-212-1/+336 * - s,INSTALLS_SHLIB,USE_LDCONFIG,gclsung2006-08-151-1/+1 * Update to 0.14.6.nork2006-08-133-41/+50 * Update to 1.7.2erwin2006-06-242-5/+5 * Add a better workaround for LP64 bug in ProcRenderCompositeGlyphs() inlesi2006-06-052-1/+12 * Update to 1.71arved2006-05-292-6/+9 * Remove USE_REINPLACE from categories starting with Xedwin2006-05-131-1/+0 * Add my patch for buffer overflow in the Render extension's TriFan/TriStripanholt2006-05-036-1/+30 * Complete removal of cfb from sunffb driver as was done post release inlesi2006-04-202-1/+102 * Add patch from X.Org, fixing privilege escalation.lesi2006-03-222-0/+21 * Add a description of CorePointer, and Cosmetic change.nork2006-03-191-2/+7 * Oops, fix typo.nork2006-03-191-1/+1 * Fix up some parameters and messages.nork2006-03-191-10/+23 * o Refrect my environment values.nork2006-03-193-7/+13 * o Rename .o to .so. [1]nork2006-03-193-10/+16 * Add synaptics-0.14.4, is a driver for the Synaptics TouchPadnork2006-03-198-0/+264 * BROKEN on sparc64: Does not compilekris2006-03-071-0/+1 * Conversion to a single libtool environment.ade2006-02-232-7/+10 * Remove the FreeBSD KEYWORD from all rc.d scripts where it appears.dougb2006-02-212-3/+1 * Fix build on FreeBSD 4.Xlesi2006-02-025-0/+59 * SHA256ifyedwin2006-01-242-0/+2 * Replace ugly "@unexec rmdir %D... 2>/dev/null || true" with @dirrmtryedwin2006-01-226-17/+17 * Fixups after removal of separate mtree file for X_WINDOW_SYSTEM=XOrg case.lesi2006-01-221-4/+4 * Upgrade to X.Org 6.9.0 release.lesi2006-01-2247-1443/+271 * Make rc script require ldconfig so font server starts properly on systemslesi2006-01-064-3/+5 * Update to RC3.anholt2005-12-062-4/+4 * Fix one of the hangs on new GeForce cards using a patch from X.Org CVS.anholt2005-11-302-1/+23 * Update xorg-server-snap to 6.9RC2 (6.9.99.902).anholt2005-11-307-575/+9 * - Add SHA256pav2005-11-263-0/+3 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-3/+1 * Do not put Apple Cinema Display to sleep right after DDC probe.lesi2005-11-121-4/+14 * If port belongs to X11 distribution different than ${X_WINDOW_SYSTEM} one,lesi2005-11-1224-12/+64 * Update to the 6.8.99.16 snapshot, and add in a fix for a memory leak in cursoranholt2005-10-168-69/+318 * Install rc sript with ".sample" postfix so it does not get executed bylesi2005-09-213-3/+3 * Fix the fix for CAN-2005-2495.lesi2005-09-212-128/+271 * Fix the fix for CAN-2005-2495.lesi2005-09-192-30/+44 * Fix the fix for CAN-2005-2495.lesi2005-09-192-30/+44 * Fix rc script extension.lesi2005-09-173-1/+13 * Fix integer overflow when allocating large pixmaps.lesi2005-09-126-2/+510 * Fix a use-after-free in the cursor code that's easily triggered with -AJ mallocanholt2005-08-272-1/+43 * Fixup plist and man lists for alpha and sparc64.lesi2005-08-012-23/+42 * Grab a patch for keyboard on sparc64 from Xorg CVS. This makes 'kbd' driverlesi2005-08-01