[libgda: 6/7] DB: Moving private API to a separate file
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda: 6/7] DB: Moving private API to a separate file
- Date: Thu, 19 Mar 2020 14:56:46 +0000 (UTC)
commit 7c17ae656a2ffd09d2275119a6e127ad803c3cc6
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Tue Mar 10 21:51:37 2020 -0500
DB: Moving private API to a separate file
libgda/gda-db-catalog.c | 2 ++
libgda/gda-db-column-private.h | 30 ++++++++++++++++++++++++++++++
libgda/gda-db-column.c | 4 ++--
libgda/gda-db-column.h | 1 -
libgda/gda-db-fkey-private.h | 32 ++++++++++++++++++++++++++++++++
libgda/gda-db-fkey.c | 5 ++---
libgda/gda-db-fkey.h | 2 --
libgda/meson.build | 2 ++
8 files changed, 70 insertions(+), 8 deletions(-)
---
diff --git a/libgda/gda-db-catalog.c b/libgda/gda-db-catalog.c
index 5e7d0c102..0f0c0503e 100644
--- a/libgda/gda-db-catalog.c
+++ b/libgda/gda-db-catalog.c
@@ -24,6 +24,8 @@
#include "gda-db-table.h"
#include "gda-db-view.h"
#include "gda-db-fkey.h"
+#include "gda-db-column-private.h"
+#include "gda-db-fkey-private.h"
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <glib.h>
diff --git a/libgda/gda-db-column-private.h b/libgda/gda-db-column-private.h
new file mode 100644
index 000000000..9c14e54e1
--- /dev/null
+++ b/libgda/gda-db-column-private.h
@@ -0,0 +1,30 @@
+/* gda-db-column-private.h
+ *
+ * Copyright (C) 2020 Pavlo Solntsev <p sun fun gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GDA_DB_COLUMN_PRIVATE_H
+#define GDA_DB_COLUMN_PRIVATE_H
+
+#include "gda-meta-struct.h"
+#include "gda-db-column.h"
+
+GdaDbColumn* gda_db_column_new_from_meta (GdaMetaTableColumn *column);
+
+#endif
+
diff --git a/libgda/gda-db-column.c b/libgda/gda-db-column.c
index b1f25f2de..344fae47e 100644
--- a/libgda/gda-db-column.c
+++ b/libgda/gda-db-column.c
@@ -25,6 +25,7 @@
#include "gda-util.h"
#include "gda-db-buildable.h"
#include "gda-server-provider.h"
+#include "gda-db-column-private.h"
G_DEFINE_QUARK (gda-db-column-error, gda_db_column_error)
@@ -1235,8 +1236,7 @@ gda_db_column_prepare_add (GdaDbColumn *self,
*
* Create new #GdaDbColumn instance from the corresponding #GdaMetaTableColumn
* object. If %NULL is passed this function works exactly as
- * gda_db_column_new(). Thie method is designed for internal use only and will be obsolete in the
- * future.
+ * gda_db_column_new().
*
* Returns: New object that should be freed with gda_db_column_free()
*/
diff --git a/libgda/gda-db-column.h b/libgda/gda-db-column.h
index 48d8d258a..5ef759dc4 100644
--- a/libgda/gda-db-column.h
+++ b/libgda/gda-db-column.h
@@ -54,7 +54,6 @@ typedef enum
GQuark gda_db_column_error_quark (void);
GdaDbColumn* gda_db_column_new (void);
-GdaDbColumn* gda_db_column_new_from_meta (GdaMetaTableColumn *column);
const gchar* gda_db_column_get_name (GdaDbColumn *self);
void gda_db_column_set_name (GdaDbColumn *self, const gchar *name);
diff --git a/libgda/gda-db-fkey-private.h b/libgda/gda-db-fkey-private.h
new file mode 100644
index 000000000..5c3139300
--- /dev/null
+++ b/libgda/gda-db-fkey-private.h
@@ -0,0 +1,32 @@
+/* gda-db-fkey-private.h
+ *
+ * Copyright (C) 2020 Pavlo Solntsev <p sun fun gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GDA_DB_FKEY_PRIVATE_H
+#define GDA_DB_FKEY_PRIVATE_H
+
+#include "gda-db-fkey.h"
+#include "gda-meta-struct.h"
+
+GdaDbFkey *gda_db_fkey_new_from_meta (GdaMetaTableForeignKey *metafkey);
+
+#endif /* end of include guard: GDA_DB_FKEY_PRIVATE_H_RX2KUYCG */
+
+
+
diff --git a/libgda/gda-db-fkey.c b/libgda/gda-db-fkey.c
index be60d56fe..bd881bb2a 100644
--- a/libgda/gda-db-fkey.c
+++ b/libgda/gda-db-fkey.c
@@ -22,7 +22,7 @@
#include "gda-db-fkey.h"
#include <glib/gi18n-lib.h>
#include "gda-db-buildable.h"
-#include "gda-meta-struct.h"
+#include "gda-db-fkey-private.h"
typedef struct
{
@@ -118,8 +118,7 @@ gda_db_fkey_new (void)
* @metafkey: a #GdaMetaTableForeignKey instance
*
* Create a new instance from the corresponding meta object. If @metafkey is %NULL,
- * this function is identical to gda_db_fkey_new(). This method is for internal use only and will be
- * obsolete in the future.
+ * this function is identical to gda_db_fkey_new().
*
* Stability: Stable
* Since: 6.0
diff --git a/libgda/gda-db-fkey.h b/libgda/gda-db-fkey.h
index ab5d6597f..52e399961 100644
--- a/libgda/gda-db-fkey.h
+++ b/libgda/gda-db-fkey.h
@@ -27,7 +27,6 @@
#include <libxml/xmlwriter.h>
#include "gda-db-buildable.h"
#include "gda-server-operation.h"
-#include "gda-meta-struct.h"
G_BEGIN_DECLS
@@ -91,7 +90,6 @@ gboolean gda_db_fkey_prepare_create (GdaDbFkey *self,
GdaServerOperation *op,
gint i,
GError **error);
-GdaDbFkey *gda_db_fkey_new_from_meta (GdaMetaTableForeignKey *metafkey);
G_END_DECLS
diff --git a/libgda/meson.build b/libgda/meson.build
index f07fefb43..7295671b2 100644
--- a/libgda/meson.build
+++ b/libgda/meson.build
@@ -124,6 +124,8 @@ libgda_headers = files([
libgda_headers_private = files([
'gda-statement-extra.h',
+ 'gda-db-column-private.h',
+ 'gda-db-fkey-private.h',
])
libgda_headers_all = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]