summaryrefslogtreecommitdiff
path: root/src/libtracker-common/libtracker-common.vapi
blob: 90e019879b3c9f35b5a96c47b86560af3b38be63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
 * 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-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-common.h")]
	namespace Log {
		public bool init (int verbosity, out string used_filename);
		public void shutdown ();
	}

	[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 (cheader_filename = "libtracker-common/tracker-domain-ontology.h")]
	public class DomainOntology : GLib.Object, GLib.Initable {
		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 (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, ...);
}