summaryrefslogtreecommitdiff
path: root/src/libtracker-common
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-07-15 18:50:11 +0200
committerCarlos Garnacho <carlosg@gnome.org>2022-07-17 15:01:57 +0200
commit4098bbda20dac89eefa20840e09673dba4b86862 (patch)
tree1d60b29c1b1ae587671cab34bce4d0f9b90a8cee /src/libtracker-common
parent425411307ea0487279fb768dd69368da4ac59bd4 (diff)
downloadtracker-4098bbda20dac89eefa20840e09673dba4b86862.tar.gz
libtracker-sparql: Reimplement all bus connection objects
Historically the set of objects that provide the bus implementation were written in Vala, this commit ends with that and rewrites all of these objects in C. This is mostly a 1:1 port with one exception, cursors are now based on TrackerDeserializer and input streams, they were given a memory buffer previously. The use of Vala here had a few indirect effects: - Vala code could not be introspected by our gcovr infrastructure for code coverage. This made this central piece of our library invisible to coverage stats entirely. - Since our library code and vala contend for the use of visibility attributes for public functions, we ended up with a few symbols from this Vala code that was never intended to be public API. - The async code generated by Vala triggers reports about unreachable code in Coverity. This has proven very imbued in Vala and hard to fix without breaking something else there. Moving away from Vala fixes all 3. For the sake of maintainability, this is seen as a net improvement, despite the more verbose code and the async operation daisy chaning at places. Now all untested code, leaked symbols and dead code will be a responsibility of our own.
Diffstat (limited to 'src/libtracker-common')
-rw-r--r--src/libtracker-common/libtracker-common.vapi120
1 files changed, 0 insertions, 120 deletions
diff --git a/src/libtracker-common/libtracker-common.vapi b/src/libtracker-common/libtracker-common.vapi
deleted file mode 100644
index 9e4298897..000000000
--- a/src/libtracker-common/libtracker-common.vapi
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2008-2009, Nokia
- *
- * 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.1 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 Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-[CCode (cprefix = "Tracker", gir_namespace = "Tracker",
- gir_version = "2.0", lower_case_cprefix = "tracker_")]
-namespace Tracker {
- [CCode (cheader_filename = "libtracker-common/tracker-date-time.h")]
- public double string_to_date (string date_string, out int offset) throws DateError;
-
- [CCode (cheader_filename = "libtracker-common/tracker-utils.h")]
- public string? util_build_dbus_uri (GLib.BusType bus_type, string service, string? path);
-
- [CCode (cheader_filename = "libtracker-common/tracker-date-time.h")]
- public errordomain DateError {
- OFFSET,
- INVALID_ISO8601
- }
-
- [CCode (cheader_filename = "libtracker-common/tracker-common.h")]
- public class ConfigFile : GLib.Object {
- [CCode (has_construct_function = false)]
- public ConfigFile ();
- [NoAccessorMethod]
- public string domain { get; construct; }
- public bool save ();
- public virtual signal void changed ();
- public GLib.File file;
- public GLib.FileMonitor monitor;
- public bool file_exists;
- public GLib.KeyFile key_file;
- }
-
- [CCode (cheader_filename = "libtracker-common/tracker-common.h")]
- public class KeyfileObject {
- public static string blurb (void *object, string property);
- public static bool default_boolean (void *object, string property);
- public static int default_int (void *object, string property);
- public static bool validate_int (void *object, string propery, int value);
- public static void load_int (void *object, string property, GLib.KeyFile key_file, string group, string key);
- public static void load_boolean (void *object, string property, GLib.KeyFile key_file, string group, string key);
- public static void load_string (void *object, string property, GLib.KeyFile key_file, string group, string key);
- public static void load_string_list (void *object, string property, GLib.KeyFile key_file, string group, string key, out GLib.SList return_instead);
- public static void load_directory_list (void *object, string property, GLib.KeyFile key_file, string group, string key, bool is_recursive, out GLib.SList return_instead);
- public static void save_int (void *object, string property, GLib.KeyFile key_file, string group, string key);
- public static void save_boolean (void *object, string property, GLib.KeyFile key_file, string group, string key);
- public static void save_string (void *object, string property, GLib.KeyFile key_file, string group, string key);
- public static void save_string_list (void *object, string property, GLib.KeyFile key_file, string group, string key);
- public static void save_directory_list (void *object, string property, GLib.KeyFile key_file, string group, string key);
- }
-
- [CCode (cheader_filename = "libtracker-common/tracker-locale.h")]
- namespace Locale {
- public void sanity_check ();
- }
-
- [Compact]
- [CCode (cheader_filename = "libtracker-common/tracker-common.h")]
- namespace IPC {
- public GLib.BusType bus ();
- }
-
- [Compact]
- [CCode (ref_function = "", unref_function = "", cheader_filename = "libtracker-common/tracker-common.h")]
- public class DBusRequest {
- public static DBusRequest begin (string? sender, string format,...);
- public void debug (string format,...);
- public void end (GLib.Error? e = null);
- [CCode (cname = "tracker_dbus_enable_client_lookup")]
- public static void enable_client_lookup (bool enable);
- }
-
- [CCode (ref_function = "tracker_domain_ontology_ref", unref_function = "tracker_domain_ontology_unref", cheader_filename = "libtracker-common/tracker-domain-ontology.h")]
- public class DomainOntology {
- public DomainOntology (string? name, GLib.Cancellable? cancellable) throws GLib.Error;
- public GLib.File get_cache ();
- public GLib.File? get_journal ();
- public GLib.File get_ontology ();
- public string get_domain (string? suffix = null);
- }
-
- [CCode (cheader_filename = "libtracker-common/tracker-common.h")]
- public void ioprio_init ();
-
- [CCode (cheader_filename = "libtracker-common/tracker-debug.h")]
- public uint get_debug_flags ();
-
- [CCode (cname = "g_message", cheader_filename = "glib.h")]
- [PrintfFormat]
- public void message (string format, ...);
- [CCode (cname = "g_warning", cheader_filename = "glib.h")]
- [PrintfFormat]
- public void warning (string format, ...);
- [CCode (cname = "g_critical", cheader_filename = "glib.h")]
- [PrintfFormat]
- public void critical (string format, ...);
- [CCode (cname = "g_error", cheader_filename = "glib.h")]
- [PrintfFormat]
- [NoReturn]
- public void error (string format, ...);
- [CCode (cname = "g_debug", cheader_filename = "glib.h")]
- [PrintfFormat]
- public void debug (string format, ...);
-}
-