File: bonobo-storage-plugin.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 (52 lines) | stat: -rw-r--r-- 1,466 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
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Author:
 *   Dietmar Maurer (dietmar@maurer-it.com)
 *
 * Copyright 2000 Maurer IT Systeml´┐Żsungen (http://www.maurer-it.com)
 */

#ifndef _BONOBO_STORAGE_PLUGIN_H_
#define _BONOBO_STORAGE_PLUGIN_H_

#include <bonobo/bonobo-storage.h>
#include <gmodule.h>

#define BONOBO_STORAGE_VERSION "1.0"

BEGIN_GNOME_DECLS

typedef struct          _StoragePlugin         StoragePlugin;
typedef gint           (*StoragePluginInitFn) (StoragePlugin *plugin);
typedef BonoboStorage *(*BonoboStorageOpenFn) (const char *path, 
					       gint flags, 
					       gint mode, 
					       CORBA_Environment *ev);
typedef BonoboStream  *(*BonoboStreamOpenFn)  (const char *path, 
					       gint flags, 
					       gint mode,
					       CORBA_Environment *ev);

struct _StoragePlugin {
	/* public, read only */
	gchar               *filename;     
	gchar               *name;         /* efs, file */
	gchar               *description;
	gchar               *version;
	BonoboStorageOpenFn  storage_open;
	BonoboStreamOpenFn   stream_open;
	/* private */
	GModule             *handle;
};

extern GList *storage_plugin_list;

/* Each plugin must have this one function */
extern gint init_storage_plugin (StoragePlugin *plugin);

void           bonobo_storage_load_plugins (void);
StoragePlugin *bonobo_storage_plugin_find  (const gchar *name);

END_GNOME_DECLS

#endif /* _BONOBO_STORAGE_PLUGIN_H_ */