[tracker/wip/carlosg/tracker-3.0-api-breaks: 57/79] libtracker-sparql: Add define to export library functions
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/tracker-3.0-api-breaks: 57/79] libtracker-sparql: Add define to export library functions
- Date: Mon, 27 Jan 2020 12:22:04 +0000 (UTC)
commit d84d91a4b47485c3d5771685ecdfe6ed7f32c234
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jan 8 21:38:28 2020 +0100
libtracker-sparql: Add define to export library functions
And get rid of the map file. This allows us to selectively make API
public, so we no longer need it, nor regexps. Also, add the beginning
of TRACKER_AVAILABLE_IN_* defines, so we can help with testing minor
version changes, add deprecation warnings, etc.
So far we're heading towards 3.0, all public API started using this with
TRACKER_AVAILABLE_IN_ALL, since we're bumping major version.
src/libtracker-bus/meson.build | 1 +
src/libtracker-common/meson.build | 1 +
src/libtracker-direct/meson.build | 1 +
src/libtracker-remote/meson.build | 1 +
src/libtracker-sparql-backend/meson.build | 6 ++--
src/libtracker-sparql-backend/tracker-sparql-2.map | 17 ----------
src/libtracker-sparql/meson.build | 1 +
src/libtracker-sparql/tracker-connection.h | 27 +++++++++++++--
src/libtracker-sparql/tracker-cursor.h | 16 +++++++++
src/libtracker-sparql/tracker-endpoint-dbus.h | 3 ++
src/libtracker-sparql/tracker-endpoint.h | 2 ++
src/libtracker-sparql/tracker-namespace-manager.h | 11 +++++++
src/libtracker-sparql/tracker-notifier.h | 8 +++++
src/libtracker-sparql/tracker-resource.h | 38 ++++++++++++++++++++--
src/libtracker-sparql/tracker-sparql.h | 1 +
src/libtracker-sparql/tracker-statement.h | 12 +++++++
src/libtracker-sparql/tracker-utils.h | 6 ++++
src/libtracker-sparql/tracker-version.h | 7 ++++
18 files changed, 134 insertions(+), 25 deletions(-)
---
diff --git a/src/libtracker-bus/meson.build b/src/libtracker-bus/meson.build
index 7b17a5a12..59464b204 100644
--- a/src/libtracker-bus/meson.build
+++ b/src/libtracker-bus/meson.build
@@ -14,6 +14,7 @@ libtracker_bus = static_library('tracker-bus',
],
dependencies: [tracker_common_dep, tracker_sparql_intermediate_dep],
include_directories: [commoninc, configinc, srcinc],
+ gnu_symbol_visibility: 'hidden',
)
tracker_sparql_bus_dep = declare_dependency(
diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build
index d42792a57..3ec6caec0 100644
--- a/src/libtracker-common/meson.build
+++ b/src/libtracker-common/meson.build
@@ -40,6 +40,7 @@ libtracker_common = static_library('tracker-common',
dependencies: tracker_common_dependencies + [unicode_library],
c_args: tracker_c_args,
include_directories: [configinc, srcinc],
+ gnu_symbol_visibility: 'hidden',
)
commoninc = include_directories('.')
diff --git a/src/libtracker-direct/meson.build b/src/libtracker-direct/meson.build
index 94775da1a..09bbac31a 100644
--- a/src/libtracker-direct/meson.build
+++ b/src/libtracker-direct/meson.build
@@ -4,6 +4,7 @@ libtracker_direct = static_library('tracker-direct',
c_args: tracker_c_args,
dependencies: [ glib, gio, tracker_data_dep, tracker_sparql_intermediate_dep ],
include_directories: [commoninc, configinc, srcinc],
+ gnu_symbol_visibility: 'hidden',
)
tracker_sparql_direct_dep = declare_dependency(
diff --git a/src/libtracker-remote/meson.build b/src/libtracker-remote/meson.build
index 82e8853fb..838b141ce 100644
--- a/src/libtracker-remote/meson.build
+++ b/src/libtracker-remote/meson.build
@@ -19,6 +19,7 @@ libtracker_remote = static_library('tracker-remote', sources,
# doesn't seem to work here.
'--target-glib', glib_required,
],
+ gnu_symbol_visibility: 'hidden',
)
tracker_sparql_remote_dep = declare_dependency(
diff --git a/src/libtracker-sparql-backend/meson.build b/src/libtracker-sparql-backend/meson.build
index 1aa9931ee..e3704334b 100644
--- a/src/libtracker-sparql-backend/meson.build
+++ b/src/libtracker-sparql-backend/meson.build
@@ -1,19 +1,17 @@
-mapfile = 'tracker-sparql-2.map'
-vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
-
libtracker_sparql = library('tracker-sparql-' + tracker_api_version,
'../libtracker-common/libtracker-common.vapi',
'../libtracker-data/libtracker-data.vapi',
'../libtracker-direct/tracker-direct.vapi',
'tracker-backend.vala',
+ gnu_symbol_visibility: 'hidden',
+
soversion: soversion,
version: libversion,
install: true,
install_rpath: tracker_internal_libs_dir,
- link_args: vflag,
link_whole: [libtracker_sparql_intermediate],
dependencies: [tracker_common_dep, tracker_sparql_remote_dep, tracker_sparql_bus_dep,
tracker_sparql_direct_dep, libtracker_sparql_c_vapi_dep],
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
index 3fb684f2f..9ddbe51a6 100644
--- a/src/libtracker-sparql/meson.build
+++ b/src/libtracker-sparql/meson.build
@@ -40,6 +40,7 @@ libtracker_sparql_intermediate = static_library('tracker-sparql-intermediate',
enum_types,
libtracker_sparql_c_sources,
dependencies: [tracker_common_dep, json_glib],
+ gnu_symbol_visibility: 'hidden',
)
sparqlinc = [include_directories('.'), meson.current_build_dir()]
diff --git a/src/libtracker-sparql/tracker-connection.h b/src/libtracker-sparql/tracker-connection.h
index 6540d9c57..1ae6071b3 100644
--- a/src/libtracker-sparql/tracker-connection.h
+++ b/src/libtracker-sparql/tracker-connection.h
@@ -23,8 +23,8 @@
#error "only <libtracker-sparql/tracker-sparql.h> must be included directly."
#endif
-#include "tracker-notifier.h"
-
+#include <libtracker-sparql/tracker-notifier.h>
+#include <libtracker-sparql/tracker-version.h>
#include <gio/gio.h>
typedef enum {
@@ -40,6 +40,8 @@ typedef enum {
*/
#define TRACKER_TYPE_SPARQL_CONNECTION tracker_sparql_connection_get_type ()
#define TRACKER_SPARQL_TYPE_CONNECTION TRACKER_TYPE_SPARQL_CONNECTION
+
+TRACKER_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (TrackerSparqlConnection,
tracker_sparql_connection,
TRACKER, SPARQL_CONNECTION,
@@ -146,56 +148,69 @@ struct _TrackerSparqlConnectionClass
void (* close) (TrackerSparqlConnection *connection);
};
+TRACKER_AVAILABLE_IN_ALL
GQuark tracker_sparql_error_quark (void);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlConnection * tracker_sparql_connection_new (TrackerSparqlConnectionFlags flags,
GFile *store,
GFile *ontology,
GCancellable *cancellable,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_connection_new_async (TrackerSparqlConnectionFlags flags,
GFile *store,
GFile *ontology,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlConnection * tracker_sparql_connection_new_finish (GAsyncResult *result,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlConnection * tracker_sparql_connection_bus_new (const gchar *service_name,
const gchar *object_path,
GDBusConnection *dbus_connection,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlConnection * tracker_sparql_connection_remote_new (const gchar *uri_base);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlCursor * tracker_sparql_connection_query (TrackerSparqlConnection *connection,
const gchar *sparql,
GCancellable *cancellable,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_connection_query_async (TrackerSparqlConnection *connection,
const gchar *sparql,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlCursor * tracker_sparql_connection_query_finish (TrackerSparqlConnection *connection,
GAsyncResult *res,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_connection_update (TrackerSparqlConnection *connection,
const gchar *sparql,
gint priority,
GCancellable *cancellable,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_connection_update_async (TrackerSparqlConnection *connection,
const gchar *sparql,
gint priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_connection_update_finish (TrackerSparqlConnection *connection,
GAsyncResult *res,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_connection_update_array_async (TrackerSparqlConnection *connection,
gchar **sparql,
gint sparql_length,
@@ -203,33 +218,41 @@ void tracker_sparql_connection_update_array_async (TrackerSparqlConnection *con
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+TRACKER_AVAILABLE_IN_ALL
gboolean tracker_sparql_connection_update_array_finish (TrackerSparqlConnection *connection,
GAsyncResult *res,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
GVariant * tracker_sparql_connection_update_blank (TrackerSparqlConnection *connection,
const gchar *sparql,
gint priority,
GCancellable *cancellable,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_connection_update_blank_async (TrackerSparqlConnection *connection,
const gchar *sparql,
gint priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+TRACKER_AVAILABLE_IN_ALL
GVariant * tracker_sparql_connection_update_blank_finish (TrackerSparqlConnection *connection,
GAsyncResult *res,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
TrackerNamespaceManager * tracker_sparql_connection_get_namespace_manager (TrackerSparqlConnection
*connection);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlStatement * tracker_sparql_connection_query_statement (TrackerSparqlConnection *connection,
const gchar *sparql,
GCancellable *cancellable,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
TrackerNotifier * tracker_sparql_connection_create_notifier (TrackerSparqlConnection *connection,
TrackerNotifierFlags flags);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_connection_close (TrackerSparqlConnection *connection);
#endif /* __TRACKER_SPARQL_CONNECTION_H__ */
diff --git a/src/libtracker-sparql/tracker-cursor.h b/src/libtracker-sparql/tracker-cursor.h
index 7016b01f2..73558a500 100644
--- a/src/libtracker-sparql/tracker-cursor.h
+++ b/src/libtracker-sparql/tracker-cursor.h
@@ -24,6 +24,7 @@
#endif
#include <gio/gio.h>
+#include <libtracker-sparql/tracker-version.h>
/**
* TrackerSparqlCursor:
@@ -33,6 +34,7 @@
*/
#define TRACKER_TYPE_SPARQL_CURSOR tracker_sparql_cursor_get_type ()
#define TRACKER_SPARQL_TYPE_CURSOR TRACKER_TYPE_SPARQL_CURSOR
+TRACKER_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (TrackerSparqlCursor, tracker_sparql_cursor,
TRACKER, SPARQL_CURSOR, GObject)
@@ -96,40 +98,54 @@ struct _TrackerSparqlCursorClass
gint (* get_n_columns) (TrackerSparqlCursor *cursor);
};
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlConnection * tracker_sparql_cursor_get_connection (TrackerSparqlCursor *cursor);
+TRACKER_AVAILABLE_IN_ALL
gint tracker_sparql_cursor_get_n_columns (TrackerSparqlCursor *cursor);
+TRACKER_AVAILABLE_IN_ALL
const gchar * tracker_sparql_cursor_get_string (TrackerSparqlCursor *cursor,
gint column,
glong *length);
+TRACKER_AVAILABLE_IN_ALL
gboolean tracker_sparql_cursor_get_boolean (TrackerSparqlCursor *cursor,
gint column);
+TRACKER_AVAILABLE_IN_ALL
gdouble tracker_sparql_cursor_get_double (TrackerSparqlCursor *cursor,
gint column);
+TRACKER_AVAILABLE_IN_ALL
gint64 tracker_sparql_cursor_get_integer (TrackerSparqlCursor *cursor,
gint column);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlValueType tracker_sparql_cursor_get_value_type (TrackerSparqlCursor *cursor,
gint column);
+TRACKER_AVAILABLE_IN_ALL
const gchar * tracker_sparql_cursor_get_variable_name (TrackerSparqlCursor *cursor,
gint column);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_cursor_close (TrackerSparqlCursor *cursor);
+TRACKER_AVAILABLE_IN_ALL
gboolean tracker_sparql_cursor_is_bound (TrackerSparqlCursor *cursor,
gint column);
+TRACKER_AVAILABLE_IN_ALL
gboolean tracker_sparql_cursor_next (TrackerSparqlCursor *cursor,
GCancellable *cancellable,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_cursor_next_async (TrackerSparqlCursor *cursor,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+TRACKER_AVAILABLE_IN_ALL
gboolean tracker_sparql_cursor_next_finish (TrackerSparqlCursor *cursor,
GAsyncResult *res,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_cursor_rewind (TrackerSparqlCursor *cursor);
#endif /* __TRACKER_SPARQL_CURSOR_H__ */
diff --git a/src/libtracker-sparql/tracker-endpoint-dbus.h b/src/libtracker-sparql/tracker-endpoint-dbus.h
index d7902ca8a..300ab0b14 100644
--- a/src/libtracker-sparql/tracker-endpoint-dbus.h
+++ b/src/libtracker-sparql/tracker-endpoint-dbus.h
@@ -27,10 +27,13 @@
#endif
#include <libtracker-sparql/tracker-endpoint.h>
+#include <libtracker-sparql/tracker-version.h>
#define TRACKER_TYPE_ENDPOINT_DBUS tracker_endpoint_dbus_get_type()
+TRACKER_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (TrackerEndpointDBus, tracker_endpoint_dbus, TRACKER, ENDPOINT_DBUS, TrackerEndpoint)
+TRACKER_AVAILABLE_IN_ALL
TrackerEndpointDBus *
tracker_endpoint_dbus_new (TrackerSparqlConnection *sparql_connection,
GDBusConnection *dbus_connection,
diff --git a/src/libtracker-sparql/tracker-endpoint.h b/src/libtracker-sparql/tracker-endpoint.h
index 580e9f7e8..cc17a5b08 100644
--- a/src/libtracker-sparql/tracker-endpoint.h
+++ b/src/libtracker-sparql/tracker-endpoint.h
@@ -30,12 +30,14 @@
#include <libtracker-sparql/tracker-connection.h>
#define TRACKER_TYPE_ENDPOINT tracker_endpoint_get_type()
+TRACKER_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (TrackerEndpoint, tracker_endpoint, TRACKER, ENDPOINT, GObject)
struct _TrackerEndpointClass {
GObjectClass parent_class;
};
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlConnection * tracker_endpoint_get_sparql_connection (TrackerEndpoint *endpoint);
#endif /* __TRACKER_ENDPOINT_H__ */
diff --git a/src/libtracker-sparql/tracker-namespace-manager.h
b/src/libtracker-sparql/tracker-namespace-manager.h
index 9de4643f1..86ee8a2c9 100644
--- a/src/libtracker-sparql/tracker-namespace-manager.h
+++ b/src/libtracker-sparql/tracker-namespace-manager.h
@@ -28,21 +28,32 @@ G_BEGIN_DECLS
#error "only <libtracker-sparql/tracker-sparql.h> must be included directly."
#endif
+#include <libtracker-sparql/tracker-version.h>
+
#define TRACKER_TYPE_NAMESPACE_MANAGER (tracker_namespace_manager_get_type())
+TRACKER_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (TrackerNamespaceManager, tracker_namespace_manager, TRACKER, NAMESPACE_MANAGER,
GObject)
+TRACKER_AVAILABLE_IN_ALL
TrackerNamespaceManager *tracker_namespace_manager_new (void);
+TRACKER_AVAILABLE_IN_ALL
TrackerNamespaceManager *tracker_namespace_manager_get_default (void);
+TRACKER_AVAILABLE_IN_ALL
char *tracker_namespace_manager_expand_uri (TrackerNamespaceManager *self, const char *compact_uri);
+TRACKER_AVAILABLE_IN_ALL
gboolean tracker_namespace_manager_has_prefix (TrackerNamespaceManager *self, const char *prefix);
+TRACKER_AVAILABLE_IN_ALL
const char *tracker_namespace_manager_lookup_prefix (TrackerNamespaceManager *self, const char *prefix);
+TRACKER_AVAILABLE_IN_ALL
void tracker_namespace_manager_add_prefix (TrackerNamespaceManager *self, const char *prefix, const char
*ns);
+TRACKER_AVAILABLE_IN_ALL
char *tracker_namespace_manager_print_turtle (TrackerNamespaceManager *self);
+TRACKER_AVAILABLE_IN_ALL
void tracker_namespace_manager_foreach (TrackerNamespaceManager *self, GHFunc func, gpointer user_data);
G_END_DECLS
diff --git a/src/libtracker-sparql/tracker-notifier.h b/src/libtracker-sparql/tracker-notifier.h
index 4262f1402..fd0d9869e 100644
--- a/src/libtracker-sparql/tracker-notifier.h
+++ b/src/libtracker-sparql/tracker-notifier.h
@@ -25,9 +25,11 @@
#endif
#include <gio/gio.h>
+#include <libtracker-sparql/tracker-version.h>
#define TRACKER_TYPE_NOTIFIER (tracker_notifier_get_type ())
+TRACKER_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (TrackerNotifier, tracker_notifier, TRACKER, NOTIFIER, GObject)
typedef struct _TrackerNotifierEvent TrackerNotifierEvent;
@@ -68,17 +70,23 @@ typedef enum {
TRACKER_NOTIFIER_EVENT_UPDATE
} TrackerNotifierEventType;
+TRACKER_AVAILABLE_IN_ALL
guint tracker_notifier_signal_subscribe (TrackerNotifier *notifier,
GDBusConnection *connection,
const gchar *service,
const gchar *graph);
+TRACKER_AVAILABLE_IN_ALL
void tracker_notifier_signal_unsubscribe (TrackerNotifier *notifier,
guint handler_id);
+TRACKER_AVAILABLE_IN_ALL
TrackerNotifierEventType
tracker_notifier_event_get_event_type (TrackerNotifierEvent *event);
+TRACKER_AVAILABLE_IN_ALL
gint64 tracker_notifier_event_get_id (TrackerNotifierEvent *event);
+TRACKER_AVAILABLE_IN_ALL
const gchar * tracker_notifier_event_get_type (TrackerNotifierEvent *event);
+TRACKER_AVAILABLE_IN_ALL
const gchar * tracker_notifier_event_get_urn (TrackerNotifierEvent *event);
#endif /* __TRACKER_NOTIFIER_H__ */
diff --git a/src/libtracker-sparql/tracker-resource.h b/src/libtracker-sparql/tracker-resource.h
index 89e765a4a..91d934bdd 100644
--- a/src/libtracker-sparql/tracker-resource.h
+++ b/src/libtracker-sparql/tracker-resource.h
@@ -21,12 +21,13 @@
#define __LIBTRACKER_RESOURCE_H__
#include <glib-object.h>
-
-#include "tracker-namespace-manager.h"
+#include <libtracker-sparql/tracker-version.h>
+#include <libtracker-sparql/tracker-namespace-manager.h>
G_BEGIN_DECLS
#define TRACKER_TYPE_RESOURCE tracker_resource_get_type()
+TRACKER_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (TrackerResource, tracker_resource, TRACKER, RESOURCE, GObject)
struct _TrackerResourceClass
@@ -34,46 +35,79 @@ struct _TrackerResourceClass
GObjectClass parent_class;
};
+TRACKER_AVAILABLE_IN_ALL
TrackerResource *tracker_resource_new (const char *identifier);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_gvalue (TrackerResource *self, const char *property_uri, const GValue *value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_boolean (TrackerResource *self, const char *property_uri, gboolean value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_double (TrackerResource *self, const char *property_uri, double value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_int (TrackerResource *self, const char *property_uri, int value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_int64 (TrackerResource *self, const char *property_uri, gint64 value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_relation (TrackerResource *self, const char *property_uri, TrackerResource
*resource);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_take_relation (TrackerResource *self, const char *property_uri, TrackerResource
*resource);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_string (TrackerResource *self, const char *property_uri, const char *value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_uri (TrackerResource *self, const char *property_uri, const char *value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_gvalue (TrackerResource *self, const char *property_uri, const GValue *value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_boolean (TrackerResource *self, const char *property_uri, gboolean value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_double (TrackerResource *self, const char *property_uri, double value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_int (TrackerResource *self, const char *property_uri, int value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_int64 (TrackerResource *self, const char *property_uri, gint64 value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_relation (TrackerResource *self, const char *property_uri, TrackerResource
*resource);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_take_relation (TrackerResource *self, const char *property_uri, TrackerResource
*resource);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_string (TrackerResource *self, const char *property_uri, const char *value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_add_uri (TrackerResource *self, const char *property_uri, const char *value);
+TRACKER_AVAILABLE_IN_ALL
GList *tracker_resource_get_values (TrackerResource *self, const char *property_uri);
+TRACKER_AVAILABLE_IN_ALL
gboolean tracker_resource_get_first_boolean (TrackerResource *self, const char *property_uri);
+TRACKER_AVAILABLE_IN_ALL
double tracker_resource_get_first_double (TrackerResource *self, const char *property_uri);
+TRACKER_AVAILABLE_IN_ALL
int tracker_resource_get_first_int (TrackerResource *self, const char *property_uri);
+TRACKER_AVAILABLE_IN_ALL
gint64 tracker_resource_get_first_int64 (TrackerResource *self, const char *property_uri);
+TRACKER_AVAILABLE_IN_ALL
TrackerResource *tracker_resource_get_first_relation (TrackerResource *self, const char *property_uri);
+TRACKER_AVAILABLE_IN_ALL
const char *tracker_resource_get_first_string (TrackerResource *self, const char *property_uri);
+TRACKER_AVAILABLE_IN_ALL
const char *tracker_resource_get_first_uri (TrackerResource *self, const char *property_uri);
+TRACKER_AVAILABLE_IN_ALL
const char *tracker_resource_get_identifier (TrackerResource *self);
+TRACKER_AVAILABLE_IN_ALL
void tracker_resource_set_identifier (TrackerResource *self, const char *identifier);
+TRACKER_AVAILABLE_IN_ALL
gint tracker_resource_identifier_compare_func (TrackerResource *resource, const char *identifier);
+TRACKER_AVAILABLE_IN_ALL
char *tracker_resource_print_turtle(TrackerResource *self, TrackerNamespaceManager *namespaces);
+TRACKER_AVAILABLE_IN_ALL
char *tracker_resource_print_sparql_update (TrackerResource *self, TrackerNamespaceManager *namespaces,
const char *graph_id);
+TRACKER_AVAILABLE_IN_ALL
char *tracker_resource_print_jsonld (TrackerResource *self, TrackerNamespaceManager *namespaces);
G_END_DECLS
diff --git a/src/libtracker-sparql/tracker-sparql.h b/src/libtracker-sparql/tracker-sparql.h
index 8555fb891..624b4ce8e 100644
--- a/src/libtracker-sparql/tracker-sparql.h
+++ b/src/libtracker-sparql/tracker-sparql.h
@@ -22,6 +22,7 @@
#define __LIBTRACKER_SPARQL_INSIDE__
+#include <libtracker-sparql/tracker-version.h>
#include <libtracker-sparql/tracker-connection.h>
#include <libtracker-sparql/tracker-cursor.h>
#include <libtracker-sparql/tracker-endpoint.h>
diff --git a/src/libtracker-sparql/tracker-statement.h b/src/libtracker-sparql/tracker-statement.h
index 128e6bc09..b690dbd5d 100644
--- a/src/libtracker-sparql/tracker-statement.h
+++ b/src/libtracker-sparql/tracker-statement.h
@@ -24,9 +24,11 @@
#endif
#include <gio/gio.h>
+#include <libtracker-sparql/tracker-version.h>
#define TRACKER_TYPE_SPARQL_STATEMENT tracker_sparql_statement_get_type ()
#define TRACKER_SPARQL_TYPE_STATEMENT TRACKER_TYPE_SPARQL_STATEMENT
+TRACKER_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (TrackerSparqlStatement,
tracker_sparql_statement,
TRACKER, SPARQL_STATEMENT,
@@ -65,39 +67,49 @@ struct _TrackerSparqlStatementClass
void (* clear_bindings) (TrackerSparqlStatement *stmt);
};
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlConnection * tracker_sparql_statement_get_connection (TrackerSparqlStatement *stmt);
+TRACKER_AVAILABLE_IN_ALL
const gchar * tracker_sparql_statement_get_sparql (TrackerSparqlStatement *stmt);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_statement_bind_boolean (TrackerSparqlStatement *stmt,
const gchar *name,
gboolean value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_statement_bind_int (TrackerSparqlStatement *stmt,
const gchar *name,
gint64 value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_statement_bind_double (TrackerSparqlStatement *stmt,
const gchar *name,
gdouble value);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_statement_bind_string (TrackerSparqlStatement *stmt,
const gchar *name,
const gchar *value);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlCursor * tracker_sparql_statement_execute (TrackerSparqlStatement *stmt,
GCancellable *cancellable,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_statement_execute_async (TrackerSparqlStatement *stmt,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
+TRACKER_AVAILABLE_IN_ALL
TrackerSparqlCursor * tracker_sparql_statement_execute_finish (TrackerSparqlStatement *stmt,
GAsyncResult *res,
GError **error);
+TRACKER_AVAILABLE_IN_ALL
void tracker_sparql_statement_clear_bindings (TrackerSparqlStatement *stmt);
#endif /* __TRACKER_SPARQL_STATEMENT_H__ */
diff --git a/src/libtracker-sparql/tracker-utils.h b/src/libtracker-sparql/tracker-utils.h
index 2eee4401b..6acfcaecf 100644
--- a/src/libtracker-sparql/tracker-utils.h
+++ b/src/libtracker-sparql/tracker-utils.h
@@ -20,14 +20,20 @@
#define __TRACKER_UTILS_H__
#include <glib.h>
+#include <libtracker-sparql/tracker-version.h>
+TRACKER_AVAILABLE_IN_ALL
gchar * tracker_sparql_escape_uri_vprintf (const gchar *format,
va_list args);
+TRACKER_AVAILABLE_IN_ALL
gchar * tracker_sparql_escape_uri_printf (const gchar* format,
...);
+TRACKER_AVAILABLE_IN_ALL
gchar * tracker_sparql_escape_uri (const gchar *uri);
+TRACKER_AVAILABLE_IN_ALL
gchar* tracker_sparql_escape_string (const gchar* literal);
+TRACKER_AVAILABLE_IN_ALL
gchar* tracker_sparql_get_uuid_urn (void);
#endif /* __TRACKER_UTILS_H__ */
diff --git a/src/libtracker-sparql/tracker-version.h b/src/libtracker-sparql/tracker-version.h
index a822423c9..9d2a8ac44 100644
--- a/src/libtracker-sparql/tracker-version.h
+++ b/src/libtracker-sparql/tracker-version.h
@@ -29,6 +29,12 @@ G_BEGIN_DECLS
#error "only <libtracker-sparql/tracker-sparql.h> must be included directly."
#endif
+#ifndef _TRACKER_EXTERN
+#define _TRACKER_EXTERN __attribute__((visibility("default"))) extern
+#endif
+
+#define TRACKER_AVAILABLE_IN_ALL _TRACKER_EXTERN
+
GLIB_VAR const guint tracker_major_version;
GLIB_VAR const guint tracker_minor_version;
GLIB_VAR const guint tracker_micro_version;
@@ -65,6 +71,7 @@ GLIB_VAR const guint tracker_binary_age;
(TRACKER_MAJOR_VERSION == (major) && TRACKER_MINOR_VERSION == (minor) && \
TRACKER_MICRO_VERSION >= (micro)))
+TRACKER_AVAILABLE_IN_ALL
const gchar * tracker_check_version (guint required_major,
guint required_minor,
guint required_micro);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]