File: bonobo-storage.h

package info (click to toggle)
bonobo 1.0.22-2.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,412 kB
  • ctags: 5,445
  • sloc: ansic: 51,714; sh: 7,733; makefile: 1,425; yacc: 318; xml: 266; sed: 16
file content (102 lines) | stat: -rw-r--r-- 3,316 bytes parent folder | download | duplicates (2)
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
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * gnome-storage.h: Storage manipulation.
 *
 * Author:
 *   Miguel de Icaza (miguel@gnu.org).
 *
 * Copyright 1999 Helix Code, Inc.
 */
#ifndef _BONOBO_STORAGE_H_
#define _BONOBO_STORAGE_H_

#include <bonobo/bonobo-xobject.h>
#include <bonobo/bonobo-stream.h>

BEGIN_GNOME_DECLS

#define BONOBO_STORAGE_TYPE        (bonobo_storage_get_type ())
#define BONOBO_STORAGE(o)          (GTK_CHECK_CAST ((o), BONOBO_STORAGE_TYPE, BonoboStorage))
#define BONOBO_STORAGE_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), BONOBO_STORAGE_TYPE, BonoboStorageClass))
#define BONOBO_IS_STORAGE(o)       (GTK_CHECK_TYPE ((o), BONOBO_STORAGE_TYPE))
#define BONOBO_IS_STORAGE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_STORAGE_TYPE))

typedef struct _BonoboStoragePrivate BonoboStoragePrivate;

typedef struct {
        BonoboXObject object;

	BonoboStoragePrivate *priv;
} BonoboStorage;

typedef struct {
	BonoboXObjectClass parent_class;

	POA_Bonobo_Storage__epv epv;

	/* virtual methods */
	Bonobo_StorageInfo *(*get_info) (BonoboStorage *storage,
					 const CORBA_char *path,
					 const Bonobo_StorageInfoFields mask,
					 CORBA_Environment *ev);
	void          (*set_info)       (BonoboStorage *storage,
					 const CORBA_char *path,
					 const Bonobo_StorageInfo * info,
					 const Bonobo_StorageInfoFields mask,
					 CORBA_Environment *ev);
	BonoboStream  *(*open_stream)   (BonoboStorage *storage,
					 const CORBA_char *path,
					 Bonobo_Storage_OpenMode, 
					 CORBA_Environment *ev);
	BonoboStorage *(*open_storage)  (BonoboStorage *storage,
					 const CORBA_char *path,
					 Bonobo_Storage_OpenMode, 
					 CORBA_Environment *ev);
	void         (*copy_to)         (BonoboStorage *storage, 
					 Bonobo_Storage target,
					 CORBA_Environment *ev);
	void         (*rename)          (BonoboStorage *storage,
					 const CORBA_char *path_name,
					 const CORBA_char *new_path_name,
					 CORBA_Environment *ev);
	void         (*commit)          (BonoboStorage *storage,
					 CORBA_Environment *ev);
	void         (*revert)          (BonoboStorage *storage,
					 CORBA_Environment *ev);
	Bonobo_Storage_DirectoryList *
	             (*list_contents)   (BonoboStorage *storage,
					 const CORBA_char *path,
					 Bonobo_StorageInfoFields mask,
					 CORBA_Environment *ev);
	void         (*erase)           (BonoboStorage *storage,
                                         const CORBA_char *path,
                                         CORBA_Environment *ev);
} BonoboStorageClass;

GtkType          bonobo_storage_get_type     (void);

BonoboStorage   *bonobo_storage_open         (const char *driver,
					      const char *path,
					      gint flags,
					      gint mode);

BonoboStorage   *bonobo_storage_open_full    (const char *driver,
					      const char *path,
					      gint flags,
					      gint mode,
					      CORBA_Environment *opt_ev);

void             bonobo_storage_copy_to      (Bonobo_Storage src, 
					      Bonobo_Storage dest,
					      CORBA_Environment *ev);
  
void             bonobo_storage_write_class_id (BonoboStorage *storage,
						char *class_id);

void             bonobo_stream_write_class_id  (BonoboStream *stream,
						char *class_id);

END_GNOME_DECLS

#endif /* _BONOBO_STORAGE_H_ */