1 /*
2  * Copyright (C) 2007 - 2011 Vivien Malerba <malerba@gnome-db.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA  02110-1301, USA.
18  */
19 
20 #ifndef __GDA_VIRTUAL_PROVIDER_H__
21 #define __GDA_VIRTUAL_PROVIDER_H__
22 
23 /* NOTICE: SQLite must be compiled without the SQLITE_OMIT_VIRTUALTABLE flag */
24 
25 #include <libgda/sqlite/gda-sqlite-provider.h>
26 
27 #define GDA_TYPE_VIRTUAL_PROVIDER            (gda_virtual_provider_get_type())
28 #define GDA_VIRTUAL_PROVIDER(obj)            (G_TYPE_CHECK_INSTANCE_CAST (obj, GDA_TYPE_VIRTUAL_PROVIDER, GdaVirtualProvider))
29 #define GDA_VIRTUAL_PROVIDER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST (klass, GDA_TYPE_VIRTUAL_PROVIDER, GdaVirtualProviderClass))
30 #define GDA_IS_VIRTUAL_PROVIDER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE (obj, GDA_TYPE_VIRTUAL_PROVIDER))
31 #define GDA_IS_VIRTUAL_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDA_TYPE_VIRTUAL_PROVIDER))
32 
33 G_BEGIN_DECLS
34 
35 typedef struct _GdaVirtualProvider      GdaVirtualProvider;
36 typedef struct _GdaVirtualProviderClass GdaVirtualProviderClass;
37 
38 struct _GdaVirtualProvider {
39 	GdaSqliteProvider  provider;
40 	/*< private >*/
41 	void             (*_gda_reserved1) (void);
42 };
43 
44 struct _GdaVirtualProviderClass {
45 	GdaSqliteProviderClass      parent_class;
46 
47 	/*< private >*/
48 	/* Padding for future expansion */
49 	void (*_gda_reserved1) (void);
50 	void (*_gda_reserved2) (void);
51 };
52 
53 /**
54  * SECTION:gda-virtual-provider
55  * @short_description: Base class for all virtual provider objects
56  * @title: GdaVirtualProvider
57  * @stability: Stable
58  * @see_also: #GdaVirtualConnection
59  *
60  * This is a base virtual class for all virtual providers implementations.
61  */
62 
63 GType          gda_virtual_provider_get_type          (void) G_GNUC_CONST;
64 
65 G_END_DECLS
66 
67 #endif
68