[tracker/tracker-1.0] control: Add make target to generate vala-bindings from GIR



commit dbefbff22db60da69c8da22d0272d933efb4d5b3
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Aug 23 08:16:50 2014 +0200

    control: Add make target to generate vala-bindings from GIR

 src/libtracker-control/Makefile.am                 |    8 ++-
 src/libtracker-control/TrackerControl-1.0.metadata |    6 ++
 src/libtracker-control/tracker-control.vapi        |   58 ++++++++++----------
 3 files changed, 40 insertions(+), 32 deletions(-)
---
diff --git a/src/libtracker-control/Makefile.am b/src/libtracker-control/Makefile.am
index dcad29b..20c1179 100644
--- a/src/libtracker-control/Makefile.am
+++ b/src/libtracker-control/Makefile.am
@@ -71,11 +71,11 @@ INTROSPECTION_CFLAGS += $(AM_CPPFLAGS)
 introspection_sources = \
        $(libtracker_control_ TRACKER_API_VERSION@_la_SOURCES)
 
-TrackerControl- TRACKER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) $(lib_LTLIBRARIES) Makefile
+TrackerControl- TRACKER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) 
libtracker-control-$(TRACKER_API_VERSION).la Makefile
 TrackerControl_ TRACKER_API_VERSION_UNDERSCORES@_gir_INCLUDES = Gio-2.0
 TrackerControl_ TRACKER_API_VERSION_UNDERSCORES@_gir_CFLAGS = $(INCLUDES)
 TrackerControl_ TRACKER_API_VERSION_UNDERSCORES@_gir_NAMESPACE = "TrackerControl"
-TrackerControl_ TRACKER_API_VERSION_UNDERSCORES@_gir_LIBS = $(lib_LTLIBRARIES)
+TrackerControl_ TRACKER_API_VERSION_UNDERSCORES@_gir_LIBS = libtracker-control-$(TRACKER_API_VERSION).la
 TrackerControl_ TRACKER_API_VERSION_UNDERSCORES@_gir_FILES = $(introspection_sources)
 
 INTROSPECTION_GIRS += TrackerControl-$(TRACKER_API_VERSION).gir
@@ -87,4 +87,8 @@ typelibdir = $(libdir)/girepository-1.0
 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
 CLEANFILES += $(gir_DATA) $(typelib_DATA)
+
+build-vapi: TrackerControl-$(TRACKER_API_VERSION).gir
+       @vapigen --library tracker-control --metadatadir $(top_srcdir) --pkg gio-2.0 
TrackerControl-$(TRACKER_API_VERSION).gir
+
 endif
diff --git a/src/libtracker-control/TrackerControl-1.0.metadata 
b/src/libtracker-control/TrackerControl-1.0.metadata
new file mode 100644
index 0000000..7374e99
--- /dev/null
+++ b/src/libtracker-control/TrackerControl-1.0.metadata
@@ -0,0 +1,6 @@
+*.*.cancellable#parameter nullable default=null
+
+MinerManager
+       .miner_progress#virtual_method skip
+
+MinerManagerError errordomain
diff --git a/src/libtracker-control/tracker-control.vapi b/src/libtracker-control/tracker-control.vapi
index 9597bd1..9ab62dd 100644
--- a/src/libtracker-control/tracker-control.vapi
+++ b/src/libtracker-control/tracker-control.vapi
@@ -1,42 +1,40 @@
-/*
- * Copyright (C) 2014, Carlos Garnacho <carlosg gnome org>
- *
- * 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.
- */
+/* tracker-control.vapi generated by vapigen, do not modify. */
 
-[CCode (cprefix = "Tracker", lower_case_cprefix = "tracker_")]
+[CCode (cprefix = "Tracker", gir_namespace = "TrackerControl", gir_version = "1.0", lower_case_cprefix = 
"tracker_")]
 namespace Tracker {
-       [CCode (cheader_filename = "libtracker-control/tracker-control.h")]
+       [CCode (cheader_filename = "libtracker-control/tracker-control.h", type_id = 
"tracker_miner_manager_get_type ()")]
        public class MinerManager : GLib.Object, GLib.Initable {
                [CCode (has_construct_function = false)]
                public MinerManager ();
-               public unowned GLib.SList get_available ();
+               public static GLib.Quark error_quark ();
+               [CCode (has_construct_function = false)]
+               public MinerManager.full (bool auto_start) throws GLib.Error;
+               public GLib.SList<string>? get_available ();
                public unowned string get_description (string miner);
                public unowned string get_display_name (string miner);
-               public unowned GLib.SList get_running ();
-               public bool get_status (string miner, string status, double progress);
+               public GLib.SList<string>? get_running ();
+               public bool get_status (string miner, out string status, out double progress, out int 
remaining_time);
+               [Deprecated (since = "0.12")]
                public bool ignore_next_update (string miner, string urls);
+               public bool index_file (GLib.File file) throws GLib.Error;
+               public async bool index_file_async (GLib.File file, GLib.Cancellable? cancellable = null) 
throws GLib.Error;
                public bool is_active (string miner);
-               public bool is_paused (string miner, string[] applications, string[] reasons);
-               public bool pause (string miner, string reason, uint32 cookie);
+               public bool is_paused (string miner, [CCode (array_length = false, array_null_terminated = 
true)] out string[] applications, [CCode (array_length = false, array_null_terminated = true)] out string[] 
reasons);
+               public bool pause (string miner, string reason, out uint32 cookie);
+               public bool pause_for_process (string miner, string reason, out uint32 cookie);
+               public bool reindex_by_mimetype ([CCode (array_length = false, array_null_terminated = true)] 
string[] mimetypes) throws GLib.Error;
                public bool resume (string miner, uint32 cookie);
-               public virtual void miner_activated (string miner_name);
-               public virtual void miner_deactivated (string miner_name);
-               public virtual void miner_paused (string miner_name);
-               public virtual void miner_resumed (string miner_name);
-               public virtual void miner_progress (string miner_name, string status, double progress);
+               [NoAccessorMethod]
+               public bool auto_start { get; construct; }
+               public virtual signal void miner_activated (string miner_name);
+               public virtual signal void miner_deactivated (string miner_name);
+               public virtual signal void miner_paused (string miner_name);
+               public virtual signal void miner_progress (string miner_name, string status, double progress, 
int remaining_time);
+               public virtual signal void miner_resumed (string miner_name);
+       }
+       [CCode (cheader_filename = "libtracker-control/tracker-control.h", cprefix = 
"TRACKER_MINER_MANAGER_ERROR_")]
+       public errordomain MinerManagerError {
+               NOT_AVAILABLE,
+               NOENT
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]