1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* |
---|
3 | * gnome-storage.h: Storage manipulation. |
---|
4 | * |
---|
5 | * Author: |
---|
6 | * Miguel de Icaza (miguel@gnu.org). |
---|
7 | * |
---|
8 | * Copyright 1999 Helix Code, Inc. |
---|
9 | */ |
---|
10 | #ifndef _BONOBO_STORAGE_H_ |
---|
11 | #define _BONOBO_STORAGE_H_ |
---|
12 | |
---|
13 | #include <bonobo/bonobo-xobject.h> |
---|
14 | #include <bonobo/bonobo-stream.h> |
---|
15 | |
---|
16 | BEGIN_GNOME_DECLS |
---|
17 | |
---|
18 | #define BONOBO_STORAGE_TYPE (bonobo_storage_get_type ()) |
---|
19 | #define BONOBO_STORAGE(o) (GTK_CHECK_CAST ((o), BONOBO_STORAGE_TYPE, BonoboStorage)) |
---|
20 | #define BONOBO_STORAGE_CLASS(k) (GTK_CHECK_CLASS_CAST((k), BONOBO_STORAGE_TYPE, BonoboStorageClass)) |
---|
21 | #define BONOBO_IS_STORAGE(o) (GTK_CHECK_TYPE ((o), BONOBO_STORAGE_TYPE)) |
---|
22 | #define BONOBO_IS_STORAGE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_STORAGE_TYPE)) |
---|
23 | |
---|
24 | typedef struct _BonoboStoragePrivate BonoboStoragePrivate; |
---|
25 | |
---|
26 | typedef struct { |
---|
27 | BonoboXObject object; |
---|
28 | |
---|
29 | BonoboStoragePrivate *priv; |
---|
30 | } BonoboStorage; |
---|
31 | |
---|
32 | typedef struct { |
---|
33 | BonoboXObjectClass parent_class; |
---|
34 | |
---|
35 | POA_Bonobo_Storage__epv epv; |
---|
36 | |
---|
37 | /* virtual methods */ |
---|
38 | Bonobo_StorageInfo *(*get_info) (BonoboStorage *storage, |
---|
39 | const CORBA_char *path, |
---|
40 | const Bonobo_StorageInfoFields mask, |
---|
41 | CORBA_Environment *ev); |
---|
42 | void (*set_info) (BonoboStorage *storage, |
---|
43 | const CORBA_char *path, |
---|
44 | const Bonobo_StorageInfo * info, |
---|
45 | const Bonobo_StorageInfoFields mask, |
---|
46 | CORBA_Environment *ev); |
---|
47 | BonoboStream *(*open_stream) (BonoboStorage *storage, |
---|
48 | const CORBA_char *path, |
---|
49 | Bonobo_Storage_OpenMode, |
---|
50 | CORBA_Environment *ev); |
---|
51 | BonoboStorage *(*open_storage) (BonoboStorage *storage, |
---|
52 | const CORBA_char *path, |
---|
53 | Bonobo_Storage_OpenMode, |
---|
54 | CORBA_Environment *ev); |
---|
55 | void (*copy_to) (BonoboStorage *storage, |
---|
56 | Bonobo_Storage target, |
---|
57 | CORBA_Environment *ev); |
---|
58 | void (*rename) (BonoboStorage *storage, |
---|
59 | const CORBA_char *path_name, |
---|
60 | const CORBA_char *new_path_name, |
---|
61 | CORBA_Environment *ev); |
---|
62 | void (*commit) (BonoboStorage *storage, |
---|
63 | CORBA_Environment *ev); |
---|
64 | void (*revert) (BonoboStorage *storage, |
---|
65 | CORBA_Environment *ev); |
---|
66 | Bonobo_Storage_DirectoryList * |
---|
67 | (*list_contents) (BonoboStorage *storage, |
---|
68 | const CORBA_char *path, |
---|
69 | Bonobo_StorageInfoFields mask, |
---|
70 | CORBA_Environment *ev); |
---|
71 | void (*erase) (BonoboStorage *storage, |
---|
72 | const CORBA_char *path, |
---|
73 | CORBA_Environment *ev); |
---|
74 | } BonoboStorageClass; |
---|
75 | |
---|
76 | GtkType bonobo_storage_get_type (void); |
---|
77 | |
---|
78 | BonoboStorage *bonobo_storage_open (const char *driver, |
---|
79 | const char *path, |
---|
80 | gint flags, |
---|
81 | gint mode); |
---|
82 | |
---|
83 | BonoboStorage *bonobo_storage_open_full (const char *driver, |
---|
84 | const char *path, |
---|
85 | gint flags, |
---|
86 | gint mode, |
---|
87 | CORBA_Environment *opt_ev); |
---|
88 | |
---|
89 | void bonobo_storage_copy_to (Bonobo_Storage src, |
---|
90 | Bonobo_Storage dest, |
---|
91 | CORBA_Environment *ev); |
---|
92 | |
---|
93 | void bonobo_storage_write_class_id (BonoboStorage *storage, |
---|
94 | char *class_id); |
---|
95 | |
---|
96 | void bonobo_stream_write_class_id (BonoboStream *stream, |
---|
97 | char *class_id); |
---|
98 | |
---|
99 | END_GNOME_DECLS |
---|
100 | |
---|
101 | #endif /* _BONOBO_STORAGE_H_ */ |
---|
102 | |
---|