Merge lp:~mhr3/libunity/tiny-fixes into lp:libunity

Proposed by Michal Hruby
Status: Superseded
Proposed branch: lp:~mhr3/libunity/tiny-fixes
Merge into: lp:libunity
Diff against target: 17199 lines (+10590/-3870) (has conflicts)
93 files modified
.bzrignore (+42/-56)
bindings/python/Makefile.am (+11/-6)
bindings/python/Unity.py (+92/-11)
bindings/python/scope-runner-dbus.py (+38/-0)
configure.ac (+46/-8)
data/Makefile.am (+5/-1)
data/client-scopes.json (+42/-0)
data/com.canonical.Unity.Lenses.gschema.xml.in.in (+20/-0)
debian/changelog (+79/-0)
debian/control (+11/-1)
debian/libunity9.symbols (+335/-229)
debian/rules (+9/-1)
debian/unity-scopes-runner.install (+1/-0)
doc/reference/Makefile.am (+1/-0)
extras/Makefile.am (+1/-1)
extras/unity-extra-preview-player-controller.vala (+0/-159)
extras/unity-extra-utils.vala (+4/-4)
po/POTFILES.in (+1/-1)
protocol/Makefile.am (+6/-3)
protocol/protocol-lens-interface.vala (+0/-107)
protocol/protocol-preview-player.vala (+126/-0)
protocol/protocol-previews.vala (+9/-12)
protocol/protocol-scope-discovery.vala (+477/-0)
protocol/protocol-scope-interface.vala (+96/-29)
protocol/unity-scope-proxy-remote.vala (+279/-198)
protocol/unity-scope-proxy.vala (+82/-20)
src/Makefile.am (+29/-19)
src/lttng-component-provider.h (+36/-0)
src/tp.c (+33/-0)
src/unity-aggregator-scope-private.vala (+2028/-0)
src/unity-aggregator-scope.vala (+161/-0)
src/unity-appinfo-manager.vala (+7/-5)
src/unity-category.vala (+5/-3)
src/unity-deprecated-scope-impl.vala (+739/-0)
src/unity-deprecated-scope.vala (+190/-0)
src/unity-filters.vala (+82/-17)
src/unity-io.vala (+10/-10)
src/unity-lens-private.vala (+0/-752)
src/unity-lens.vala (+0/-135)
src/unity-master-scope.vala (+154/-0)
src/unity-merge-strategy.vala (+6/-3)
src/unity-preferences-manager.vala (+20/-7)
src/unity-previews.vala (+32/-310)
src/unity-result-activation.vala (+17/-1)
src/unity-scope-channel.vala (+237/-0)
src/unity-scope-dbus-connector.vala (+154/-0)
src/unity-scope-dbus-impl.vala (+644/-489)
src/unity-scope-factory.vala (+0/-123)
src/unity-scope-interface.vala (+422/-0)
src/unity-scope-proxy-local.vala (+0/-139)
src/unity-scope.vala (+0/-237)
src/unity-search.vala (+244/-40)
src/unity-sound-menu-mpris.vala (+1/-1)
src/unity-synchronizer.vala (+205/-161)
src/unity-trace.c (+17/-0)
src/unity-trace.h (+21/-0)
src/unity-trace.vapi (+3/-0)
src/unity-utils.vala (+267/-0)
test/data/unity/scopes/masterscope_a.scope (+15/-0)
test/data/unity/scopes/masterscope_b.scope (+18/-0)
test/data/unity/scopes/masterscope_b/brokenscope.scope (+3/-0)
test/data/unity/scopes/masterscope_b/subscope1.scope (+13/-0)
test/data/unity/scopes/masterscope_b/subscope2.scope (+14/-0)
test/data/unity/scopes/test_masterscope.scope (+16/-0)
test/data/unity/scopes/test_masterscope/childscope_1.scope (+15/-0)
test/data/unity/scopes/test_masterscope/childscope_2.scope (+15/-0)
test/data/unity/scopes/test_masterscope/childscope_3.scope (+10/-0)
test/python/bug-1062331.py (+2/-4)
test/python/extras.py (+0/-1)
test/vala/Makefile.am (+14/-23)
test/vala/blacklist-crash-1029949-test-case.vala (+4/-9)
test/vala/common.vala (+48/-2)
test/vala/test-filters.vala (+39/-0)
test/vala/test-io.vala (+159/-11)
test/vala/test-preferences.vala (+16/-2)
test/vala/test-preview-player-iface.vala (+2/-1)
test/vala/test-previews.vala (+16/-54)
test/vala/test-remote-scope.vala (+2/-1)
test/vala/test-results-synchronizer.vala (+102/-0)
test/vala/test-scope-discovery.vala (+281/-0)
test/vala/test-scope-signals.vala (+10/-6)
test/vala/test-scope.vala (+1616/-0)
test/vala/test-utils.vala (+7/-4)
test/vala/test-vala.vala (+7/-0)
tools/Makefile.am (+1/-1)
tools/dbus-scope-connect.ui (+9/-9)
tools/preview-renderer.vala (+5/-6)
tools/unity-tool-dbus-util.vala (+7/-7)
tools/unity-tool-res.gresource.xml (+1/-1)
tools/unity-tool-ui.vala (+222/-181)
tools/unity-tool.ui (+53/-31)
tools/unity-tool.vala (+270/-217)
unity.pc.in (+1/-0)
Text conflict in data/client-scopes.json
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~mhr3/libunity/tiny-fixes
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Pending
Unity Team Pending
Review via email: mp+162975@code.launchpad.net

This proposal has been superseded by a proposal from 2013-05-08.

Commit message

Multiple small fixes.

Description of the change

Multiple small fixes.

To post a comment you must log in.
lp:~mhr3/libunity/tiny-fixes updated
381. By Michal Hruby

Add a const

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2012-06-08 08:53:07 +0000
3+++ .bzrignore 2013-05-08 13:19:27 +0000
4@@ -18,50 +18,47 @@
5 missing
6 py-compile
7 stamp-h1
8-unity.pc
9+*.pc
10+*.stamp
11+m4/intltool.m4
12+m4/libtool.m4
13+m4/ltoptions.m4
14+m4/ltsugar.m4
15+m4/ltversion.m4
16+m4/lt~obsolete.m4
17 bindings/Makefile
18 bindings/Makefile.in
19 bindings/python/Makefile
20 bindings/python/Makefile.in
21 data/Makefile
22 data/Makefile.in
23+data/com.canonical.Unity.Lenses.gschema.valid
24+data/com.canonical.Unity.Lenses.gschema.xml
25+data/com.canonical.Unity.Lenses.gschema.xml.in
26+data/gschemas.compiled
27 doc/Makefile
28 doc/Makefile.in
29 doc/reference/Makefile
30 doc/reference/Makefile.in
31+doc/reference/devhelp/
32+doc/reference/doctool/
33+doc/reference/gtkdoc/
34+doc/reference/valadoc/
35 examples/Makefile
36 examples/Makefile.in
37-src/.deps/
38-src/.libs/
39+extras/*.gir
40+extras/*.typelib
41+*/.deps/
42+*/.libs/
43 src/Makefile
44 src/Makefile.in
45-src/Unity-4.0.gir
46-src/Unity-4.0.typelib
47+src/*.gir
48+src/*.typelib
49 src/libunity.la
50-src/libunity_la-unity-appinfo-manager.lo
51-src/libunity_la-unity-inspector.lo
52-src/libunity_la-unity-io.lo
53-src/libunity_la-unity-launcher.lo
54-src/libunity_la-unity-lens-category.lo
55-src/libunity_la-unity-lens-filters.lo
56-src/libunity_la-unity-lens-private.lo
57-src/libunity_la-unity-lens.lo
58-src/libunity_la-unity-sound-menu-mpris.lo
59-src/libunity_la-unity-sound-menu.lo
60-src/libunity_la_vala.stamp
61-src/unity-appinfo-manager.c
62-src/unity-inspector.c
63-src/unity-io.c
64-src/unity-launcher.c
65-src/unity-lens-category.c
66-src/unity-lens-filters.c
67-src/unity-lens-private.c
68-src/unity-lens.c
69-src/unity-sound-menu-mpris.c
70-src/unity-sound-menu.c
71 src/unity.deps
72-src/unity.h
73-src/unity.vapi
74+po/Makefile.in.in
75+po/POTFILES
76+po/stamp-it
77 test/Makefile
78 test/Makefile.in
79 test/test
80@@ -71,43 +68,32 @@
81 test/vala/.libs/
82 test/vala/Makefile
83 test/vala/Makefile.in
84-test/vala/test-appinfo-manager.c
85-test/vala/test-filters.c
86-test/vala/test-io.c
87-test/vala/test-launcher.c
88-test/vala/test-launcher-integration.c
89 test/vala/test-lens
90-test/vala/test-lens.c
91 test/vala/test-mpris-backend
92 test/vala/test-mpris-backend-client
93-test/vala/test-mpris-backend-client.c
94 test/vala/test-mpris-backend-prop-updates
95 test/vala/test-mpris-backend-prop-updates-client
96-test/vala/test-mpris-backend-prop-updates-client.c
97 test/vala/test-mpris-backend-prop-updates-server
98-test/vala/test-mpris-backend-prop-updates-server.c
99 test/vala/test-mpris-backend-server
100-test/vala/test-mpris-backend-server.c
101-test/vala/test-previews.c
102 test/vala/test-remote-scope
103-test/vala/test-remote-scope.c
104-test/vala/test-scope-signals.c
105 test/vala/test-vala
106-test/vala/test-vala.c
107 test/vala/test-lens-scope-interactions
108 test/vala/test-sound-menu
109-test/vala/test_lens_vala.stamp
110-test/vala/test_mpris_backend_client_vala.stamp
111-test/vala/test_mpris_backend_prop_updates_client_vala.stamp
112-test/vala/test_mpris_backend_prop_updates_server_vala.stamp
113-test/vala/test_mpris_backend_server_vala.stamp
114-test/vala/test_remote_scope_vala.stamp
115-test/vala/test_sound_menu_vala.stamp
116-test/vala/test_vala_vala.stamp
117-src/*.lo
118+test/vala/test-blacklist-crash
119+test/vala/test-extras
120+test/vala/test-launcher-integration
121+test/vala/test-scope
122+tools/libunity-tool
123+*.la
124+*.lo
125+extras/*.c
126+extras/*.h
127+extras/*.vapi
128+protocol/*.c
129+protocol/*.h
130+protocol/*.vapi
131 src/*.c
132-test/test-scope
133-src/Unity-5.0.gir
134-src/Unity-5.0.typelib
135-test/vala/test-place-browser.c
136-test/vala/test-place.c
137+src/*.h
138+src/*.vapi
139+tools/*.c
140+test/vala/*.c
141
142=== modified file 'bindings/python/Makefile.am'
143--- bindings/python/Makefile.am 2011-02-17 15:38:06 +0000
144+++ bindings/python/Makefile.am 2013-05-08 13:19:27 +0000
145@@ -1,9 +1,14 @@
146-PLATFORM_VERSION = 2.0
147-
148-pkgpyexecdir = $(pyexecdir)/gi
149-
150-pygioverridesdir = $(pkgpyexecdir)/overrides
151+NULL =
152+
153+pygioverridesdir = $(PYGI_OVERRIDES_DIR)
154 pygioverrides_PYTHON = \
155 Unity.py
156
157-EXTRA_DIST = Unity.py
158+scopesdir = $(datadir)/unity-scopes
159+scopes_PYTHON = scope-runner-dbus.py
160+
161+EXTRA_DIST = \
162+ Unity.py \
163+ scope-runner-dbus.py \
164+ $(NULL)
165+
166
167=== modified file 'bindings/python/Unity.py'
168--- bindings/python/Unity.py 2011-02-17 15:38:06 +0000
169+++ bindings/python/Unity.py 2013-05-08 13:19:27 +0000
170@@ -1,17 +1,98 @@
171-from ..overrides import override
172-from ..importer import modules
173+from gi.overrides import override
174+from gi.importer import modules
175+import threading
176+import sys
177
178 Unity = modules['Unity']._introspection_module
179 from gi.repository import GLib
180
181 __all__ = []
182
183-#class Foo(Unity.Foo):
184-#
185-# def __init__(self):
186-# Unity.Foo.__init__(self)
187-#
188-#Foo = override(Foo)
189-#__all__.append('Foo')
190-
191-
192+class ScopeSearchBase(Unity.ScopeSearchBase):
193+
194+ def __init__(self):
195+ Unity.ScopeSearchBase.__init__(self)
196+
197+ def do_run_async(self, callback, callback_data=None):
198+ def thread_method():
199+ try:
200+ self.run()
201+ finally:
202+ callback(self)
203+
204+ t = threading.Thread(target=thread_method, name="python-search-thread")
205+ t.start()
206+
207+
208+class ResultPreviewer(Unity.ResultPreviewer):
209+
210+ def __init__(self):
211+ Unity.ResultPreviewer.__init__(self)
212+
213+ def do_run_async(self, callback, callback_data=None):
214+ def thread_method():
215+ preview = None
216+ try:
217+ preview = self.run()
218+ finally:
219+ callback(self, preview)
220+
221+ t = threading.Thread(target=thread_method, name="python-preview-thread")
222+ t.start()
223+
224+
225+class ResultSet(Unity.ResultSet):
226+
227+ def __init__ (self):
228+ Unity.ResultSet.__init__(self)
229+
230+ def add_result(self, *args, **kwargs):
231+ if len(args) > 0:
232+ Unity.ResultSet.add_result(self, *args)
233+ elif len(kwargs) > 0:
234+ uri = None
235+ icon = None
236+ category = 0
237+ result_type = 0
238+ mimetype = None
239+ title = None
240+ comment = None
241+ dnd_uri = None
242+ metadata = {}
243+
244+ for col_name, value in kwargs.items():
245+ if col_name == "uri": uri = value
246+ elif col_name == "icon": icon = value
247+ elif col_name == "category": category = value
248+ elif col_name == "result_type": result_type = value
249+ elif col_name == "mimetype": mimetype = value
250+ elif col_name == "title": title = value
251+ elif col_name == "comment": comment = value
252+ elif col_name == "dnd_uri": dnd_uri = value
253+ else:
254+ if isinstance(value, GLib.Variant):
255+ metadata[col_name] = value
256+ elif isinstance(value, str):
257+ metadata[col_name] = GLib.Variant("s", value)
258+ elif isinstance(value, int):
259+ metadata[col_name] = GLib.Variant("i", value)
260+ elif sys.version_info < (3, 0, 0):
261+ # unicode is not defined in py3
262+ if isinstance(value, unicode):
263+ metadata[col_name] = GLib.Variant("s", value)
264+
265+
266+ result = GLib.Variant("(ssuussssa{sv})", (uri, icon, category,
267+ result_type, mimetype,
268+ title, comment, dnd_uri,
269+ metadata))
270+
271+ Unity.ResultSet.add_result_from_variant(self, result)
272+
273+
274+ScopeSearchBase = override(ScopeSearchBase)
275+__all__.append('ScopeSearchBase')
276+ResultPreviewer = override(ResultPreviewer)
277+__all__.append('ResultPreviewer')
278+ResultSet = override(ResultSet)
279+__all__.append('ResultSet')
280
281=== added file 'bindings/python/scope-runner-dbus.py'
282--- bindings/python/scope-runner-dbus.py 1970-01-01 00:00:00 +0000
283+++ bindings/python/scope-runner-dbus.py 2013-05-08 13:19:27 +0000
284@@ -0,0 +1,38 @@
285+#!/usr/bin/python
286+
287+# Copyright (C) 2013 Canonical
288+#
289+# This program is free software; you can redistribute it and/or modify it under
290+# the terms of the GNU General Public License as published by the Free Software
291+# Foundation; version 3.
292+#
293+# This program is distributed in the hope that it will be useful, but WITHOUT
294+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
295+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
296+# details.
297+#
298+# You should have received a copy of the GNU General Public License along with
299+# this program; if not, write to the Free Software Foundation, Inc.,
300+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
301+
302+import sys
303+import os
304+import imp
305+from gi.repository import Unity
306+from gi.repository import GLib
307+
308+def main(args):
309+ GLib.threads_init()
310+ scope_path = args[1]
311+ scope_module = imp.load_source('scope', scope_path)
312+ scope = scope_module.load_scope()
313+ connector = Unity.ScopeDBusConnector.new(scope)
314+ connector.export()
315+ # add manual handling for SIGTERM, since we don't use GLib.MainLoop
316+ # from python it wouldn't be handled properly
317+ GLib.unix_signal_add_full(0, 2, lambda x: Unity.ScopeDBusConnector.quit(), None)
318+ Unity.ScopeDBusConnector.run()
319+
320+if __name__ == "__main__":
321+ main (sys.argv)
322+
323
324=== modified file 'configure.ac'
325--- configure.ac 2012-12-07 10:54:09 +0000
326+++ configure.ac 2013-05-08 13:19:27 +0000
327@@ -1,5 +1,5 @@
328 # When releasing also remember to update the soname as instructed below
329-AC_INIT(libunity, 6.90.2)
330+AC_INIT(libunity, 6.91.13)
331
332 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
333 AM_CONFIG_HEADER(config.h)
334@@ -68,6 +68,24 @@
335 ###################################################################
336 AM_PATH_PYTHON
337
338+AC_ARG_WITH([pygi_overrides_dir],
339+ AC_HELP_STRING([--with-pygi-overrides-dir], [Path to pygobject overrides directory]))
340+
341+AC_MSG_CHECKING(for pygobject overrides directory)
342+if test "x$with_pygi_overrides_dir" = "x" ; then
343+ overrides_dir="`$PYTHON -c 'import gi; print(gi._overridesdir)' 2>/dev/null`"
344+ # fallback if the previous failed
345+ if test "x$overrides_dir" = "x" ; then
346+ overrides_dir="${pyexecdir}/gi/overrides"
347+ fi
348+else
349+ overrides_dir="$with_pygi_overrides_dir"
350+fi
351+
352+PYGI_OVERRIDES_DIR="$overrides_dir"
353+AC_SUBST(PYGI_OVERRIDES_DIR)
354+AC_MSG_RESULT($PYGI_OVERRIDES_DIR)
355+
356 ####################################################################
357 # Compiler generate debug code
358 ####################################################################
359@@ -96,14 +114,26 @@
360 AM_CONDITIONAL(ENABLE_INTEGRATION_TESTS, test "$enable_integration_tests" = "yes")
361
362 ####################################################################
363-# Trace logging
364+# Trace logging and LTTNG instrumentation
365 ####################################################################
366+AC_ARG_ENABLE([lttng],
367+ AC_HELP_STRING([--enable-lttng=@<:@no/yes@:>@], [compile with lttng trace statements (implies trace-log=yes) @<:@default=no@:>@]),,
368+ [enable_lttng=no])
369+
370+AM_CONDITIONAL(ENABLE_LTTNG, test "$enable_lttng" = "yes")
371+
372 AC_ARG_ENABLE([trace-log],
373 AC_HELP_STRING([--enable-trace-log=@<:@no/yes@:>@], [compile with trace logging statements @<:@default=no@:>@]),,
374 [enable_trace_log=no])
375
376+# if LTTNG is enabled, enable trace-log automatically
377+if test "x$enable_lttng" = "xyes"; then
378+ enable_trace_log="yes"
379+ AC_DEFINE(ENABLE_LTTNG, 1, [enable lttng])
380+fi
381+
382 if test "x$enable_trace_log" = "xyes"; then
383- AC_DEFINE(ENABLE_TRACE_LOG, 1, [enable trace logging])
384+ AC_DEFINE(ENABLE_TRACE_LOG, 1, [enable trace logging])
385 fi
386
387 AM_CONDITIONAL(ENABLE_TRACE_LOG, test "$enable_trace_log" = "yes")
388@@ -135,6 +165,8 @@
389 # Gettext
390 #############################################
391 IT_PROG_INTLTOOL([0.40.0])
392+GETTEXT_PACKAGE="$PACKAGE"
393+AC_SUBST(GETTEXT_PACKAGE)
394
395 #################################################
396 # Docs
397@@ -192,19 +224,24 @@
398 ####################################################################
399 # Check library deps
400 ####################################################################
401-GLIB_REQUIRED=2.26
402+GLIB_REQUIRED=2.32
403 PKG_CHECK_MODULES(GLIB2, [glib-2.0 >= $GLIB_REQUIRED ])
404 PKG_CHECK_MODULES(GOBJECT2, [gobject-2.0 >= $GLIB_REQUIRED ])
405 PKG_CHECK_MODULES(GIO2, [gio-2.0 >= $GLIB_REQUIRED ])
406 PKG_CHECK_MODULES(GIO_UNIX2, [gio-unix-2.0])
407 PKG_CHECK_MODULES(GEE, [gee-1.0 >= 0.6.0])
408-PKG_CHECK_MODULES(DEE, [dee-1.0 >= 1.0.4])
409+PKG_CHECK_MODULES(DEE, [dee-1.0 >= 1.2.5])
410 PKG_CHECK_MODULES(DBUSMENU, [dbusmenu-glib-0.4 >= 0.3.93])
411 PKG_CHECK_MODULES(GTK3, [gtk+-3.0 >= 3.4.1])
412 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.32.1])
413-
414-LIBUNITY_CFLAGS="$GLIB2_CFLAGS $GOBJECT2_CFLAGS $GIO2_CFLAGS $GIO_UNIX2_CFLAGS $GEE_CFLAGS $DEE_CFLAGS $DBUSMENU_CFLAGS"
415-LIBUNITY_LIBS="$GLIB2_LIBS $GOBJECT2_LIBS $GIO2_LIBS $GIO_UNIX2_LIBS $GEE_LIBS $DEE_LIBS $DBUSMENU_LIBS"
416+PKG_CHECK_MODULES(LTTNG, [lttng-ust], HAVE_LTTNG="yes", HAVE_LTTNG="no")
417+
418+AS_IF([test "x$enable_lttng" != "xno"], [
419+ AS_IF([test "x$HAVE_LTTNG" != "xyes"], AC_MSG_ERROR([LTTNG is missing]))
420+])
421+
422+LIBUNITY_CFLAGS="$GLIB2_CFLAGS $GOBJECT2_CFLAGS $GIO2_CFLAGS $GIO_UNIX2_CFLAGS $GEE_CFLAGS $DEE_CFLAGS $DBUSMENU_CFLAGS $LTTNG_CFLAGS"
423+LIBUNITY_LIBS="$GLIB2_LIBS $GOBJECT2_LIBS $GIO2_LIBS $GIO_UNIX2_LIBS $GEE_LIBS $DEE_LIBS $DBUSMENU_LIBS $LTTNG_LIBS"
424 LIBUNITY_PACKAGES="--pkg glib-2.0 --pkg gobject-2.0 --pkg gio-2.0 --pkg gio-unix-2.0 --pkg gee-1.0 --pkg dee-1.0 --pkg Dbusmenu-0.4"
425 AC_SUBST(LIBUNITY_CFLAGS)
426 AC_SUBST(LIBUNITY_LIBS)
427@@ -271,6 +308,7 @@
428 Documentation : ${enable_docs}
429 C warnings : ${enable_c_warnings}
430 Trace logging : ${enable_trace_log}
431+ LTTNG tracepoints : ${enable_lttng}
432
433 Testing
434 Integration tests : ${enable_integration_tests}
435
436=== modified file 'data/Makefile.am'
437--- data/Makefile.am 2013-03-01 08:16:49 +0000
438+++ data/Makefile.am 2013-05-08 13:19:27 +0000
439@@ -1,3 +1,5 @@
440+NULL=
441+
442 #############################################################
443 # GSettings schemas
444 #############################################################
445@@ -10,7 +12,9 @@
446 @INTLTOOL_XML_NOMERGE_RULE@
447
448 EXTRA_DIST = \
449- com.canonical.Unity.Lenses.gschema.xml.in.in
450+ client-scopes.json \
451+ com.canonical.Unity.Lenses.gschema.xml.in.in \
452+ $(NULL)
453
454 jsonscopedir = $(PKGDATADIR)
455 jsonscope_DATA = client-scopes.json
456
457=== modified file 'data/client-scopes.json'
458--- data/client-scopes.json 2013-04-02 15:04:10 +0000
459+++ data/client-scopes.json 2013-05-08 13:19:27 +0000
460@@ -1,3 +1,4 @@
461+<<<<<<< TREE
462 {"unity-lens-applications": ["scope1", "scope2"],
463 "unity-lens-files": [],
464 "unity-lens-friends": [],
465@@ -5,4 +6,45 @@
466 "unity-lens-photos": [],
467 "unity-lens-shopping": [],
468 "unity-lens-video": []
469+=======
470+{"unity-lens-applications": ["applications.scope", "commands.scope"],
471+ "unity-lens-files": ["files-local.scope"],
472+ "unity-lens-friends": ["social.scope"],
473+ "unity-lens-music": ["music-banshee.scope", "music-rhythmbox.scope"],
474+ "unity-lens-photos": ["photos-shotwell.scope", "photos-facebook.scope", "photos-flickr.scope", "photos-picasa.scope"],
475+ "unity-lens-video": ["video-local.scope"],
476+ "unity-scope-gdrive": ["files-gdrive.scope"],
477+ "unity-scope-musicstores": ["music-musicstore.scope"],
478+ "unity-scope-video-remote": ["video-remote.scope"],
479+ "unity-scope-audacious": ["music-audacious.scope"],
480+ "unity-scope-calculator": ["info-calculator.scope"],
481+ "unity-scope-chromiumbookmarks": ["web-chromiumbookmarks.scope"],
482+ "unity-scope-clementine": ["music-clementine.scope"],
483+ "unity-scope-colourlovers": ["graphics-colourlovers.scope"],
484+ "unity-scope-devhelp": ["code-devhelp.scope"],
485+ "unity-scope-deviantart": ["graphics-deviantart.scope"],
486+ "unity-scope-evolution": ["calendar-evolution.scope"],
487+ "unity-scope-firefoxbookmarks": ["web-firefoxbookmarks.scope"],
488+ "unity-scope-gallica": ["books-gallica.scope"],
489+ "unity-scope-github": ["code-github.scope"],
490+ "unity-scope-gmusicbrowser": ["music-gmusicbrowser.scope"],
491+ "unity-scope-googlenews": ["news-googlenews.scope"],
492+ "unity-scope-gourmet": ["recipes-gourmet.scope"],
493+ "unity-scope-guayadeque": ["music-guayadeque.scope"],
494+ "unity-scope-home": ["home.scope", "books.scope", "boxes.scope", "calendar.scope", "code.scope", "files.scope", "graphics.scope", "help.scope", "info.scope", "more_suggestions.scope", "music.scope", "news.scope", "notes.scope", "photos.scope", "recipes.scope", "reference.scope", "video.scope", "web.scope"],
495+ "unity-scope-imdb": ["reference-imdb.scope"],
496+ "unity-scope-launchpad": ["code-launchpad.scope"],
497+ "unity-scope-manpages": ["help-manpages.scope"],
498+ "unity-scope-musique": ["music-musique.scope"],
499+ "unity-scope-openclipart": ["graphics-openclipart.scope"],
500+ "unity-scope-openweathermap": ["info-openweathermap.scope"],
501+ "unity-scope-soundcloud": ["music-soundcloud.scope"],
502+ "unity-scope-sshsearch": ["boxes-sshsearch.scope"],
503+ "unity-scope-texdoc": ["help-texdoc.scope"],
504+ "unity-scope-tomboy": ["notes-tomboy.scope"],
505+ "unity-scope-virtualbox": ["boxes-virtualbox.scope"],
506+ "unity-scope-yahoostock": ["news-yahoostock.scope"],
507+ "unity-scope-yelp": ["help-yelp.scope"],
508+ "unity-scope-zotero": ["reference-zotero.scope"]
509+>>>>>>> MERGE-SOURCE
510 }
511
512=== modified file 'data/com.canonical.Unity.Lenses.gschema.xml.in.in'
513--- data/com.canonical.Unity.Lenses.gschema.xml.in.in 2012-09-25 15:10:07 +0000
514+++ data/com.canonical.Unity.Lenses.gschema.xml.in.in 2013-05-08 13:19:27 +0000
515@@ -6,5 +6,25 @@
516 <summary>Content fetching from remote source preference.</summary>
517 <description>"all" is to enable the supported default lens to search from remote and commercial sources. "none" will indicate the lenses to not perform that remote search at all.</description>
518 </key>
519+ <key type="as" name="always-search">
520+ <default>['applications.scope','music.scope','videos.scope','files.scope']</default>
521+ <summary>Scopes that will always be searched from Home Lens.</summary>
522+ <description>List of scope IDs that will always be running and searched by Unity Dash - Home Lens.</description>
523+ </key>
524+ <key type="as" name="disabled-scopes">
525+ <default>[]</default>
526+ <summary>Scopes that will be ignored during queries.</summary>
527+ <description>List of scope IDs that will be ignored when master scopes are querying their subscopes.</description>
528+ </key>
529+ <key type="as" name="home-lens-priority">
530+ <default>['applications.scope', 'files.scope', 'music.scope' ]</default>
531+ <summary>List of scope ids specifying how categories should be ordered in the Dash home screen.</summary>
532+ <description>The ordering of categories listed on the Dash home screen will be influenced by this list.</description>
533+ </key>
534+ <key type="as" name="home-lens-default-view">
535+ <default>['applications.scope', 'files.scope']</default>
536+ <summary>Scopes in default Dash Home Lens view, when there is no search query entered.</summary>
537+ <description>List of scopes IDs which will be queried in the default view of Home Lens.</description>
538+ </key>
539 </schema>
540 </schemalist>
541
542=== modified file 'debian/changelog'
543--- debian/changelog 2013-05-01 21:58:06 +0000
544+++ debian/changelog 2013-05-08 13:19:27 +0000
545@@ -1,3 +1,4 @@
546+<<<<<<< TREE
547 libunity (6.90.2daily13.05.01.1ubuntu.unity.next-0ubuntu1) raring; urgency=low
548
549 * Automatic snapshot from revision 216 (ubuntu-unity/next)
550@@ -17,6 +18,84 @@
551
552 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 05 Apr 2013 04:02:08 +0000
553
554+=======
555+libunity (6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified-0ubuntu1) raring; urgency=low
556+
557+ [ Pawel Stolowski ]
558+ * New activation API.
559+ * Changes to internal APIs.
560+
561+ [ Ubuntu daily release ]
562+ * debian/*symbols: auto-update new symbols to released version
563+
564+ [ Michal Hruby ]
565+ * De-selecting some of the ‘Categories’ filters does not update the
566+ search results (LP: #1174458)
567+
568+ [ Pawel Stolowski ]
569+ * Incorrect scope files/ids of some of the default scopes (LP:
570+ #1171567)
571+ * Left and Right clicking on “More Suggestions” should open a preview
572+ (LP: #1170712)
573+
574+ [ Chris Townsend ]
575+ * dash translations are incomplete (likely a code bug, regression from
576+ new scopes version) (LP: #1158779)
577+
578+ [ Chris Townsend <christopher.townsend@canonical.com>, Chris Townsend ]
579+ * dash translations are incomplete (likely a code bug, regression from
580+ new scopes version) (LP: #1158779)
581+
582+ [ Ubuntu daily release ]
583+ * Automatic snapshot from revision 376 (ubuntu-unity/experimental-
584+ certified)
585+
586+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 07 May 2013 07:26:03 +0000
587+
588+libunity (6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified-0ubuntu1) raring; urgency=low
589+
590+ [ Michal Hruby ]
591+ * Add new API
592+
593+ [ Ubuntu daily release ]
594+ * debian/*symbols: auto-update new symbols to released version
595+
596+ [ Michal Hruby ]
597+ * Previews for majority of the 100 scopes don't work (LP: #1160876)
598+
599+ [ Ubuntu daily release ]
600+ * Automatic snapshot from revision 363 (ubuntu-unity/experimental-
601+ certified)
602+
603+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 23 Apr 2013 07:12:00 +0000
604+
605+libunity (6.91.9daily13.04.10ubuntu.unity.experimental.certified-0ubuntu1) raring; urgency=low
606+
607+ [ Didier Roche ]
608+ * debian/control:
609+ - bump dee build-dep
610+ - add unity-scopes-runner packages
611+ * debian/control, rules:
612+ - add python3 gir overrides
613+
614+ [ Sebastien Bacher ]
615+ * debian/libunity9.symbols:
616+ - updated for the new version. The abi/api changed but only in
617+ the parts concerning scope/lenses, which are considered semi-private,
618+ we don't update the soname but will update lenses in locked steps
619+
620+ [ Michal Hruby ]
621+ * debian/libunity9.symbols:
622+ - updated because of new symbols.
623+
624+ [ Ubuntu daily release ]
625+ * debian/*symbols: auto-update new symbols to released version
626+ * Automatic snapshot from revision 355 (ubuntu-unity/experimental-
627+ certified)
628+
629+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 10 Apr 2013 07:38:47 +0000
630+
631+>>>>>>> MERGE-SOURCE
632 libunity (6.90.2daily13.03.06.1-0ubuntu1) raring; urgency=low
633
634 [ Didier Roche ]
635
636=== modified file 'debian/control'
637--- debian/control 2013-03-05 10:57:33 +0000
638+++ debian/control 2013-05-08 13:19:27 +0000
639@@ -12,12 +12,14 @@
640 valac-0.18 (>= 0.16.0),
641 libglib2.0-dev (>= 2.32.1),
642 libgee-dev (>= 0.6.0),
643- libdee-dev (>= 0.9),
644+ libdee-dev (>= 1.2.5~),
645 libdbusmenu-glib-dev (>= 0.4.90),
646 libgirepository1.0-dev (>= 0.10),
647 libgtk-3-dev (>= 3.4.1),
648 python,
649+ python3,
650 python-gi,
651+ python3-gi,
652 gobject-introspection,
653 gir1.2-glib-2.0,
654 gir1.2-dbusmenu-glib-0.4 (>= 0.4.90),
655@@ -71,6 +73,14 @@
656 .
657 This package contains common files for scopes.
658
659+Package: unity-scopes-runner
660+Architecture: all
661+Depends: ${shlibs:Depends},
662+ ${misc:Depends},
663+Description: desktop runner for misceallenous scopes
664+ The scope runner is a handy tool for wrapping on a desktop the various
665+ scoped installed on the system.
666+
667 Package: libunity-dev
668 Section: libdevel
669 Architecture: any
670
671=== modified file 'debian/libunity9.symbols'
672--- debian/libunity9.symbols 2013-01-11 04:01:53 +0000
673+++ debian/libunity9.symbols 2013-05-08 13:19:27 +0000
674@@ -9,11 +9,6 @@
675 unity_extras_preview_player_close@Base 6.10.0-0ubuntu2
676 unity_extras_preview_player_close_finish@Base 6.10.0-0ubuntu2
677 unity_extras_preview_player_construct@Base 6.10.0-0ubuntu2
678- unity_extras_preview_player_controller_construct@Base 6.10.0-0ubuntu2
679- unity_extras_preview_player_controller_get_active_preview@Base 6.10.0-0ubuntu2
680- unity_extras_preview_player_controller_get_type@Base 6.10.0-0ubuntu2
681- unity_extras_preview_player_controller_new@Base 6.10.0-0ubuntu2
682- unity_extras_preview_player_controller_set_active_preview@Base 6.10.0-0ubuntu2
683 unity_extras_preview_player_get_type@Base 6.10.0-0ubuntu2
684 unity_extras_preview_player_new@Base 6.10.0-0ubuntu2
685 unity_extras_preview_player_on_progress_signal@Base 6.10.0-0ubuntu2
686@@ -49,6 +44,21 @@
687 unity_extras_show_in_folder@Base 6.10.0-0ubuntu2
688 unity_extras_show_in_folder_finish@Base 6.10.0-0ubuntu2
689 libunity.so.9 libunity9 #MINVER#
690+ unity_abstract_preview_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
691+ unity_abstract_preview_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
692+ unity_abstract_preview_serialize_as@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
693+ unity_abstract_scope_activate@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
694+ unity_abstract_scope_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
695+ unity_abstract_scope_create_previewer@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
696+ unity_abstract_scope_create_search_for_query@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
697+ unity_abstract_scope_get_categories@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
698+ unity_abstract_scope_get_filters@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
699+ unity_abstract_scope_get_group_name@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
700+ unity_abstract_scope_get_schema@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
701+ unity_abstract_scope_get_search_hint@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
702+ unity_abstract_scope_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
703+ unity_abstract_scope_get_unique_name@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
704+ unity_abstract_scope_normalize_search_query@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
705 unity_activation_response_construct@Base 4.0.0
706 unity_activation_response_construct_with_preview@Base 5.90.0
707 unity_activation_response_get_goto_uri@Base 4.0.0
708@@ -65,6 +75,47 @@
709 unity_active_playlist_container_dup@Base 4.0.0
710 unity_active_playlist_container_free@Base 4.0.0
711 unity_active_playlist_container_get_type@Base 4.0.0
712+ unity_aggregated_scope_search_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
713+ unity_aggregated_scope_search_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
714+ unity_aggregated_scope_search_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
715+ unity_aggregated_scope_search_push_filter_settings@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
716+ unity_aggregated_scope_search_push_results@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
717+ unity_aggregated_scope_search_push_results_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
718+ unity_aggregated_scope_search_search_scope@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
719+ unity_aggregated_scope_search_search_scope_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
720+ unity_aggregator_activation_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
721+ unity_aggregator_activation_get_action_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
722+ unity_aggregator_activation_get_channel_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
723+ unity_aggregator_activation_get_scope_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
724+ unity_aggregator_activation_get_scope_result@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
725+ unity_aggregator_activation_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
726+ unity_aggregator_activation_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
727+ unity_aggregator_activation_set_action_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
728+ unity_aggregator_activation_set_channel_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
729+ unity_aggregator_activation_set_scope_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
730+ unity_aggregator_activation_set_scope_result@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
731+ unity_aggregator_scope_activate@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
732+ unity_aggregator_scope_activate_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
733+ unity_aggregator_scope_add_constraint@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
734+ unity_aggregator_scope_add_sorter@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
735+ unity_aggregator_scope_category_index_for_scope_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
736+ unity_aggregator_scope_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
737+ unity_aggregator_scope_get_automatic_flushing@Base 6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified
738+ unity_aggregator_scope_get_merge_mode@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
739+ unity_aggregator_scope_get_proxy_filter_hints@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
740+ unity_aggregator_scope_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
741+ unity_aggregator_scope_merge_mode_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
742+ unity_aggregator_scope_push_filter_settings@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
743+ unity_aggregator_scope_push_results@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
744+ unity_aggregator_scope_push_results_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
745+ unity_aggregator_scope_search@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
746+ unity_aggregator_scope_search_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
747+ unity_aggregator_scope_search_scope@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
748+ unity_aggregator_scope_search_scope_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
749+ unity_aggregator_scope_set_automatic_flushing@Base 6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified
750+ unity_aggregator_scope_set_merge_mode@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
751+ unity_aggregator_scope_set_proxy_filter_hints@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
752+ unity_aggregator_scope_sort_flags_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
753 unity_annotated_icon_construct@Base 5.94.0
754 unity_annotated_icon_get_category@Base 5.94.0
755 unity_annotated_icon_get_icon@Base 5.94.0
756@@ -99,30 +150,31 @@
757 unity_application_preview_set_last_update@Base 5.90.0
758 unity_application_preview_set_license@Base 5.90.0
759 unity_application_preview_set_rating@Base 5.90.0
760- unity_async_preview_construct@Base 5.90.0
761- unity_async_preview_construct_with_cancellable@Base 5.96.0
762- unity_async_preview_get_cancellable@Base 5.90.0
763- unity_async_preview_get_type@Base 5.90.0
764- unity_async_preview_new@Base 5.90.0
765- unity_async_preview_new_with_cancellable@Base 5.96.0
766- unity_async_preview_preview_ready@Base 6.10.0-0ubuntu2
767- unity_async_preview_set_cancellable@Base 5.96.0
768- unity_async_preview_wait_for_signal@Base 5.96.0
769- unity_async_preview_wait_for_signal_finish@Base 5.96.0
770 unity_blacklist_manager_check_presence@Base 4.0.0
771 unity_blacklist_manager_construct@Base 4.0.0
772 unity_blacklist_manager_get_type@Base 4.0.0
773 unity_blacklist_manager_new@Base 4.0.0
774+ unity_cancellable_cancel@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
775+ unity_cancellable_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
776+ unity_cancellable_create@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
777+ unity_cancellable_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
778+ unity_cancellable_is_cancelled@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
779 unity_category_construct@Base 4.0.0
780 unity_category_get_default_renderer@Base 4.0.0
781 unity_category_get_hints@Base 4.0.0
782 unity_category_get_icon_hint@Base 4.0.0
783+ unity_category_get_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
784 unity_category_get_name@Base 4.0.0
785 unity_category_get_renderer@Base 4.0.0
786 unity_category_get_type@Base 4.0.0
787 unity_category_new@Base 4.0.0
788 unity_category_renderer_get_type@Base 4.0.0
789+ unity_category_set_add@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
790+ unity_category_set_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
791+ unity_category_set_get_categories@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
792+ unity_category_set_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
793 unity_category_set_hints@Base 4.0.0
794+ unity_category_set_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
795 unity_category_type_get_type@Base 5.94.0
796 unity_check_option_filter_compact_construct@Base 5.2.0
797 unity_check_option_filter_compact_get_type@Base 5.2.0
798@@ -131,8 +183,65 @@
799 unity_check_option_filter_get_type@Base 4.0.0
800 unity_check_option_filter_new@Base 4.0.0
801 unity_collect_launcher_entry_properties@Base 3.4.6
802- unity_filter_column_get_type@Base 4.0.0
803+ unity_dee_result_set_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
804+ unity_dee_result_set_construct_with_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
805+ unity_dee_result_set_get_flush_model@Base 6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified
806+ unity_dee_result_set_get_results_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
807+ unity_dee_result_set_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
808+ unity_dee_result_set_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
809+ unity_dee_result_set_new_with_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
810+ unity_dee_result_set_set_flush_model@Base 6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified
811+ unity_dee_result_set_set_results_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
812+ unity_deprecated_scope_activate_result@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
813+ unity_deprecated_scope_activate_result_finish@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
814+ unity_deprecated_scope_base_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
815+ unity_deprecated_scope_base_create_impl@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
816+ unity_deprecated_scope_base_export@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
817+ unity_deprecated_scope_base_get_categories@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
818+ unity_deprecated_scope_base_get_dbus_path@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
819+ unity_deprecated_scope_base_get_filters@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
820+ unity_deprecated_scope_base_get_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
821+ unity_deprecated_scope_base_get_impl@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
822+ unity_deprecated_scope_base_get_is_master@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
823+ unity_deprecated_scope_base_get_schema@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
824+ unity_deprecated_scope_base_get_search_hint@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
825+ unity_deprecated_scope_base_get_search_in_global@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
826+ unity_deprecated_scope_base_get_sources@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
827+ unity_deprecated_scope_base_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
828+ unity_deprecated_scope_base_get_visible@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
829+ unity_deprecated_scope_base_handle_search@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
830+ unity_deprecated_scope_base_handle_search_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
831+ unity_deprecated_scope_base_set_active_sources_internal@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
832+ unity_deprecated_scope_base_set_categories@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
833+ unity_deprecated_scope_base_set_filters@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
834+ unity_deprecated_scope_base_set_schema@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
835+ unity_deprecated_scope_base_set_search_hint@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
836+ unity_deprecated_scope_base_set_search_in_global@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
837+ unity_deprecated_scope_base_set_sources@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
838+ unity_deprecated_scope_base_set_view_type_internal@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
839+ unity_deprecated_scope_base_set_visible@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
840+ unity_deprecated_scope_base_unexport@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
841+ unity_deprecated_scope_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
842+ unity_deprecated_scope_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
843+ unity_deprecated_scope_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
844+ unity_deprecated_scope_preview_result@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
845+ unity_deprecated_scope_preview_result_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
846+ unity_deprecated_scope_queue_search_changed@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
847+ unity_deprecated_scope_search_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
848+ unity_deprecated_scope_search_equals@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
849+ unity_deprecated_scope_search_get_channel_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
850+ unity_deprecated_scope_search_get_filter@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
851+ unity_deprecated_scope_search_get_hints@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
852+ unity_deprecated_scope_search_get_owner@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
853+ unity_deprecated_scope_search_get_reply_hints@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
854+ unity_deprecated_scope_search_get_results_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
855+ unity_deprecated_scope_search_get_search_string@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
856+ unity_deprecated_scope_search_get_search_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
857+ unity_deprecated_scope_search_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
858+ unity_deprecated_scope_search_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
859+ unity_deprecated_scope_search_set_reply_hint@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
860 unity_filter_construct@Base 4.0.0
861+ unity_filter_for_filter_model_row@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
862 unity_filter_get_collapsed@Base 4.0.0
863 unity_filter_get_display_name@Base 4.0.0
864 unity_filter_get_filtering@Base 4.0.0
865@@ -153,17 +262,18 @@
866 unity_filter_option_set_active@Base 4.0.0
867 unity_filter_renderer_for_name@Base 5.0.0
868 unity_filter_renderer_get_type@Base 5.0.0
869+ unity_filter_set_add@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
870+ unity_filter_set_collapsed@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
871+ unity_filter_set_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
872 unity_filter_set_display_name@Base 5.0.0
873 unity_filter_set_filtering@Base 4.0.0
874+ unity_filter_set_get_filter_by_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
875+ unity_filter_set_get_filters@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
876+ unity_filter_set_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
877 unity_filter_set_model_and_iter@Base 4.0.0
878+ unity_filter_set_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
879 unity_filter_set_visible@Base 4.0.0
880 unity_filter_update@Base 4.0.0
881- unity_filters_synchronizer_add_receiver@Base 4.0.0
882- unity_filters_synchronizer_construct@Base 4.0.0
883- unity_filters_synchronizer_get_provider@Base 4.0.0
884- unity_filters_synchronizer_get_type@Base 4.0.0
885- unity_filters_synchronizer_new@Base 4.0.0
886- unity_filters_synchronizer_remove_receiver@Base 5.12.0
887 unity_generic_preview_construct@Base 4.0.0
888 unity_generic_preview_empty@Base 5.96.0
889 unity_generic_preview_get_type@Base 4.0.0
890@@ -183,15 +293,137 @@
891 unity_inspector_get_type@Base 3.4.6
892 unity_inspector_get_unity_bus_name@Base 3.4.6
893 unity_inspector_get_unity_running@Base 3.4.6
894- unity_io_get_system_data_dirs@Base 3.4.6
895- unity_io_open_from_data_dirs@Base 3.4.6
896- unity_io_open_from_data_dirs_finish@Base 3.4.6
897- unity_io_open_from_dirs@Base 3.4.6
898- unity_io_open_from_dirs_finish@Base 3.4.6
899- unity_io_read_stream_async@Base 3.4.6
900- unity_io_read_stream_finish@Base 3.4.6
901- unity_io_system_data_dirs@Base 3.4.6
902- unity_io_system_data_dirs_length1@Base 3.4.6
903+ unity_internal_aggregator_scope_impl_add_constraint@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
904+ unity_internal_aggregator_scope_impl_add_sorter@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
905+ unity_internal_aggregator_scope_impl_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
906+ unity_internal_aggregator_scope_impl_get_merge_strategy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
907+ unity_internal_aggregator_scope_impl_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
908+ unity_internal_aggregator_scope_impl_get_view_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
909+ unity_internal_aggregator_scope_impl_invalidate_search@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
910+ unity_internal_aggregator_scope_impl_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
911+ unity_internal_aggregator_scope_impl_push_filter_settings@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
912+ unity_internal_aggregator_scope_impl_push_results_to_scope@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
913+ unity_internal_aggregator_scope_impl_push_results_to_scope_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
914+ unity_internal_aggregator_scope_impl_search_scope@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
915+ unity_internal_aggregator_scope_impl_search_scope_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
916+ unity_internal_aggregator_scope_impl_set_active_sources@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
917+ unity_internal_aggregator_scope_impl_set_active_sources_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
918+ unity_internal_aggregator_scope_impl_set_merge_strategy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
919+ unity_internal_aggregator_scope_impl_set_view_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
920+ unity_internal_aggregator_scope_impl_subscope_ids@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
921+ unity_internal_category_column_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
922+ unity_internal_channel_state_get_type@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
923+ unity_internal_default_scope_dbus_impl_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
924+ unity_internal_default_scope_dbus_impl_get_timeout@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
925+ unity_internal_default_scope_dbus_impl_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
926+ unity_internal_default_scope_dbus_impl_get_view_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
927+ unity_internal_default_scope_dbus_impl_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
928+ unity_internal_default_scope_dbus_impl_preview_internal@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
929+ unity_internal_default_scope_dbus_impl_preview_internal_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
930+ unity_internal_default_scope_dbus_impl_set_active_sources@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
931+ unity_internal_default_scope_dbus_impl_set_active_sources_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
932+ unity_internal_default_scope_dbus_impl_set_categories@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
933+ unity_internal_default_scope_dbus_impl_set_filters@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
934+ unity_internal_default_scope_dbus_impl_set_timeout@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
935+ unity_internal_default_scope_dbus_impl_set_view_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
936+ unity_internal_deprecated_scope_dbus_impl_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
937+ unity_internal_deprecated_scope_dbus_impl_set_categories@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
938+ unity_internal_deprecated_scope_dbus_impl_set_filters@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
939+ unity_internal_deprecated_scope_impl_activate_action@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
940+ unity_internal_deprecated_scope_impl_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
941+ unity_internal_deprecated_scope_impl_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
942+ unity_internal_deprecated_scope_impl_get_view_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
943+ unity_internal_deprecated_scope_impl_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
944+ unity_internal_deprecated_scope_impl_set_active_sources@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
945+ unity_internal_deprecated_scope_impl_set_active_sources_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
946+ unity_internal_deprecated_scope_impl_set_view_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
947+ unity_internal_filter_column_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
948+ unity_internal_glib_cancellable_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
949+ unity_internal_glib_cancellable_get_inner@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
950+ unity_internal_glib_cancellable_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
951+ unity_internal_glib_cancellable_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
952+ unity_internal_io_get_system_data_dirs@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
953+ unity_internal_io_open_from_data_dirs@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
954+ unity_internal_io_open_from_data_dirs_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
955+ unity_internal_io_open_from_dirs@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
956+ unity_internal_io_open_from_dirs_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
957+ unity_internal_io_read_stream_async@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
958+ unity_internal_io_read_stream_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
959+ unity_internal_io_system_data_dirs@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
960+ unity_internal_io_system_data_dirs_length1@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
961+ unity_internal_merge_strategy_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
962+ unity_internal_merge_strategy_merge_result@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
963+ unity_internal_result_column_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
964+ unity_internal_results_synchronizer_add_provider@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
965+ unity_internal_results_synchronizer_clear@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
966+ unity_internal_results_synchronizer_clear_provider_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
967+ unity_internal_results_synchronizer_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
968+ unity_internal_results_synchronizer_copy_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
969+ unity_internal_results_synchronizer_disable_all_providers@Base 6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified
970+ unity_internal_results_synchronizer_disable_provider@Base 6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified
971+ unity_internal_results_synchronizer_enable_provider@Base 6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified
972+ unity_internal_results_synchronizer_get_merge_strategy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
973+ unity_internal_results_synchronizer_get_receiver@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
974+ unity_internal_results_synchronizer_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
975+ unity_internal_results_synchronizer_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
976+ unity_internal_results_synchronizer_prepare_row_buf@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
977+ unity_internal_results_synchronizer_remove_provider@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
978+ unity_internal_results_synchronizer_set_merge_strategy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
979+ unity_internal_scope_channel_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
980+ unity_internal_scope_channel_create_channel@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
981+ unity_internal_scope_channel_get_filter_by_id@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
982+ unity_internal_scope_channel_get_pushed_models@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
983+ unity_internal_scope_channel_get_search_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
984+ unity_internal_scope_channel_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
985+ unity_internal_scope_channel_is_search_running@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
986+ unity_internal_scope_channel_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
987+ unity_internal_scope_channel_register_pushed_model@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
988+ unity_internal_scope_channel_set_filter_base@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
989+ unity_internal_scope_channel_new@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
990+ unity_internal_scope_channel_set_state@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
991+ unity_internal_scope_channel_wait_for_search@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
992+ unity_internal_scope_channel_wait_for_search_finish@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
993+ unity_internal_scope_dbus_impl_export@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
994+ unity_internal_scope_dbus_impl_get_categories_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
995+ unity_internal_scope_dbus_impl_get_filters_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
996+ unity_internal_scope_dbus_impl_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
997+ unity_internal_scope_dbus_impl_queue_property_notification@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
998+ unity_internal_scope_dbus_impl_queue_search_for_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
999+ unity_internal_scope_dbus_impl_set_categories_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1000+ unity_internal_scope_dbus_impl_set_filters_model@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1001+ unity_internal_scope_dbus_impl_unexport@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1002+ unity_internal_utils_async_mutex_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1003+ unity_internal_utils_async_mutex_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1004+ unity_internal_utils_async_mutex_lock@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1005+ unity_internal_utils_async_mutex_lock_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1006+ unity_internal_utils_async_mutex_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1007+ unity_internal_utils_async_mutex_ref@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1008+ unity_internal_utils_async_mutex_try_lock@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1009+ unity_internal_utils_async_mutex_unlock@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1010+ unity_internal_utils_async_mutex_unref@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1011+ unity_internal_utils_async_once_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1012+ unity_internal_utils_async_once_enter@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1013+ unity_internal_utils_async_once_enter_finish@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1014+ unity_internal_utils_async_once_get_data@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1015+ unity_internal_utils_async_once_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1016+ unity_internal_utils_async_once_is_initialized@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1017+ unity_internal_utils_async_once_leave@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1018+ unity_internal_utils_async_once_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1019+ unity_internal_utils_async_once_ref@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1020+ unity_internal_utils_async_once_reset@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1021+ unity_internal_utils_async_once_unref@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1022+ unity_internal_utils_delegate_wrapper_free@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1023+ unity_internal_utils_delegate_wrapper_new@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
1024+ unity_internal_utils_hash_table_to_asv@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1025+ unity_internal_utils_icon_to_string@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1026+ unity_internal_utils_param_spec_async_mutex@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1027+ unity_internal_utils_param_spec_async_once@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1028+ unity_internal_utils_value_get_async_mutex@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1029+ unity_internal_utils_value_get_async_once@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1030+ unity_internal_utils_value_set_async_mutex@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1031+ unity_internal_utils_value_set_async_once@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1032+ unity_internal_utils_value_take_async_mutex@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1033+ unity_internal_utils_value_take_async_once@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1034 unity_launcher_entry_dbus_impl_construct@Base 3.4.6
1035 unity_launcher_entry_dbus_impl_get_type@Base 3.4.6
1036 unity_launcher_entry_dbus_impl_new@Base 3.4.6
1037@@ -223,63 +455,11 @@
1038 unity_launcher_favorites_has_app_info@Base 5.0.0
1039 unity_launcher_favorites_lookup@Base 5.0.0
1040 unity_layout_hint_get_type@Base 5.90.0
1041- unity_lens_add_local_scope@Base 4.0.0
1042- unity_lens_construct@Base 4.0.0
1043- unity_lens_export@Base 4.0.0
1044- unity_lens_get_active@Base 4.0.0
1045- unity_lens_get_categories@Base 4.0.0
1046- unity_lens_get_dbus_path@Base 4.0.0
1047- unity_lens_get_exported@Base 4.0.0
1048- unity_lens_get_filters@Base 4.0.0
1049- unity_lens_get_global_merge_strategy@Base 5.0.0
1050- unity_lens_get_home_lens_default_name@Base 6.5.2
1051- unity_lens_get_id@Base 4.0.0
1052- unity_lens_get_merge_strategy@Base 5.0.0
1053- unity_lens_get_model_internal@Base 5.0.0
1054- unity_lens_get_search_hint@Base 4.0.0
1055- unity_lens_get_search_in_global@Base 4.0.0
1056- unity_lens_get_searching@Base 4.0.0
1057- unity_lens_get_sources_display_name@Base 5.0.0
1058- unity_lens_get_sources_internal@Base 5.0.0
1059- unity_lens_get_type@Base 4.0.0
1060- unity_lens_get_visible@Base 4.0.0
1061- unity_lens_impl_add_local_scope@Base 4.0.0
1062- unity_lens_impl_construct@Base 4.0.0
1063- unity_lens_impl_export@Base 4.0.0
1064- unity_lens_impl_get_global_results_sync@Base 5.0.0
1065- unity_lens_impl_get_model@Base 5.0.0
1066- unity_lens_impl_get_results_sync@Base 5.0.0
1067- unity_lens_impl_get_sources@Base 5.0.0
1068- unity_lens_impl_get_type@Base 4.0.0
1069- unity_lens_impl_load_categories@Base 4.0.0
1070- unity_lens_impl_load_filters@Base 4.0.0
1071- unity_lens_impl_new@Base 4.0.0
1072- unity_lens_impl_update_active_sources@Base 5.0.0
1073- unity_lens_impl_update_active_sources_finish@Base 5.0.0
1074- unity_lens_new@Base 4.0.0
1075- unity_lens_search_construct@Base 4.0.0
1076- unity_lens_search_equals@Base 4.0.0
1077- unity_lens_search_finished@Base 5.0.0
1078- unity_lens_search_get_hints@Base 4.0.0
1079- unity_lens_search_get_reply_hints@Base 5.0.0
1080- unity_lens_search_get_results_model@Base 5.0.0
1081- unity_lens_search_get_search_string@Base 4.0.0
1082- unity_lens_search_get_type@Base 4.0.0
1083- unity_lens_search_new@Base 4.0.0
1084- unity_lens_search_set_reply_hint@Base 5.0.0
1085- unity_lens_search_was_finished@Base 5.4.0
1086- unity_lens_set_active_internal@Base 4.0.0
1087- unity_lens_set_categories@Base 4.0.0
1088- unity_lens_set_filters@Base 4.0.0
1089- unity_lens_set_global_merge_strategy@Base 5.0.0
1090- unity_lens_set_home_lens_default_name@Base 6.5.2
1091- unity_lens_set_merge_strategy@Base 5.0.0
1092- unity_lens_set_search_hint@Base 4.0.0
1093- unity_lens_set_search_in_global@Base 4.0.0
1094- unity_lens_set_sources_display_name@Base 5.0.0
1095- unity_lens_set_visible@Base 4.0.0
1096- unity_merge_strategy_get_type@Base 5.0.0
1097- unity_merge_strategy_merge_result@Base 5.0.0
1098+ unity_master_scope_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1099+ unity_master_scope_get_no_content_hint@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
1100+ unity_master_scope_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1101+ unity_master_scope_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1102+ unity_master_scope_set_no_content_hint@Base 6.91.13ubuntu1daily13.05.07ubuntu.unity.experimental.certified
1103 unity_movie_preview_construct@Base 5.90.0
1104 unity_movie_preview_get_type@Base 5.90.0
1105 unity_movie_preview_get_year@Base 5.92.0
1106@@ -377,28 +557,22 @@
1107 unity_music_player_unexport@Base 5.0.0
1108 unity_music_preview_add_track@Base 5.90.0
1109 unity_music_preview_construct@Base 5.90.0
1110- unity_music_preview_get_current_progress@Base 5.92.0
1111- unity_music_preview_get_current_track_state@Base 5.92.0
1112- unity_music_preview_get_current_track_uri@Base 5.92.0
1113 unity_music_preview_get_type@Base 5.90.0
1114 unity_music_preview_new@Base 5.90.0
1115- unity_music_preview_set_current_progress@Base 5.92.0
1116- unity_music_preview_set_current_track_state@Base 5.92.0
1117- unity_music_preview_set_current_track_uri@Base 5.92.0
1118 unity_music_preview_track_state_get_type@Base 5.92.0
1119 unity_options_filter_add_option@Base 4.0.0
1120 unity_options_filter_construct@Base 4.0.0
1121 unity_options_filter_find_and_update_option@Base 4.0.0
1122 unity_options_filter_get_option@Base 4.0.0
1123+ unity_options_filter_get_show_all_button@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1124 unity_options_filter_get_sort_type@Base 4.0.4
1125 unity_options_filter_get_type@Base 4.0.0
1126 unity_options_filter_load_or_update_options@Base 4.0.0
1127 unity_options_filter_new@Base 4.0.0
1128 unity_options_filter_remove_option@Base 5.0.0
1129+ unity_options_filter_set_show_all_button@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1130 unity_options_filter_set_sort_type@Base 4.0.4
1131 unity_options_filter_sort_type_get_type@Base 4.0.4
1132- unity_param_spec_string_array_wrapper@Base 3.4.6
1133- unity_param_spec_tools@Base 4.0.0
1134 unity_payment_preview_construct@Base 6.90.2daily13.01.11
1135 unity_payment_preview_construct_for_application@Base 6.90.2daily13.01.11
1136 unity_payment_preview_construct_for_error@Base 6.90.2daily13.01.11
1137@@ -443,17 +617,22 @@
1138 unity_playlist_set_last_play_date@Base 4.0.0
1139 unity_playlist_set_modification_date@Base 4.0.0
1140 unity_playlist_set_name@Base 4.0.0
1141+ unity_preferences_manager_get_always_search@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1142 unity_preferences_manager_get_default@Base 6.8.0
1143+ unity_preferences_manager_get_disabled_scopes@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1144+ unity_preferences_manager_get_home_lens_default_view@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1145+ unity_preferences_manager_get_home_lens_priority@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1146 unity_preferences_manager_get_remote_content_search@Base 6.8.0
1147 unity_preferences_manager_get_type@Base 6.8.0
1148 unity_preferences_manager_remote_content_get_type@Base 6.8.0
1149+ unity_preferences_manager_set_always_search@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1150+ unity_preferences_manager_set_disabled_scopes@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1151+ unity_preferences_manager_set_home_lens_default_view@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1152+ unity_preferences_manager_set_home_lens_priority@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1153 unity_preferences_manager_set_remote_content_search@Base 6.8.0
1154 unity_preview_action_construct@Base 5.90.0
1155 unity_preview_action_construct_with_layout_hint@Base 5.90.0
1156- unity_preview_action_dummy1@Base 5.90.0
1157- unity_preview_action_dummy2@Base 5.90.0
1158- unity_preview_action_dummy3@Base 5.90.0
1159- unity_preview_action_dummy4@Base 5.90.0
1160+ unity_preview_action_construct_with_uri@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1161 unity_preview_action_get_display_name@Base 5.90.0
1162 unity_preview_action_get_extra_text@Base 5.96.0
1163 unity_preview_action_get_hints@Base 5.96.0
1164@@ -464,15 +643,12 @@
1165 unity_preview_action_get_type@Base 5.90.0
1166 unity_preview_action_new@Base 5.90.0
1167 unity_preview_action_new_with_layout_hint@Base 5.90.0
1168+ unity_preview_action_new_with_uri@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1169 unity_preview_action_set_extra_text@Base 5.96.0
1170 unity_preview_add_action@Base 5.90.0
1171 unity_preview_add_info@Base 5.90.0
1172 unity_preview_construct@Base 4.0.0
1173 unity_preview_create_raw@Base 5.90.0
1174- unity_preview_dummy1@Base 5.90.0
1175- unity_preview_dummy2@Base 5.90.0
1176- unity_preview_dummy3@Base 5.90.0
1177- unity_preview_dummy4@Base 5.90.0
1178 unity_preview_get_actions@Base 5.90.0
1179 unity_preview_get_description_markup@Base 5.90.0
1180 unity_preview_get_image@Base 5.94.0
1181@@ -486,8 +662,6 @@
1182 unity_preview_set_image_source_uri@Base 5.94.0
1183 unity_preview_set_subtitle@Base 5.90.0
1184 unity_preview_set_title@Base 5.90.0
1185- unity_preview_update_property@Base 5.92.0
1186- unity_preview_update_property_finish@Base 5.96.0
1187 unity_property_update_manager_construct@Base 4.0.0
1188 unity_property_update_manager_emit_dbus_signal@Base 4.0.0
1189 unity_property_update_manager_get_connection@Base 4.0.0
1190@@ -503,114 +677,61 @@
1191 unity_ratings_filter_get_type@Base 4.0.0
1192 unity_ratings_filter_new@Base 4.0.0
1193 unity_ratings_filter_set_rating@Base 4.0.0
1194- unity_results_synchronizer_add_provider@Base 4.0.0
1195- unity_results_synchronizer_construct@Base 4.0.0
1196- unity_results_synchronizer_get_merge_strategy@Base 5.0.0
1197- unity_results_synchronizer_get_receiver@Base 4.0.0
1198- unity_results_synchronizer_get_type@Base 4.0.0
1199- unity_results_synchronizer_new@Base 4.0.0
1200- unity_results_synchronizer_set_merge_strategy@Base 5.0.0
1201- unity_scope_activate@Base 4.0.0
1202- unity_scope_activate_finish@Base 4.0.4
1203- unity_scope_construct@Base 4.0.0
1204- unity_scope_export@Base 4.0.0
1205- unity_scope_factory_add_local_scope@Base 4.0.0
1206- unity_scope_factory_construct@Base 4.0.0
1207- unity_scope_factory_get_lens_id@Base 4.0.0
1208- unity_scope_factory_get_lenses_directory@Base 4.0.0
1209- unity_scope_factory_get_type@Base 4.0.0
1210- unity_scope_factory_new@Base 4.0.0
1211- unity_scope_get_active@Base 4.0.0
1212- unity_scope_get_dbus_path@Base 4.0.0
1213- unity_scope_get_exported@Base 4.0.0
1214- unity_scope_get_filter@Base 4.0.0
1215- unity_scope_get_filter_model@Base 4.0.0
1216- unity_scope_get_filters@Base 4.0.0
1217- unity_scope_get_global_results_model@Base 4.0.0
1218- unity_scope_get_last_search@Base 5.0.0
1219- unity_scope_get_provides_personal_content@Base 6.5.2
1220- unity_scope_get_results_model@Base 4.0.0
1221- unity_scope_get_search_in_global@Base 4.0.0
1222- unity_scope_get_sources@Base 4.0.0
1223- unity_scope_get_type@Base 4.0.0
1224- unity_scope_global_search@Base 4.0.0
1225- unity_scope_global_search_finish@Base 4.0.4
1226- unity_scope_impl_activate_action@Base 5.90.0
1227- unity_scope_impl_construct@Base 4.0.0
1228- unity_scope_impl_export@Base 4.0.0
1229- unity_scope_impl_get_type@Base 4.0.0
1230- unity_scope_impl_get_view_type@Base 5.0.0
1231- unity_scope_impl_invalidate_search@Base 5.0.0
1232- unity_scope_impl_new@Base 4.0.0
1233- unity_scope_impl_preview_internal@Base 5.90.0
1234- unity_scope_impl_schedule_search_changed@Base 5.0.0
1235- unity_scope_impl_schedule_search_changed_finish@Base 5.0.0
1236- unity_scope_impl_set_view_type@Base 5.0.0
1237- unity_scope_impl_update_search_key@Base 5.0.0
1238- unity_scope_invalidate_search@Base 5.0.0
1239- unity_scope_new@Base 4.0.0
1240- unity_scope_proxy_activate@Base 4.0.0
1241- unity_scope_proxy_activate_finish@Base 4.0.0
1242- unity_scope_proxy_get_filters_model@Base 4.0.0
1243- unity_scope_proxy_get_global_results_model@Base 4.0.0
1244- unity_scope_proxy_get_provides_personal_content@Base 6.5.2
1245- unity_scope_proxy_get_results_model@Base 4.0.0
1246- unity_scope_proxy_get_search_in_global@Base 4.0.0
1247- unity_scope_proxy_get_sources@Base 4.0.0
1248- unity_scope_proxy_get_type@Base 4.0.0
1249- unity_scope_proxy_get_view_type@Base 5.0.0
1250- unity_scope_proxy_global_search@Base 4.0.0
1251- unity_scope_proxy_global_search_finish@Base 4.0.0
1252- unity_scope_proxy_local_construct@Base 4.0.0
1253- unity_scope_proxy_local_get_scope@Base 4.0.0
1254- unity_scope_proxy_local_get_type@Base 4.0.0
1255- unity_scope_proxy_local_new@Base 4.0.0
1256- unity_scope_proxy_remote_construct@Base 4.0.0
1257- unity_scope_proxy_remote_get_dbus_name@Base 4.0.0
1258- unity_scope_proxy_remote_get_dbus_path@Base 4.0.0
1259- unity_scope_proxy_remote_get_type@Base 4.0.0
1260- unity_scope_proxy_remote_new@Base 4.0.0
1261- unity_scope_proxy_remote_on_changed@Base 4.0.0
1262- unity_scope_proxy_remote_set_view_type@Base 5.0.0
1263- unity_scope_proxy_remote_set_view_type_finish@Base 5.0.0
1264- unity_scope_proxy_search@Base 4.0.0
1265- unity_scope_proxy_search_finish@Base 4.0.0
1266- unity_scope_proxy_set_active_sources@Base 4.0.0
1267- unity_scope_proxy_set_active_sources_finish@Base 4.0.0
1268- unity_scope_proxy_set_filters_model@Base 4.0.0
1269- unity_scope_proxy_set_global_results_model@Base 4.0.0
1270- unity_scope_proxy_set_provides_personal_content@Base 6.5.2
1271- unity_scope_proxy_set_results_model@Base 4.0.0
1272- unity_scope_proxy_set_search_in_global@Base 4.0.0
1273- unity_scope_proxy_set_sources@Base 4.0.0
1274- unity_scope_proxy_set_view_type@Base 5.0.0
1275- unity_scope_proxy_update_preview_property@Base 5.92.0
1276- unity_scope_proxy_update_preview_property_finish@Base 5.92.0
1277- unity_scope_queue_search_changed@Base 5.0.0
1278- unity_scope_search@Base 4.0.0
1279- unity_scope_search_finish@Base 4.0.4
1280- unity_scope_set_active@Base 4.0.0
1281- unity_scope_set_active_sources_internal@Base 4.0.0
1282- unity_scope_set_last_search@Base 5.0.0
1283- unity_scope_set_local@Base 4.0.0
1284- unity_scope_set_provides_personal_content@Base 6.5.2
1285- unity_scope_set_search_in_global@Base 4.0.0
1286- unity_scope_set_sources@Base 4.0.0
1287- unity_scope_set_view_type_internal@Base 5.0.0
1288- unity_scope_update_preview_property@Base 5.92.0
1289- unity_scope_update_preview_property_finish@Base 5.92.0
1290+ unity_result_previewer_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1291+ unity_result_previewer_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1292+ unity_result_previewer_run@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1293+ unity_result_previewer_run_async@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1294+ unity_result_previewer_set_scope_result@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1295+ unity_result_previewer_set_search_metadata@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1296+ unity_result_set_add_result@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1297+ unity_result_set_add_result_from_variant@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1298+ unity_result_set_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1299+ unity_result_set_flush@Base 6.91.10ubuntu1daily13.04.23ubuntu.unity.experimental.certified
1300+ unity_result_set_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1301+ unity_result_type_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1302+ unity_schema_add_field@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1303+ unity_schema_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1304+ unity_schema_field_info_copy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1305+ unity_schema_field_info_destroy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1306+ unity_schema_field_info_dup@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1307+ unity_schema_field_info_free@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1308+ unity_schema_field_info_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1309+ unity_schema_field_type_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1310+ unity_schema_get_fields@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1311+ unity_schema_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1312+ unity_schema_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1313+ unity_scope_dbus_connector_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1314+ unity_scope_dbus_connector_export@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1315+ unity_scope_dbus_connector_get_scope@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1316+ unity_scope_dbus_connector_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1317+ unity_scope_dbus_connector_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1318+ unity_scope_dbus_connector_quit@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1319+ unity_scope_dbus_connector_run@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1320+ unity_scope_dbus_connector_unexport@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1321+ unity_scope_result_copy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1322+ unity_scope_result_create@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1323+ unity_scope_result_destroy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1324+ unity_scope_result_dup@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1325+ unity_scope_result_free@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1326+ unity_scope_result_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1327+ unity_scope_search_base_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1328+ unity_scope_search_base_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1329+ unity_scope_search_base_run@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1330+ unity_scope_search_base_run_async@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1331+ unity_scope_search_base_set_search_context@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1332+ unity_search_context_copy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1333+ unity_search_context_create@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1334+ unity_search_context_destroy@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1335+ unity_search_context_dup@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1336+ unity_search_context_free@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1337+ unity_search_context_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1338+ unity_search_metadata_construct@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1339+ unity_search_metadata_create@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1340+ unity_search_metadata_get_locale@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1341+ unity_search_metadata_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1342+ unity_search_metadata_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1343 unity_search_type_get_type@Base 5.0.0
1344- unity_series_item_construct@Base 5.92.0
1345- unity_series_item_get_icon_hint@Base 5.92.0
1346- unity_series_item_get_title@Base 5.92.0
1347- unity_series_item_get_type@Base 5.92.0
1348- unity_series_item_get_uri@Base 5.92.0
1349- unity_series_item_new@Base 5.92.0
1350- unity_series_preview_construct@Base 5.90.0
1351- unity_series_preview_get_active_preview@Base 5.90.0
1352- unity_series_preview_get_current_item_uri@Base 5.92.0
1353- unity_series_preview_get_type@Base 5.90.0
1354- unity_series_preview_new@Base 5.90.0
1355+ unity_serialization_type_get_type@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1356 unity_social_preview_add_comment@Base 6.5.2
1357 unity_social_preview_comment_construct@Base 6.5.2
1358 unity_social_preview_comment_get_id@Base 6.5.2
1359@@ -639,18 +760,9 @@
1360 unity_specific_item_manager_get_consumer@Base 4.0.0
1361 unity_specific_item_manager_get_type@Base 4.0.0
1362 unity_specific_item_manager_new@Base 4.0.0
1363- unity_string_array_wrapper_construct@Base 3.4.6
1364- unity_string_array_wrapper_get_type@Base 3.4.6
1365+ unity_string_array_wrapper_free@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
1366 unity_string_array_wrapper_new@Base 3.4.6
1367- unity_string_array_wrapper_ref@Base 3.4.6
1368 unity_string_array_wrapper_take_strings@Base 4.0.6
1369- unity_string_array_wrapper_unref@Base 3.4.6
1370- unity_tools_construct@Base 4.0.0
1371- unity_tools_get_type@Base 4.0.0
1372- unity_tools_hash_table_to_asv@Base 4.0.0
1373- unity_tools_new@Base 4.0.0
1374- unity_tools_ref@Base 4.0.0
1375- unity_tools_unref@Base 4.0.0
1376 unity_trace_log_object_real@Base 5.0.0
1377 unity_trace_log_object_va@Base 5.0.0
1378 unity_track_metadata_construct@Base 4.0.0
1379@@ -674,9 +786,3 @@
1380 unity_track_metadata_set_title@Base 4.0.0
1381 unity_track_metadata_set_track_no@Base 5.92.0
1382 unity_track_metadata_set_uri@Base 5.92.0
1383- unity_value_get_string_array_wrapper@Base 3.4.6
1384- unity_value_get_tools@Base 4.0.0
1385- unity_value_set_string_array_wrapper@Base 3.4.6
1386- unity_value_set_tools@Base 4.0.0
1387- unity_value_take_string_array_wrapper@Base 3.4.6
1388- unity_value_take_tools@Base 4.0.0
1389
1390=== modified file 'debian/rules'
1391--- debian/rules 2012-11-16 16:37:17 +0000
1392+++ debian/rules 2013-05-08 13:19:27 +0000
1393@@ -7,7 +7,7 @@
1394 export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
1395
1396 %:
1397- dh $@ --with python2,quilt,autoreconf --parallel
1398+ dh $@ --with python2,python3,quilt,autoreconf --parallel
1399
1400 override_dh_autoreconf:
1401 NOCONFIGURE=1 dh_autoreconf ./autogen.sh
1402@@ -16,12 +16,20 @@
1403 dh_auto_configure -- --enable-headless-tests
1404
1405 override_dh_install:
1406+ # install the python3 gir override file as well
1407+ PYTHON=python3 ./configure --prefix=/usr
1408+ cd bindings/python/ && DESTDIR=../../debian/tmp make install && cd ../..
1409 rm debian/tmp/usr/lib/*/*.*a
1410 rm debian/tmp/usr/lib/*/libunity/*.*a
1411 rm debian/tmp/usr/lib/python*/dist-packages/gi/overrides/*.pyc
1412 rm debian/tmp/usr/lib/python*/dist-packages/gi/overrides/*.pyo
1413+ rm debian/tmp/usr/share/unity-scopes/*.pyc
1414+ rm debian/tmp/usr/share/unity-scopes/*.pyo
1415 dh_install --fail-missing
1416
1417+override_dh_python3:
1418+ dh_python3 debian/gir1.2-unity-5.0/usr/lib/python3
1419+
1420 override_dh_gencontrol:
1421 dh_girepository
1422 dh_gencontrol
1423
1424=== added file 'debian/unity-scopes-runner.install'
1425--- debian/unity-scopes-runner.install 1970-01-01 00:00:00 +0000
1426+++ debian/unity-scopes-runner.install 2013-05-08 13:19:27 +0000
1427@@ -0,0 +1,1 @@
1428+usr/share/unity-scopes/scope-runner-dbus.py
1429
1430=== modified file 'doc/reference/Makefile.am'
1431--- doc/reference/Makefile.am 2012-10-17 11:49:15 +0000
1432+++ doc/reference/Makefile.am 2013-05-08 13:19:27 +0000
1433@@ -13,6 +13,7 @@
1434
1435 VALADOC_FLAGS = \
1436 --force \
1437+ --target-glib=2.32 \
1438 --driver "$(DRIVER_VERSION)" \
1439 $(LIBUNITY_PACKAGES) \
1440 --vapidir $(top_builddir)/protocol \
1441
1442=== modified file 'extras/Makefile.am'
1443--- extras/Makefile.am 2012-12-03 12:28:26 +0000
1444+++ extras/Makefile.am 2013-05-08 13:19:27 +0000
1445@@ -44,7 +44,6 @@
1446
1447 libunity_extras_la_VALASOURCES = \
1448 unity-extra-preview-player-client.vala \
1449- unity-extra-preview-player-controller.vala \
1450 unity-extra-utils.vala \
1451 $(NULL)
1452
1453@@ -85,6 +84,7 @@
1454 $(AM_V_GEN) $(VALAC) $(libunity_extras_la_VALAFLAGS) $^
1455 @sed -i -e 's/<namespace name="UnityExtras" version="@GIR_VERSION@" c:prefix="Unity">/<namespace name="UnityExtras" version="@GIR_VERSION@" c:prefix="Unity" shared-library="libunity-extras.so.@LIBUNITY_LT_CURRENT@">/g' UnityExtras-@GIR_VERSION@.gir
1456 @sed -i -e 's/"Extras/"/;s/"extras_/"/' UnityExtras-@GIR_VERSION@.gir
1457+ @sed -i -e 's/<parameter name="scope_creation_cb" transfer-ownership="none"/<parameter name="scope_creation_cb" transfer-ownership="none" scope="call"/' UnityExtras-@GIR_VERSION@.gir
1458 @touch $@
1459
1460 BUILT_SOURCES += libunity_extras_la_vala.stamp
1461
1462=== removed file 'extras/unity-extra-preview-player-controller.vala'
1463--- extras/unity-extra-preview-player-controller.vala 2012-10-17 09:06:50 +0000
1464+++ extras/unity-extra-preview-player-controller.vala 1970-01-01 00:00:00 +0000
1465@@ -1,159 +0,0 @@
1466-/*
1467- * Copyright (C) 2012 Canonical Ltd
1468- *
1469- * This program is free software: you can redistribute it and/or modify
1470- * it under the terms of the GNU General Public License version 3 as
1471- * published by the Free Software Foundation.
1472- *
1473- * This program is distributed in the hope that it will be useful,
1474- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1475- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1476- * GNU General Public License for more details.
1477- *
1478- * You should have received a copy of the GNU General Public License
1479- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1480- *
1481- * Authored by Pawel Stolowski <pawel.stolowski@canonical.com>
1482- */
1483-
1484-[CCode (gir_namespace = "UnityExtras", gir_version = "1.0")]
1485-namespace Unity.Extras
1486-{
1487- /**
1488- * Helper class for controlling PreviewPlayer and keeping MusicPreview up-to-date
1489- * with playback progress. It maintans an instance of PreviewPlayer, connects it
1490- * to active_preview signals, subscribes to progress signal and updates preview
1491- * state accordingly during playback. Playback is controlled by play/pause
1492- * signals from active_preview.
1493- */
1494- public class PreviewPlayerController: GLib.Object
1495- {
1496- private PreviewPlayer preview_player;
1497- private Unity.MusicPreview active_preview_;
1498- private ulong play_sig_id_;
1499- private ulong pause_sig_id_;
1500- private ulong closed_sig_id_;
1501-
1502- public Unity.MusicPreview active_preview
1503- {
1504- get
1505- {
1506- return active_preview_;
1507- }
1508- set
1509- {
1510- disconnect_signals ();
1511-
1512- active_preview_ = value;
1513- if (value != null)
1514- {
1515- play_sig_id_ = active_preview_.play.connect (play);
1516- pause_sig_id_ = active_preview_.pause.connect (pause);
1517- closed_sig_id_ = active_preview_.closed.connect (closed);
1518- }
1519- }
1520- }
1521-
1522- public PreviewPlayerController ()
1523- {
1524- }
1525-
1526- ~PreviewPlayerController ()
1527- {
1528- disconnect_signals ();
1529- }
1530-
1531- private void disconnect_signals ()
1532- {
1533- if (active_preview_ != null)
1534- {
1535- if (play_sig_id_ > 0)
1536- {
1537- active_preview_.disconnect (play_sig_id_);
1538- play_sig_id_ = 0;
1539- }
1540- if (pause_sig_id_ > 0)
1541- {
1542- active_preview_.disconnect (pause_sig_id_);
1543- pause_sig_id_ = 0;
1544- }
1545- if (closed_sig_id_ > 0)
1546- {
1547- active_preview_.disconnect (closed_sig_id_);
1548- closed_sig_id_ = 0;
1549- }
1550- }
1551- }
1552-
1553- private void on_progress_changed (string uri, Unity.MusicPreview.TrackState state, double progress)
1554- {
1555- if (active_preview_ != null)
1556- {
1557- active_preview_.current_track_uri = uri;
1558- active_preview_.current_track_state = state;
1559- active_preview_.current_progress = (float)progress;
1560- }
1561- }
1562-
1563- private void closed (Unity.Preview preview)
1564- {
1565- if (preview_player != null)
1566- {
1567- try
1568- {
1569- preview_player.close ();
1570- }
1571- catch (Error e)
1572- {
1573- warning ("Failed to close preview player: %s", e.message);
1574- }
1575- }
1576- }
1577-
1578- private void play (Unity.Preview preview, string uri)
1579- {
1580- debug ("play request: '%s'", uri);
1581-
1582- try
1583- {
1584- if (preview_player == null)
1585- {
1586- preview_player = new PreviewPlayer ();
1587- preview_player.progress.connect (on_progress_changed);
1588- }
1589-
1590- // we will receive state back in on_progress_changed, but set it now so that it's immediately reflected in the dash
1591- active_preview_.current_track_uri = uri;
1592- active_preview_.current_progress = 0.0f;
1593- active_preview_.current_track_state = Unity.MusicPreview.TrackState.PLAYING;
1594-
1595- preview_player.play (uri);
1596- }
1597- catch (Error e)
1598- {
1599- warning ("Failed to play '%s': %s", uri, e.message);
1600- }
1601- }
1602-
1603- private void pause (Unity.Preview preview, string uri)
1604- {
1605- debug ("pause request: '%s'", uri);
1606-
1607- try
1608- {
1609- if (preview_player != null)
1610- {
1611- // we will receive state back in on_progress_changed, but set it now so that it's immediately reflected in the dash
1612- active_preview_.current_track_uri = uri;
1613- active_preview_.current_track_state = Unity.MusicPreview.TrackState.PAUSED;
1614-
1615- preview_player.pause ();
1616- }
1617- }
1618- catch (Error e)
1619- {
1620- warning ("Failed to pause '%s': %s", uri, e.message);
1621- }
1622- }
1623- }
1624-}
1625
1626=== modified file 'extras/unity-extra-utils.vala'
1627--- extras/unity-extra-utils.vala 2012-11-27 15:57:49 +0000
1628+++ extras/unity-extra-utils.vala 2013-05-08 13:19:27 +0000
1629@@ -104,15 +104,15 @@
1630 * still fail even after executing the callback.
1631 *
1632 * @param name DBus name to own
1633- * @param cb callback that creates Lens/Scope object
1634+ * @param scope_creation_cb callback that creates Lens/Scope object
1635 * @return application instance (on success)
1636 */
1637- public static GLib.Application? dbus_own_name (string name, CreateScopeCallback cb) throws Error
1638+ public static GLib.Application? dbus_own_name (string name, CreateScopeCallback scope_creation_cb) throws Error
1639 {
1640 GLib.Application? app = null;
1641 if (!dbus_name_has_owner (name))
1642 {
1643- cb ();
1644+ scope_creation_cb ();
1645
1646 app = new Application (name, ApplicationFlags.IS_SERVICE);
1647 app.register ();
1648@@ -128,4 +128,4 @@
1649 }
1650 return app;
1651 }
1652-}
1653\ No newline at end of file
1654+}
1655
1656=== modified file 'po/POTFILES.in'
1657--- po/POTFILES.in 2012-09-26 07:34:03 +0000
1658+++ po/POTFILES.in 2013-05-08 13:19:27 +0000
1659@@ -1,4 +1,4 @@
1660 [encoding: UTF-8]
1661-tools/dbus-lens-connect.ui
1662+tools/dbus-scope-connect.ui
1663 tools/unity-tool.vala
1664 tools/unity-tool.ui
1665
1666=== modified file 'protocol/Makefile.am'
1667--- protocol/Makefile.am 2012-08-07 12:31:44 +0000
1668+++ protocol/Makefile.am 2013-05-08 13:19:27 +0000
1669@@ -2,7 +2,7 @@
1670 BUILT_SOURCES =
1671 CLEANFILES =
1672 EXTRA_DIST =
1673-EXTRA_FLAGS =
1674+EXTRA_FLAGS = -g
1675
1676 protolibdir = $(libdir)/libunity
1677 protolib_LTLIBRARIES = \
1678@@ -31,6 +31,7 @@
1679 libunity_protocol_private_la_CPPFLAGS = \
1680 -DG_LOG_DOMAIN=\"libunity-protocol-private\" \
1681 -DPKGDATADIR=\"$(PKGDATADIR)\" \
1682+ -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
1683 -DDATADIR=\"$(DATADIR)\" \
1684 -I$(srcdir) \
1685 $(EXTRA_FLAGS) \
1686@@ -59,9 +60,12 @@
1687
1688 libunity_protocol_private_la_VALASOURCES = \
1689 protocol-icon.vala \
1690- protocol-lens-interface.vala \
1691 protocol-scope-interface.vala \
1692 protocol-previews.vala \
1693+ protocol-scope-discovery.vala \
1694+ protocol-preview-player.vala \
1695+ unity-scope-proxy.vala \
1696+ unity-scope-proxy-remote.vala \
1697 $(NULL)
1698
1699 libunity_protocol_private_la_GENERATED = \
1700@@ -85,4 +89,3 @@
1701 $(libunity_protocol_private_la_GENERATED) \
1702 $(libunity_protocol_private_la_VALASOURCES:.vala=.c) \
1703 $(NULL)
1704-
1705
1706=== removed file 'protocol/protocol-lens-interface.vala'
1707--- protocol/protocol-lens-interface.vala 2012-11-05 21:09:31 +0000
1708+++ protocol/protocol-lens-interface.vala 1970-01-01 00:00:00 +0000
1709@@ -1,107 +0,0 @@
1710-/*
1711- * Copyright (C) 2010 Canonical, Ltd.
1712- *
1713- * This library is free software; you can redistribute it and/or modify
1714- * it under the terms of the GNU Lesser General Public License
1715- * version 3.0 as published by the Free Software Foundation.
1716- *
1717- * This library is distributed in the hope that it will be useful,
1718- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1719- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1720- * GNU Lesser General Public License version 3.0 for more details.
1721- *
1722- * You should have received a copy of the GNU Lesser General Public
1723- * License along with this library. If not, see
1724- * <http://www.gnu.org/licenses/>.
1725- *
1726- * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
1727- *
1728- */
1729-
1730-using GLib;
1731-using Dee;
1732-
1733-namespace Unity.Protocol {
1734-
1735-/* The raw type that get's passed over DBus to Unity */
1736-public struct LensInfo
1737-{
1738- public string dbus_path;
1739- public bool search_in_global;
1740- public bool visible;
1741- public string search_hint;
1742- public string private_connection_name;
1743- public string results_model_name;
1744- public string global_results_model_name;
1745- public string categories_model_name;
1746- public string filters_model_name;
1747- public HashTable<string, Variant> hints;
1748-}
1749-
1750-/* The error types that can be thrown from DBus methods */
1751-[DBus (name = "com.canonical.Unity.LensError")]
1752-public errordomain LensError
1753-{
1754- FAILED,
1755- INVALID_SCOPE
1756-}
1757-
1758-
1759-public enum HandledType
1760-{
1761- NOT_HANDLED,
1762- SHOW_DASH,
1763- HIDE_DASH,
1764- GOTO_DASH_URI,
1765- SHOW_PREVIEW
1766-}
1767-
1768-public enum ActionType
1769-{
1770- ACTIVATE_RESULT,
1771- PREVIEW_RESULT,
1772- PREVIEW_ACTION,
1773- PREVIEW_BUILTIN_ACTION
1774-}
1775-
1776-public enum ViewType
1777-{
1778- HIDDEN,
1779- HOME_VIEW,
1780- LENS_VIEW
1781-}
1782-
1783-/**
1784- * LensService:
1785- *
1786- * The Lens interface exported on DBus
1787- */
1788-[DBus (name = "com.canonical.Unity.Lens")]
1789-public interface LensService : GLib.Object
1790-{
1791- public async abstract void info_request () throws IOError;
1792-
1793- // FIXME: should have the hints param and activate_with_hints should go away
1794- public async abstract ActivationReplyRaw activate (
1795- string uri, uint action_type) throws IOError, LensError;
1796-
1797- public async abstract ActivationReplyRaw activate_with_hints (
1798- string uri, uint action_type, HashTable<string, Variant> hints) throws IOError, LensError;
1799-
1800- public async abstract HashTable<string, Variant> update_preview_property (string uri, HashTable<string, Variant> values) throws IOError, LensError;
1801-
1802- public async abstract HashTable<string, Variant> search (
1803- string search_string, HashTable<string, Variant> hints) throws IOError;
1804-
1805- public async abstract HashTable<string, Variant> global_search (
1806- string search_string, HashTable<string, Variant> hints) throws IOError;
1807-
1808- public async abstract void update_filter (string filter_name,
1809- HashTable<string, Variant> properties) throws IOError;
1810-
1811- public async abstract void set_view_type (uint view_type) throws IOError;
1812-
1813- public signal void changed (LensInfo lens_info);
1814-}
1815-
1816-} /* namespace unity */
1817
1818=== added file 'protocol/protocol-preview-player.vala'
1819--- protocol/protocol-preview-player.vala 1970-01-01 00:00:00 +0000
1820+++ protocol/protocol-preview-player.vala 2013-05-08 13:19:27 +0000
1821@@ -0,0 +1,126 @@
1822+/*
1823+ * Copyright (C) 2012 Canonical Ltd
1824+ *
1825+ * This program is free software: you can redistribute it and/or modify
1826+ * it under the terms of the GNU General Public License version 3 as
1827+ * published by the Free Software Foundation.
1828+ *
1829+ * This program is distributed in the hope that it will be useful,
1830+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1831+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1832+ * GNU General Public License for more details.
1833+ *
1834+ * You should have received a copy of the GNU General Public License
1835+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1836+ *
1837+ * Authored by Pawel Stolowski <pawel.stolowski@canonical.com>
1838+ */
1839+
1840+namespace Unity.Protocol
1841+{
1842+
1843+[DBus (name = "com.canonical.Unity.Lens.Music.PreviewPlayer")]
1844+internal interface PreviewPlayerService: GLib.Object
1845+{
1846+ public signal void progress (string uri, uint32 state, double progress);
1847+
1848+ public abstract async void play (string uri) throws Error;
1849+ public abstract async void pause () throws Error;
1850+ public abstract async void pause_resume () throws Error;
1851+ public abstract async void resume () throws Error;
1852+ public abstract async void stop () throws Error;
1853+ public abstract async void close () throws Error;
1854+ public abstract async HashTable<string, Variant> video_properties (string uri) throws Error;
1855+}
1856+
1857+/**
1858+ * Client class for preview player DBus interface (com.canonical.Unity.Lens.Music.PreviewPlayer).
1859+ */
1860+public class PreviewPlayer: GLib.Object
1861+{
1862+ static const string PREVIEW_PLAYER_DBUS_NAME = "com.canonical.Unity.Lens.Music.PreviewPlayer";
1863+ static const string PREVIEW_PLAYER_DBUS_PATH = "/com/canonical/Unity/Lens/Music/PreviewPlayer";
1864+
1865+ /**
1866+ * Reports progress of playback for given track uri.
1867+ */
1868+ public signal void progress (string uri, PlayState state, double progress);
1869+
1870+ private async void connect_to () throws Error
1871+ {
1872+ _preview_player_service = yield Bus.get_proxy (BusType.SESSION, PREVIEW_PLAYER_DBUS_NAME, PREVIEW_PLAYER_DBUS_PATH);
1873+ _preview_player_service.progress.connect (on_progress_signal);
1874+ }
1875+
1876+ public async void play (string uri) throws Error
1877+ {
1878+ if (_preview_player_service == null)
1879+ {
1880+ yield connect_to ();
1881+ }
1882+ yield _preview_player_service.play (uri);
1883+ }
1884+
1885+ public async void pause () throws Error
1886+ {
1887+ if (_preview_player_service == null)
1888+ {
1889+ yield connect_to ();
1890+ }
1891+ yield _preview_player_service.pause ();
1892+ }
1893+
1894+ public async void pause_resume () throws Error
1895+ {
1896+ if (_preview_player_service == null)
1897+ {
1898+ yield connect_to ();
1899+ }
1900+ yield _preview_player_service.pause_resume ();
1901+ }
1902+
1903+ public async void resume () throws Error
1904+ {
1905+ if (_preview_player_service == null)
1906+ {
1907+ yield connect_to ();
1908+ }
1909+ yield _preview_player_service.resume ();
1910+ }
1911+
1912+ public async void stop () throws Error
1913+ {
1914+ if (_preview_player_service == null)
1915+ {
1916+ yield connect_to ();
1917+ }
1918+ yield _preview_player_service.stop ();
1919+ }
1920+
1921+ public async void close () throws Error
1922+ {
1923+ if (_preview_player_service == null)
1924+ {
1925+ yield connect_to ();
1926+ }
1927+ yield _preview_player_service.close ();
1928+ }
1929+
1930+ public async HashTable<string, Variant> video_properties (string uri) throws Error
1931+ {
1932+ if (_preview_player_service == null)
1933+ {
1934+ yield connect_to ();
1935+ }
1936+ var props = yield _preview_player_service.video_properties (uri);
1937+ return props;
1938+ }
1939+
1940+ internal void on_progress_signal (string uri, uint32 state, double progress_value)
1941+ {
1942+ progress (uri, (PlayState) state, progress_value);
1943+ }
1944+
1945+ private PreviewPlayerService _preview_player_service;
1946+}
1947+}
1948
1949=== modified file 'protocol/protocol-previews.vala'
1950--- protocol/protocol-previews.vala 2012-12-10 14:44:07 +0000
1951+++ protocol/protocol-previews.vala 2013-05-08 13:19:27 +0000
1952@@ -476,6 +476,7 @@
1953
1954 public string track_data_swarm_name { get; set; }
1955 public string track_data_address { get; set; }
1956+ public Dee.SerializableModel track_model { get; set; }
1957
1958 public MusicPreview ()
1959 {
1960@@ -496,18 +497,9 @@
1961
1962 if (track_data_address != null)
1963 properties["track-data-address"] = track_data_address;
1964- }
1965-
1966- public void play_uri (string uri)
1967- {
1968- add_update ("action", "play");
1969- add_update ("uri", uri);
1970- }
1971-
1972- public void pause_uri (string uri)
1973- {
1974- add_update ("action", "pause");
1975- add_update ("uri", uri);
1976+
1977+ if (track_model != null)
1978+ properties["track-model"] = track_model.serialize ();
1979 }
1980
1981 static construct
1982@@ -527,6 +519,11 @@
1983 (v) => { result.track_data_swarm_name = v.get_string (); });
1984 Preview.checked_set (properties["track-data-address"],
1985 (v) => { result.track_data_address= v.get_string (); });
1986+ Preview.checked_set (properties["track-model"], (v) =>
1987+ {
1988+ var model = Dee.Serializable.parse (v, typeof (Dee.SequenceModel));
1989+ result.track_model = model as Dee.SerializableModel;
1990+ });
1991
1992 return result;
1993 });
1994
1995=== added file 'protocol/protocol-scope-discovery.vala'
1996--- protocol/protocol-scope-discovery.vala 1970-01-01 00:00:00 +0000
1997+++ protocol/protocol-scope-discovery.vala 2013-05-08 13:19:27 +0000
1998@@ -0,0 +1,477 @@
1999+/*
2000+ * Copyright (C) 2012 Canonical, Ltd.
2001+ *
2002+ * This library is free software; you can redistribute it and/or modify
2003+ * it under the terms of the GNU Lesser General Public License
2004+ * version 3.0 as published by the Free Software Foundation.
2005+ *
2006+ * This library is distributed in the hope that it will be useful,
2007+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2008+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2009+ * GNU Lesser General Public License version 3.0 for more details.
2010+ *
2011+ * You should have received a copy of the GNU Lesser General Public
2012+ * License along with this library. If not, see
2013+ * <http://www.gnu.org/licenses/>.
2014+ *
2015+ * Authored by Pawel Stolowski <pawel.stolowski@canonical.com>
2016+ *
2017+ */
2018+
2019+namespace Unity.Protocol
2020+{
2021+
2022+ private static const string SCOPES_DIR = "unity/scopes";
2023+
2024+ errordomain ParseError
2025+ {
2026+ INVALID_METADATA,
2027+ FILE_NOT_FOUND,
2028+ INVALID_PATH,
2029+ UNKNOWN_FILE
2030+ }
2031+
2032+ public class MetaDataColumnInfo
2033+ {
2034+ public string name { get; internal set; }
2035+ public string type_id { get; internal set; }
2036+
2037+ /**
2038+ * Creates MetaDataColumnInfo from a string in format "name[t]", where 't' is GVariant type.
2039+ */
2040+ public MetaDataColumnInfo (string v) throws Error
2041+ {
2042+ int idx = v.index_of ("[");
2043+ if (idx > 0 && v.index_of ("]") == v.length - 1) //there must be at least 1 character preceding [, thus > 0
2044+ {
2045+ name = v.substring (0, idx);
2046+ type_id = v.slice (idx + 1, v.length - 1);
2047+ }
2048+ else
2049+ {
2050+ throw new ParseError.INVALID_METADATA ("Invalid format of meta data string");
2051+ }
2052+ }
2053+
2054+ public virtual bool equals (MetaDataColumnInfo m)
2055+ {
2056+ return name == m.name && type_id == m.type_id;
2057+ }
2058+ }
2059+
2060+ public class MetaDataSchemaInfo
2061+ {
2062+ public GLib.GenericArray<MetaDataColumnInfo> columns;
2063+
2064+ /**
2065+ * Creates a list of MetaDataColumnInfo objects from a semicolon-separated strings, e.g. "name1[type];name2[type2]...".
2066+ *
2067+ * @param mdinfo_str semicolon-separated name[type] entries
2068+ * @return list of MetaDataColumnInfo objects
2069+ */
2070+ public static MetaDataSchemaInfo from_string (string mdinfo_str) throws Error
2071+ {
2072+ var schema_info = new MetaDataSchemaInfo ();
2073+ schema_info.columns = new GLib.GenericArray<MetaDataColumnInfo> ();
2074+
2075+ foreach (var m in mdinfo_str.split (";"))
2076+ {
2077+ if (m.length > 0)
2078+ {
2079+ var info = new MetaDataColumnInfo (m);
2080+ schema_info.columns.add (info);
2081+ }
2082+ }
2083+ return schema_info;
2084+ }
2085+
2086+ public HashTable<string, string> as_hash_table ()
2087+ {
2088+ HashTable<string, string> ret = new HashTable<string, string> (str_hash, str_equal);
2089+
2090+ for (int i = 0; i < columns.length; i++)
2091+ {
2092+ unowned MetaDataColumnInfo info = columns[i];
2093+ ret[info.name] = info.type_id;
2094+ }
2095+
2096+ return ret;
2097+ }
2098+
2099+ public bool equals (MetaDataSchemaInfo s)
2100+ {
2101+ if (columns.length != s.columns.length)
2102+ return false;
2103+ for (int i = 0; i < columns.length; i++)
2104+ {
2105+ if (!columns[i].equals (s.columns[i]))
2106+ return false;
2107+ }
2108+ return true;
2109+ }
2110+ }
2111+
2112+ public class ScopeRegistry
2113+ {
2114+ private static const string SCOPE_GROUP = "Scope";
2115+ private static const string DESKTOP_GROUP = "Desktop Entry";
2116+
2117+ public class ScopeMetadata
2118+ {
2119+ public string id;
2120+ public string domain;
2121+ public string full_path;
2122+ public string name;
2123+ public string dbus_path;
2124+ public string dbus_name;
2125+ public string icon;
2126+ public string category_icon;
2127+ public MetaDataSchemaInfo? required_metadata;
2128+ public MetaDataSchemaInfo? optional_metadata;
2129+ public GLib.SList<string> keywords;
2130+ public string type;
2131+ public string description;
2132+ public string search_hint;
2133+ public bool is_master;
2134+ public bool global_searches;
2135+ public bool visible;
2136+ public bool remote_content;
2137+ public string query_binary;
2138+ public string query_pattern;
2139+ public string shortcut;
2140+
2141+ public void load_from_key_file (KeyFile file) throws Error
2142+ {
2143+ this.domain = null;
2144+
2145+ // Get the Gettext-Domain first, if it exists
2146+ if (file.has_group (DESKTOP_GROUP) && file.has_key (DESKTOP_GROUP, "X-Ubuntu-Gettext-Domain"))
2147+ this.domain = file.get_string (DESKTOP_GROUP, "X-Ubuntu-Gettext-Domain");
2148+
2149+ // required fields
2150+ this.name = dgettext(this.domain, file.get_string (SCOPE_GROUP, "Name"));
2151+ this.dbus_name = file.get_string (SCOPE_GROUP, "DBusName");
2152+ this.dbus_path = file.get_string (SCOPE_GROUP, "DBusPath");
2153+ this.icon = file.get_string (SCOPE_GROUP, "Icon");
2154+ this.type = file.get_string (SCOPE_GROUP, "Type");
2155+
2156+ // optional fields
2157+ if (file.has_key (SCOPE_GROUP, "IsMaster"))
2158+ this.is_master = file.get_boolean (SCOPE_GROUP, "IsMaster");
2159+ else
2160+ this.is_master = false;
2161+
2162+ if (file.has_key (SCOPE_GROUP, "Visible"))
2163+ this.visible = file.get_boolean (SCOPE_GROUP, "Visible");
2164+ else
2165+ this.visible = true;
2166+
2167+ if (file.has_key (SCOPE_GROUP, "GlobalSearches"))
2168+ this.global_searches = file.get_boolean (SCOPE_GROUP, "GlobalSearches");
2169+ else
2170+ this.global_searches = true;
2171+
2172+ if (file.has_key (SCOPE_GROUP, "RemoteContent"))
2173+ this.remote_content = file.get_boolean (SCOPE_GROUP, "RemoteContent");
2174+ else
2175+ this.remote_content = false;
2176+
2177+ if (file.has_key (SCOPE_GROUP, "QueryBinary"))
2178+ this.query_binary = file.get_string (SCOPE_GROUP, "QueryBinary");
2179+
2180+ if (file.has_key (SCOPE_GROUP, "CategoryIcon"))
2181+ this.category_icon = file.get_string (SCOPE_GROUP, "CategoryIcon");
2182+
2183+ if (file.has_key (SCOPE_GROUP, "QueryPattern"))
2184+ this.query_pattern = file.get_string (SCOPE_GROUP, "QueryPattern");
2185+
2186+ if (file.has_key (SCOPE_GROUP, "Description"))
2187+ this.description = file.get_string (SCOPE_GROUP, "Description");
2188+
2189+ if (file.has_key (SCOPE_GROUP, "SearchHint"))
2190+ this.search_hint = dgettext(this.domain, file.get_string (SCOPE_GROUP, "SearchHint"));
2191+
2192+ if (file.has_key (SCOPE_GROUP, "RequiredMetadata"))
2193+ this.required_metadata = MetaDataSchemaInfo.from_string (file.get_string (SCOPE_GROUP, "RequiredMetadata"));
2194+
2195+ if (file.has_key (SCOPE_GROUP, "OptionalMetadata"))
2196+ this.optional_metadata = MetaDataSchemaInfo.from_string (file.get_string (SCOPE_GROUP, "OptionalMetadata"));
2197+
2198+ if (file.has_key (SCOPE_GROUP, "Keywords"))
2199+ {
2200+ // split keywords
2201+ this.keywords = new GLib.SList<string> ();
2202+ foreach (var k in file.get_string (SCOPE_GROUP, "Keywords").split (";"))
2203+ {
2204+ if (k.length > 0)
2205+ this.keywords.append (k);
2206+ }
2207+ }
2208+
2209+ if (file.has_key (SCOPE_GROUP, "Shortcut"))
2210+ {
2211+ this.shortcut = file.get_string (SCOPE_GROUP, "Shortcut");
2212+ }
2213+ }
2214+
2215+ public static ScopeMetadata for_id (string scope_id) throws Error
2216+ {
2217+ debug ("for_id: %s", scope_id);
2218+
2219+ string full_path;
2220+ var file = new KeyFile ();
2221+ var path = "%s/%s".printf (SCOPES_DIR, scope_id);
2222+ bool loaded = file.load_from_data_dirs (path, out full_path,
2223+ KeyFileFlags.NONE);
2224+
2225+ if (!loaded)
2226+ throw new ParseError.FILE_NOT_FOUND ("Scope not found: %s", scope_id);
2227+
2228+ ScopeMetadata data = new ScopeMetadata ();
2229+ data.id = scope_id;
2230+ data.full_path = full_path;
2231+
2232+ data.load_from_key_file (file);
2233+
2234+ return data;
2235+ }
2236+ }
2237+
2238+ // node representing single scope, with optional sub-scopes (if master scope)
2239+ public class ScopeRegistryNode
2240+ {
2241+ public ScopeMetadata scope_info;
2242+ public GLib.SList<ScopeMetadata?>? sub_scopes;
2243+ }
2244+
2245+ // list of top-level scopes
2246+ private SList<ScopeRegistryNode> scopes_ = new SList<ScopeRegistryNode> ();
2247+ public GLib.SList<ScopeRegistryNode>? scopes
2248+ {
2249+ get { return scopes_; }
2250+ }
2251+
2252+ private ScopeRegistry ()
2253+ {
2254+ }
2255+
2256+ internal static async ScopeMetadata? parse_scope_file (string path, string? master_prefix) throws Error
2257+ {
2258+ debug ("parse_scope_file: %s, master_prefix = %s", path, master_prefix);
2259+
2260+ bool loaded = true;
2261+ ScopeMetadata data = new ScopeMetadata ();
2262+
2263+ var file = new KeyFile ();
2264+ if (GLib.Path.is_absolute (path))
2265+ {
2266+ loaded = file.load_from_file (path, KeyFileFlags.NONE);
2267+ data.full_path = path;
2268+ }
2269+ else
2270+ {
2271+ loaded = file.load_from_data_dirs (path, out data.full_path, KeyFileFlags.NONE);
2272+ }
2273+
2274+ if (!loaded)
2275+ throw new ParseError.FILE_NOT_FOUND ("File not found: %s", path);
2276+
2277+ data.load_from_key_file (file);
2278+
2279+ var basename = GLib.Path.get_basename (path);
2280+ data.id = basename;
2281+ if (master_prefix != null && master_prefix.length > 0)
2282+ data.id = "%s-%s".printf (master_prefix, basename);
2283+
2284+ debug ("parse_scope_file: %s finished", path);
2285+ return data;
2286+ }
2287+
2288+ /**
2289+ * Process .scope file and scopes in a subdirectory if it's master scope.
2290+ *
2291+ * @param filename path of a .scope file
2292+ */
2293+ private async void process_scope (string filename, string? master_scope_prefix = null) throws Error
2294+ {
2295+ debug ("process_scope: %s", filename);
2296+
2297+ ScopeMetadata? scope_data = null;
2298+ scope_data = yield parse_scope_file (filename, master_scope_prefix); // this may throw, in such case don't process this scope (and possibly its subscopes if it was master scope)
2299+
2300+ if (scope_data != null)
2301+ {
2302+ var scope_node = new ScopeRegistryNode ()
2303+ {
2304+ scope_info = scope_data,
2305+ sub_scopes = null
2306+ };
2307+
2308+ if (scope_data.is_master)
2309+ {
2310+ // check if there is a subdirectory with the name of master scope.
2311+ // note that failure on single sub-scope shouldn't disable master & valid sub-scopes.
2312+ var scopefile = GLib.File.new_for_path (scope_data.full_path);
2313+ string scope_name = remove_scope_extension (scope_data.id);
2314+ var parent = scopefile.get_parent ();
2315+ if (parent != null)
2316+ {
2317+ string check_path = Path.build_filename (parent.get_path (), scope_name);
2318+
2319+ if (FileUtils.test (check_path, FileTest.IS_DIR))
2320+ {
2321+ GLib.Dir? scope_subdir = null;
2322+ try
2323+ {
2324+ scope_subdir = GLib.Dir.open (check_path);
2325+ }
2326+ catch (FileError e)
2327+ {
2328+ warning ("Error accessing directory %s", check_path);
2329+ }
2330+
2331+ if (scope_subdir != null)
2332+ {
2333+ // iterate over all files, find .*scope
2334+ string slave_scope_filename;
2335+ while ((slave_scope_filename = scope_subdir.read_name ()) != null)
2336+ {
2337+ slave_scope_filename = Path.build_filename (check_path, slave_scope_filename);
2338+ ScopeMetadata? slave_scope_data = null;
2339+ try
2340+ {
2341+ slave_scope_data = yield parse_scope_file (slave_scope_filename, scope_name);
2342+ }
2343+ catch (Error e)
2344+ {
2345+ warning ("Failed to process '%s': %s", slave_scope_filename, e.message);
2346+ }
2347+ if (slave_scope_data != null)
2348+ {
2349+ if (scope_node.sub_scopes == null)
2350+ scope_node.sub_scopes = new GLib.SList<ScopeMetadata?> ();
2351+
2352+ scope_node.sub_scopes.append (slave_scope_data);
2353+ }
2354+ }
2355+ }
2356+ }
2357+ }
2358+ }
2359+
2360+ scopes_.append (scope_node);
2361+ }
2362+ }
2363+
2364+ /**
2365+ * Build registry of all scopes in start_path.
2366+ * start_path can be a directory, a .scope file path or just scope id (.scope file name, including extenstion).
2367+ *
2368+ * @param start_path starting directory or specific .scope file
2369+ * @return registry of all scopes (if start_path is a dir) or just one scope and its subscopes.
2370+ */
2371+ public static async ScopeRegistry find_scopes (string start_path) throws Error
2372+ {
2373+ var reg = yield find_scopes_for_master (start_path, null);
2374+ return reg;
2375+ }
2376+
2377+ /**
2378+ * Build registry of all scopes in start_path.
2379+ * start_path can be a directory, a .scope file path or just scope id (.scope file name, including extenstion).
2380+ *
2381+ * @param start_path starting directory or specific .scope file
2382+ * @return registry of all scopes (if start_path is a dir) or just one scope and its subscopes.
2383+ */
2384+ private static async ScopeRegistry find_scopes_for_master (string start_path, string? master_prefix) throws Error
2385+ {
2386+ debug ("find_scopes_for_master: %s\n", start_path);
2387+
2388+ var reg = new ScopeRegistry ();
2389+
2390+ if (FileUtils.test (start_path, FileTest.IS_DIR))
2391+ {
2392+ var dir = GLib.Dir.open (start_path);
2393+ string name;
2394+
2395+ while ((name = dir.read_name ()) != null)
2396+ {
2397+ string filename = Path.build_filename (start_path, name);
2398+ if (filename.has_suffix (".scope"))
2399+ {
2400+ debug ("Found scope file: %s", filename);
2401+ try // failure of single scope shouldn't break processing of others scopes
2402+ {
2403+ yield reg.process_scope (filename, master_prefix);
2404+ }
2405+ catch (Error e)
2406+ {
2407+ warning ("Failed to process '%s': %s", filename, e.message);
2408+ }
2409+ }
2410+ }
2411+ }
2412+ else
2413+ {
2414+ if (start_path.has_suffix (".scope"))
2415+ {
2416+ yield reg.process_scope (start_path); // no try-catch here, as request for specific scope file should fail on error
2417+ }
2418+ else
2419+ {
2420+ throw new ParseError.UNKNOWN_FILE ("Unknown file type");
2421+ }
2422+ }
2423+ debug ("find_scopes_for_master finished");
2424+ return reg;
2425+ }
2426+
2427+ internal static string remove_scope_extension (string scope_id)
2428+ {
2429+ if (scope_id.has_suffix (".scope"))
2430+ return scope_id.substring (0, scope_id.last_index_of ("."));
2431+ return scope_id;
2432+ }
2433+
2434+ /**
2435+ * Find sub-scopes for given master scope id in unity/scopes subdirectory
2436+ * of XDG_DATA_DIRS dirs or in root_path.
2437+ * @param scope_id id of a master scope (with or without .scope suffix)
2438+ * @param root_path base directory of scopes, defaults to XDG_DATA_DIRS paths + "/unity/scopes"
2439+ * @return scope registry with scopes property populated with all sub-scopes of the master scope.
2440+ */
2441+ public static async ScopeRegistry find_scopes_for_id (string scope_id, string? root_path = null) throws Error
2442+ {
2443+ debug ("find_scopes_for_id: %s", scope_id);
2444+
2445+ string[]? dirs = null;
2446+ if (root_path == null)
2447+ {
2448+ dirs = GLib.Environment.get_system_data_dirs ();
2449+ }
2450+ else
2451+ {
2452+ dirs = new string [1] {root_path};
2453+ }
2454+
2455+ if (dirs == null || dirs.length == 0)
2456+ {
2457+ throw new ParseError.INVALID_PATH ("Invalid scopes path");
2458+ }
2459+
2460+ var sc = remove_scope_extension (scope_id);
2461+ foreach (var path in dirs)
2462+ {
2463+ var check_path = root_path == null ? Path.build_path (Path.DIR_SEPARATOR_S, path, SCOPES_DIR, sc) : Path.build_path (Path.DIR_SEPARATOR_S, root_path, sc);
2464+ if (FileUtils.test (check_path, FileTest.IS_DIR))
2465+ {
2466+ var reg = yield find_scopes_for_master (check_path, sc);
2467+ return reg;
2468+ }
2469+ }
2470+
2471+ debug ("No sub-scopes directory found for master scope %s", scope_id);
2472+ return new ScopeRegistry ();
2473+ }
2474+ }
2475+} /* namespace unity */
2476
2477=== modified file 'protocol/protocol-scope-interface.vala'
2478--- protocol/protocol-scope-interface.vala 2012-09-03 09:55:45 +0000
2479+++ protocol/protocol-scope-interface.vala 2013-05-08 13:19:27 +0000
2480@@ -1,5 +1,5 @@
2481 /*
2482- * Copyright (C) 2011 Canonical, Ltd.
2483+ * Copyright (C) 2011-2012 Canonical, Ltd.
2484 *
2485 * This library is free software; you can redistribute it and/or modify
2486 * it under the terms of the GNU Lesser General Public License
2487@@ -15,7 +15,7 @@
2488 * <http://www.gnu.org/licenses/>.
2489 *
2490 * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
2491- *
2492+ * Michal Hruby <michal.hruby@canonical.com>
2493 */
2494
2495 using GLib;
2496@@ -24,18 +24,6 @@
2497 namespace Unity.Protocol {
2498
2499 /* The raw structs that get's passed over DBus to/from the parent Lens */
2500-public struct ScopeInfo
2501-{
2502- public string dbus_path;
2503- public Variant sources;
2504- public bool search_in_global;
2505- public string private_connection_name;
2506- public string results_model_name;
2507- public string global_results_model_name;
2508- public string filters_model_name;
2509- public HashTable<string, Variant> hints;
2510-}
2511-
2512 public struct ActivationReplyRaw
2513 {
2514 public string uri;
2515@@ -43,11 +31,53 @@
2516 public HashTable<string, Variant> hints;
2517 }
2518
2519+public enum HandledType
2520+{
2521+ NOT_HANDLED,
2522+ SHOW_DASH,
2523+ HIDE_DASH,
2524+ GOTO_DASH_URI,
2525+ SHOW_PREVIEW
2526+}
2527+
2528+public enum ActionType
2529+{
2530+ ACTIVATE_RESULT,
2531+ PREVIEW_RESULT,
2532+ PREVIEW_ACTION,
2533+ PREVIEW_BUILTIN_ACTION
2534+}
2535+
2536+public enum ViewType
2537+{
2538+ HIDDEN,
2539+ HOME_VIEW,
2540+ LENS_VIEW
2541+}
2542+
2543+public enum ChannelType
2544+{
2545+ DEFAULT,
2546+ GLOBAL
2547+}
2548+
2549+[Flags]
2550+public enum ChannelFlags
2551+{
2552+ NONE = 0,
2553+ PRIVATE,
2554+ NO_FILTERING
2555+}
2556+
2557 /* The error types that can be thrown from DBus methods */
2558 [DBus (name = "com.canonical.Unity.ScopeError")]
2559 public errordomain ScopeError
2560 {
2561+ REQUEST_FAILED,
2562+ DATA_MISMATCH,
2563+ INVALID_CHANNEL,
2564 SEARCH_CANCELLED,
2565+ DISABLED_CONTENT,
2566 UNKNOWN
2567 }
2568
2569@@ -59,27 +89,64 @@
2570 [DBus (name = "com.canonical.Unity.Scope")]
2571 public interface ScopeService : GLib.Object
2572 {
2573- public abstract async void info_request () throws IOError;
2574+ public const string INTERFACE_NAME = "com.canonical.Unity.Scope";
2575
2576+ /* Methods */
2577 public abstract async ActivationReplyRaw activate (
2578- string uri, uint action_type, HashTable<string, Variant> hints) throws IOError;
2579-
2580- public abstract async HashTable<string, Variant> update_preview_property (
2581- string uri, HashTable<string, Variant> values) throws IOError;
2582+ string channel_id,
2583+ Variant[] result_arr,
2584+ uint action_type,
2585+ HashTable<string, Variant> hints,
2586+ Cancellable? cancellable = null) throws IOError, ScopeError;
2587
2588 public abstract async HashTable<string, Variant> search (
2589- string search_string,
2590- HashTable<string, Variant> hints) throws IOError, ScopeError;
2591-
2592- public abstract async HashTable<string, Variant> global_search (
2593- string search_string,
2594- HashTable<string, Variant> hints) throws IOError, ScopeError;
2595-
2596+ string channel_id,
2597+ string search_string,
2598+ HashTable<string, Variant> hints,
2599+ Cancellable? cancellable = null) throws IOError, ScopeError;
2600+
2601+ public abstract async string open_channel (
2602+ uint channel_type,
2603+ HashTable<string, Variant> hints,
2604+ Cancellable? cancellable = null,
2605+ out HashTable<string, Variant> out_hints) throws IOError;
2606+
2607+ public abstract async void close_channel (
2608+ string channel_id,
2609+ HashTable<string, Variant> hints,
2610+ Cancellable? cancellable = null) throws IOError, ScopeError;
2611+
2612+ public abstract async HashTable<string, Variant> push_results (
2613+ string channel_id,
2614+ string search_string,
2615+ string source_scope_id,
2616+ Variant result_variant,
2617+ string[] categories,
2618+ Cancellable? cancellable = null) throws IOError, ScopeError;
2619+
2620+ /* do we still need this? */
2621 public abstract async void set_view_type (uint view_type) throws IOError;
2622
2623- public abstract async void set_active_sources (string[] sources) throws IOError;
2624-
2625- public signal void changed (ScopeInfo lens_info);
2626+ /* Signals */
2627+ public signal void category_order_changed (
2628+ string channel_id, uint32[] new_order);
2629+
2630+ public signal void filter_settings_changed (
2631+ string channel_id,
2632+ [DBus (signature = "a(ssssa{sv}bbb)")] Variant filter_rows);
2633+
2634+ public signal void results_invalidated (uint channel_type);
2635+
2636+ /* Properties */
2637+ public abstract int protocol_version { get; }
2638+ public abstract bool visible { get; }
2639+ public abstract bool is_master { get; }
2640+ public abstract string search_hint { owned get; }
2641+ public abstract HashTable<string, string> metadata { owned get; }
2642+ public abstract HashTable<string, string> optional_metadata { owned get; }
2643+ public abstract Variant categories { owned get; }
2644+ public abstract Variant filters { owned get; }
2645+ public abstract HashTable<string, Variant> hints { owned get; }
2646 }
2647
2648 } /* namespace unity */
2649
2650=== renamed file 'src/unity-scope-proxy-remote.vala' => 'protocol/unity-scope-proxy-remote.vala'
2651--- src/unity-scope-proxy-remote.vala 2012-09-03 09:55:45 +0000
2652+++ protocol/unity-scope-proxy-remote.vala 2013-05-08 13:19:27 +0000
2653@@ -20,119 +20,220 @@
2654
2655 using GLib;
2656 using Dee;
2657-using Unity.Protocol;
2658
2659-namespace Unity {
2660+namespace Unity.Protocol {
2661
2662 private class ScopeProxyRemote : GLib.Object, ScopeProxy
2663 {
2664+ const int REQUIRED_PROTOCOL_VERSION = 1;
2665+
2666 public string dbus_name { get; construct; }
2667 public string dbus_path { get; construct; }
2668-
2669- public OptionsFilter sources { get; set; }
2670- public bool search_in_global { get; set; }
2671- public bool provides_personal_content { get; set; }
2672-
2673- public Dee.SerializableModel results_model {
2674- get { return _results_model; }
2675- set {
2676- _results_model = value as Dee.SharedModel;
2677- }
2678- }
2679-
2680- public Dee.SerializableModel global_results_model {
2681- get { return _global_results_model; }
2682- set {
2683- _global_results_model = value as Dee.SharedModel;
2684- }
2685- }
2686-
2687- public Dee.SerializableModel filters_model {
2688- get { return _filters_model; }
2689- set {
2690- _filters_model = value as Dee.SharedModel;
2691- }
2692- }
2693+ public bool auto_reconnect { get; set; default = true; }
2694+
2695+ // really Vala? no "private set;" when inheriting from interface?
2696+ public bool visible { get { return _visible; } }
2697+ public bool is_master { get { return _is_master; } }
2698+ public bool connected { get { return _is_connected; } }
2699+ public Variant sources { get { return _sources; } }
2700+ public string search_hint { get { return _search_hint; } }
2701+ public Dee.SerializableModel filters_model { get { return _filters_model; } }
2702+ public Dee.SerializableModel categories_model { get { return _categories_model; } }
2703+ public HashTable<string, string> metadata { get { return _metadata; } }
2704+ public HashTable<string, string> optional_metadata { get { return _optional_metadata; } }
2705
2706 public ViewType view_type {
2707+ // FIXME: ehm?!
2708 get { return _view_type; }
2709 // make sure we do dbus calls only on changes
2710- set { if (_view_type != value) set_view_type (value); }
2711+ set { if (_view_type != value) set_view_type.begin (value); }
2712 }
2713
2714+ private bool _visible;
2715+ private bool _is_master;
2716+ private bool _is_connected;
2717+ private Variant _sources;
2718+ private string _search_hint;
2719+ private Dee.SerializableModel _filters_model;
2720+ private Dee.SerializableModel _categories_model;
2721+ private HashTable<string, string> _metadata;
2722+ private HashTable<string, string> _optional_metadata;
2723 private ViewType _view_type;
2724 private DBusConnection _bus;
2725- private uint _watcher;
2726
2727 private ScopeService _service;
2728+ private bool _connecting_to_proxy;
2729
2730- private Dee.SharedModel? _results_model;
2731- private Dee.SharedModel? _global_results_model;
2732- private Dee.SharedModel? _filters_model;
2733 private uint _reconnection_id = 0;
2734- private bool synchronized = false;
2735 private int64 _last_scope_crash = 0;
2736 private uint _scope_crashes = 0;
2737+ private ulong _cat_sig_id = 0;
2738+ private ulong _filters_sig_id = 0;
2739+ private ulong _results_invalidated_sig_id = 0;
2740
2741- public ScopeProxyRemote (string dbus_name_, string dbus_path_)
2742+ private ScopeProxyRemote (string dbus_name_, string dbus_path_)
2743 {
2744 Object (dbus_name:dbus_name_, dbus_path:dbus_path_);
2745 }
2746
2747+ /* Vala increments reference count on objects that are associated with
2748+ * the callbacks in watch_name, therefore this object serves as a proxy, so
2749+ * that the ScopeProxyRemote instance can be safely reference counted */
2750+ private class NameWatcher
2751+ {
2752+ private uint watch_id;
2753+ unowned ScopeProxyRemote owner;
2754+
2755+ public NameWatcher (DBusConnection bus, string dbus_name,
2756+ ScopeProxyRemote parent, bool auto_start)
2757+ {
2758+ owner = parent;
2759+ var flags = auto_start ?
2760+ BusNameWatcherFlags.AUTO_START : BusNameWatcherFlags.NONE;
2761+ watch_id =
2762+ Bus.watch_name_on_connection (bus, dbus_name, flags,
2763+ () => { owner.on_scope_appeared (); },
2764+ () => { owner.on_scope_vanished (); });
2765+ }
2766+
2767+ public void unwatch ()
2768+ {
2769+ if (watch_id != 0)
2770+ {
2771+ Bus.unwatch_name (watch_id);
2772+ watch_id = 0;
2773+ }
2774+ }
2775+ }
2776+
2777+ private NameWatcher _watcher;
2778+
2779 construct
2780 {
2781- sources = new CheckOptionFilter ("sources", "Sources", null, true);
2782 try {
2783 _bus = Bus.get_sync (BusType.SESSION);
2784- _watcher = Bus.watch_name_on_connection (_bus,
2785- dbus_name,
2786- BusNameWatcherFlags.NONE,
2787- on_scope_appeared,
2788- on_scope_vanished);
2789-
2790- /* If it doesn't exist when we load up, start it */
2791- start_reconnection_timeout ();
2792+ // auto starting the service here
2793+ _watcher = new NameWatcher (_bus, dbus_name, this, true);
2794 } catch (Error e) {
2795- critical (@"Unable to connect to session bus: $(e.message)");
2796+ critical ("Unable to connect to session bus: %s", e.message);
2797+ }
2798+ }
2799+
2800+ ~ScopeProxyRemote ()
2801+ {
2802+ _watcher.unwatch ();
2803+ }
2804+
2805+ // poor man's AsyncInitable
2806+ public static async ScopeProxyRemote create (
2807+ string dbus_name, string dbus_path,
2808+ Cancellable? cancellable = null) throws Error
2809+ {
2810+ // this will always return a valid object, even if the proxy is invalid
2811+ // (well unless you cancel the request)
2812+ var proxy = new ScopeProxyRemote (dbus_name, dbus_path);
2813+ yield proxy.wait_for_proxy ();
2814+
2815+ if (cancellable != null) cancellable.set_error_if_cancelled ();
2816+ return proxy;
2817+ }
2818+
2819+ private signal void proxy_initialized ();
2820+
2821+ private async void wait_for_proxy ()
2822+ {
2823+ if (_service == null)
2824+ {
2825+ var sig_id = this.proxy_initialized.connect (() =>
2826+ {
2827+ wait_for_proxy.callback ();
2828+ });
2829+
2830+ yield;
2831+
2832+ SignalHandler.disconnect (this, sig_id);
2833 }
2834 }
2835
2836 private async void connect_to_scope ()
2837 {
2838- try {
2839+ if (_connecting_to_proxy) return; // can't call this multiple times
2840+ try
2841+ {
2842+ _connecting_to_proxy = true;
2843 _service = yield _bus.get_proxy (dbus_name, dbus_path);
2844- _service.changed.connect (on_changed);
2845- yield _service.info_request ();
2846-
2847+ // FIXME: do we need to connect to any property changes?
2848+ DBusProxy proxy = _service as DBusProxy;
2849+ _is_connected = proxy.g_name_owner != null;
2850+ if (_is_connected)
2851+ {
2852+ if (_service.protocol_version < REQUIRED_PROTOCOL_VERSION)
2853+ throw new ScopeError.UNKNOWN ("Unsupported scope proxy");
2854+ _is_master = _service.is_master;
2855+ _visible = _service.visible;
2856+ _search_hint = _service.search_hint;
2857+ _metadata = _service.metadata;
2858+ _optional_metadata = _service.optional_metadata;
2859+ _categories_model = Dee.Serializable.parse (_service.categories, typeof (Dee.SequenceModel)) as Dee.SerializableModel;
2860+ _filters_model = Dee.Serializable.parse (_service.filters, typeof (Dee.SequenceModel)) as Dee.SerializableModel;
2861+ _cat_sig_id = _service.category_order_changed.connect (on_category_order_changed);
2862+ _filters_sig_id = _service.filter_settings_changed.connect (on_filter_settings_changed);
2863+ _results_invalidated_sig_id = _service.results_invalidated.connect (on_results_invalidated);
2864+ // do we need hints?
2865+ }
2866+ proxy.g_properties_changed.connect (properties_changed);
2867 } catch (Error e) {
2868- warning (@"Unable to connect to Scope ($dbus_path @ $dbus_name): $(e.message)");
2869+ _is_connected = false;
2870+ warning ("Unable to connect to Scope (%s @ %s): %s",
2871+ dbus_path, dbus_name, e.message);
2872+ }
2873+ _connecting_to_proxy = false;
2874+ notify_property ("connected");
2875+
2876+ proxy_initialized ();
2877+ }
2878+
2879+ private void properties_changed (DBusProxy proxy,
2880+ Variant changed_properties,
2881+ [CCode (array_length = false, array_null_terminated = true)] string[] invalidated_properties)
2882+ {
2883+ var iter = new VariantIter (changed_properties);
2884+ unowned string prop_name;
2885+ Variant prop_value;
2886+ while (iter.next ("{&sv}", out prop_name, out prop_value))
2887+ {
2888+ if (prop_name == "Filters")
2889+ this.notify_property ("filters-model");
2890+ else if (prop_name == "Categories")
2891+ this.notify_property ("categories-model");
2892 }
2893 }
2894
2895- private void on_scope_appeared (DBusConnection conn,
2896- string name,
2897- string name_owner)
2898- {
2899- Trace.log_object (this, "Scope appeared: %s", dbus_name);
2900+ private void on_category_order_changed (string channel_id, uint32[] new_order)
2901+ {
2902+ category_order_changed (channel_id, new_order);
2903+ }
2904+
2905+ private void on_filter_settings_changed (string channel_id, Variant filter_rows)
2906+ {
2907+ filter_settings_changed (channel_id, filter_rows);
2908+ }
2909+
2910+ private void on_results_invalidated (uint channel_type)
2911+ {
2912+ results_invalidated ((ChannelType) channel_type);
2913+ }
2914+
2915+ public void on_scope_appeared ()
2916+ {
2917 if (_reconnection_id != 0)
2918 Source.remove (_reconnection_id);
2919 connect_to_scope.begin ();
2920 }
2921
2922- private void on_scope_vanished (DBusConnection conn,
2923- string name)
2924+ public void on_scope_vanished ()
2925 {
2926- Trace.log_object (this, "Scope vanished: %s", dbus_name);
2927-
2928- synchronized = false;
2929- search_in_global = false;
2930- provides_personal_content = false;
2931- sources = new CheckOptionFilter ("sources", "Sources", null, true);
2932- if (_results_model != null)
2933- _results_model.clear ();
2934-
2935- if (_global_results_model != null)
2936- _global_results_model.clear ();
2937+ //sources = new CheckOptionFilter ("sources", "Sources", null, true);
2938
2939 /* No need to clear the filters model, it's read-only for the scope and
2940 * it would just cause warnings from filters synchronizer */
2941@@ -140,6 +241,24 @@
2942
2943 if (_service != null)
2944 {
2945+ if (_cat_sig_id > 0)
2946+ {
2947+ SignalHandler.disconnect (_service, _cat_sig_id);
2948+ _cat_sig_id = 0;
2949+ }
2950+
2951+ if (_filters_sig_id > 0)
2952+ {
2953+ SignalHandler.disconnect (_service, _filters_sig_id);
2954+ _filters_sig_id = 0;
2955+ }
2956+
2957+ if (_results_invalidated_sig_id > 0)
2958+ {
2959+ SignalHandler.disconnect (_service, _results_invalidated_sig_id);
2960+ _results_invalidated_sig_id = 0;
2961+ }
2962+
2963 /* Here comes the protected-restarting logic - the scope will be
2964 * restarted unless it crashed more than 10 times during the past
2965 * 15 minutes */
2966@@ -166,6 +285,11 @@
2967 {
2968 start_reconnection_timeout ();
2969 }
2970+
2971+ _is_connected = false;
2972+ // notify users that all associated channels are no longer valid
2973+ channels_invalidated ();
2974+ notify_property ("connected");
2975 }
2976
2977 private void start_reconnection_timeout ()
2978@@ -173,165 +297,122 @@
2979 if (_reconnection_id != 0)
2980 Source.remove (_reconnection_id);
2981
2982+ if (!auto_reconnect) return;
2983+
2984 _reconnection_id = Timeout.add_seconds (2, () =>
2985 {
2986 if (_service == null)
2987- connect_to_scope ();
2988+ connect_to_scope.begin ();
2989 else if ((_service as DBusProxy).g_name_owner == null)
2990- _service.info_request (); // ping the service to autostart it
2991+ close_channel.begin (""); // ping the service to autostart it
2992
2993 _reconnection_id = 0;
2994 return false;
2995 });
2996 }
2997
2998+ private void check_proxy () throws Error
2999+ {
3000+ // we have NameWatcher and will try to reconnect once the name appears
3001+ if (_service == null)
3002+ throw new DBusError.SERVICE_UNKNOWN ("Unable to connect to service");
3003+ }
3004+
3005 /*
3006 * Implementation of the ScopeService interface
3007 */
3008- public async ActivationReplyRaw activate (string uri, ActionType action_type,
3009- HashTable<string, Variant> hints)
3010- {
3011- if (synchronized)
3012- {
3013- try {
3014- var raw = yield _service.activate (uri, (uint) action_type, hints);
3015- return raw;
3016- } catch (Error e) {
3017- warning (@"Unable to search scope ($dbus_path): $(e.message)");
3018- }
3019- }
3020- return ActivationReplyRaw ();
3021- }
3022-
3023- public async HashTable<string, Variant> update_preview_property (
3024- string uri, HashTable<string, Variant> values) throws IOError
3025- {
3026- if (synchronized)
3027- {
3028- try {
3029- var raw = yield _service.update_preview_property (uri, values);
3030- return raw;
3031- } catch (Error e) {
3032- warning (@"Unable to update_preview_property ($dbus_path): $(e.message)");
3033- }
3034- }
3035-
3036- return new HashTable<string, Variant> (str_hash, str_equal);
3037+ public async ActivationReplyRaw activate (
3038+ string channel_id,
3039+ Variant[] result_arr, ActionType action_type,
3040+ HashTable<string, Variant> hints,
3041+ Cancellable? cancellable) throws Error
3042+ {
3043+ check_proxy ();
3044+ var raw = yield _service.activate (channel_id, result_arr,
3045+ (uint) action_type, hints,
3046+ cancellable);
3047+ return raw;
3048 }
3049
3050 public async HashTable<string, Variant> search (
3051- string search_string, HashTable<string, Variant> hints)
3052- {
3053- if (synchronized)
3054- {
3055- try {
3056- var ht = yield _service.search (search_string, hints);
3057- return ht;
3058- } catch (ScopeError.SEARCH_CANCELLED scope_error) {
3059- // that's fine
3060- } catch (Error e) {
3061- warning (@"Unable to search scope ($dbus_path - '$search_string'): $(e.message)");
3062- }
3063- }
3064-
3065- return new HashTable<string, Variant> (str_hash, str_equal);
3066- }
3067-
3068- public async HashTable<string, Variant> global_search (
3069- string search_string, HashTable<string, Variant> hints)
3070- {
3071- if (synchronized)
3072- {
3073- try {
3074- var result = yield _service.global_search (search_string, hints);
3075- return result;
3076- } catch (ScopeError.SEARCH_CANCELLED scope_error) {
3077- // that's fine
3078- } catch (Error e) {
3079- warning (@"Unable to global_search scope ($dbus_path - '$search_string'): $(e.message)");
3080- }
3081- }
3082-
3083- return new HashTable<string, Variant> (str_hash, str_equal);
3084+ string channel_id, string search_string,
3085+ HashTable<string, Variant> hints,
3086+ Cancellable? cancellable) throws Error
3087+ {
3088+ check_proxy ();
3089+ var ht = yield _service.search (channel_id, search_string, hints,
3090+ cancellable);
3091+ return ht;
3092+ }
3093+
3094+ public async string open_channel (
3095+ ChannelType channel_type,
3096+ ChannelFlags channel_flags,
3097+ Cancellable? cancellable,
3098+ out Dee.SerializableModel results_model) throws Error
3099+ {
3100+ check_proxy ();
3101+ var hints = new HashTable<string, Variant> (str_hash, str_equal);
3102+ bool private_channel = ChannelFlags.PRIVATE in channel_flags;
3103+ if (private_channel)
3104+ hints["private-channel"] = new Variant.boolean (true);
3105+
3106+ HashTable<string, Variant> out_hints;
3107+ var channel_id = yield _service.open_channel ((uint) channel_type, hints,
3108+ cancellable,
3109+ out out_hints);
3110+ Dee.Peer peer = private_channel ?
3111+ new Dee.Client (out_hints["model-swarm-name"].get_string ()) :
3112+ new Dee.Peer (out_hints["model-swarm-name"].get_string ());
3113+ var model = new Dee.SharedModel.for_peer (peer);
3114+ results_model = model;
3115+
3116+ return channel_id;
3117+ }
3118+
3119+ public async void close_channel (
3120+ string channel_id,
3121+ Cancellable? cancellable) throws Error
3122+ {
3123+ check_proxy ();
3124+ var hints = new HashTable<string, Variant> (str_hash, str_equal);
3125+ yield _service.close_channel (channel_id, hints, cancellable);
3126 }
3127
3128 public async void set_view_type (ViewType view_type)
3129 {
3130 _view_type = view_type;
3131- if (synchronized)
3132- {
3133- try {
3134- // FIXME: no need to set HOME_VIEW if !search_in_global
3135- yield _service.set_view_type (view_type);
3136- } catch (Error e) {
3137- warning (@"Unable to set_active ($dbus_path): $(e.message)");
3138- }
3139+ try {
3140+ check_proxy ();
3141+ // FIXME: no need to set HOME_VIEW if !search_in_global
3142+ yield _service.set_view_type (view_type);
3143+ } catch (Error e) {
3144+ warning (@"Unable to set_active ($dbus_path): $(e.message)");
3145 }
3146 }
3147
3148- public async void set_active_sources (string[] sources)
3149+ public async void set_active_sources (
3150+ string channel_id,
3151+ string[] sources,
3152+ Cancellable? cancellable) throws Error
3153 {
3154- if (synchronized)
3155- {
3156- try {
3157- yield _service.set_active_sources (sources);
3158- } catch (Error e) {
3159- warning (@"Unable to set_sources ($dbus_path): $(e.message)");
3160- }
3161- }
3162+ check_proxy ();
3163+ // FIXME: remove from ScopeProxy?
3164+ if (cancellable != null) cancellable.set_error_if_cancelled ();
3165 }
3166
3167- /* This is where we figure out the diff between states */
3168- public void on_changed (ScopeInfo scope_info)
3169+ public async HashTable<string, Variant> push_results (
3170+ string channel_id,
3171+ string search_string,
3172+ string source_scope_id,
3173+ Dee.SerializableModel model,
3174+ string[] categories,
3175+ GLib.Cancellable? cancellable = null) throws Error
3176 {
3177- if (dbus_path != scope_info.dbus_path)
3178- {
3179- warning (@"Unable to handle Scope changed signal: dbus_path mismatch. Expected $dbus_path got $(scope_info.dbus_path)");
3180- return;
3181- }
3182- Trace.log_object (this, "Processing changed signal for %s", dbus_path);
3183- search_in_global = scope_info.search_in_global;
3184-
3185- if (scope_info.hints.contains ("provides-personal-content"))
3186- {
3187- provides_personal_content = scope_info.hints["provides-personal-content"].get_boolean ();
3188- }
3189- else
3190- {
3191- provides_personal_content = false;
3192- }
3193-
3194- if (results_model == null ||
3195- _results_model.get_swarm_name () != scope_info.results_model_name)
3196- {
3197- results_model = new Dee.SharedModel (scope_info.results_model_name);
3198- results_model.set_schema ("s", "s", "u", "s", "s", "s", "s");
3199- }
3200-
3201- if (global_results_model == null ||
3202- _global_results_model.get_swarm_name () != scope_info.global_results_model_name)
3203- {
3204- global_results_model = new Dee.SharedModel (scope_info.global_results_model_name);
3205- global_results_model.set_schema ("s", "s", "u", "s", "s", "s", "s");
3206- }
3207-
3208- if (filters_model == null ||
3209- _filters_model.get_swarm_name () != scope_info.filters_model_name)
3210- {
3211- filters_model = new Dee.SharedModel (scope_info.filters_model_name);
3212- filters_model.set_schema ("s", "s", "s", "s", "a{sv}", "b", "b", "b");
3213- }
3214-
3215- /* extract the sources */
3216- sources.update (scope_info.sources);
3217- this.notify_property ("sources");
3218-
3219- if (!synchronized)
3220- {
3221- synchronized = true;
3222- set_view_type (_view_type);
3223- // FIXME: make sure active_sources are set, dispatch last (missed) search
3224- }
3225+ check_proxy ();
3226+ return yield _service.push_results (channel_id, search_string,
3227+ source_scope_id, model.serialize (),
3228+ categories, cancellable);
3229 }
3230 }
3231
3232
3233=== renamed file 'src/unity-scope-proxy.vala' => 'protocol/unity-scope-proxy.vala'
3234--- src/unity-scope-proxy.vala 2012-09-03 09:55:45 +0000
3235+++ protocol/unity-scope-proxy.vala 2013-05-08 13:19:27 +0000
3236@@ -1,5 +1,5 @@
3237 /*
3238- * Copyright (C) 2011 Canonical, Ltd.
3239+ * Copyright (C) 2012 Canonical, Ltd.
3240 *
3241 * This library is free software; you can redistribute it and/or modify
3242 * it under the terms of the GNU Lesser General Public License
3243@@ -14,39 +14,101 @@
3244 * License along with this library. If not, see
3245 * <http://www.gnu.org/licenses/>.
3246 *
3247- * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
3248+ * Authored by Michal Hruby <michal.hruby@canonical.com>
3249 *
3250 */
3251
3252 using GLib;
3253 using Unity.Protocol;
3254
3255-namespace Unity {
3256+namespace Unity.Protocol {
3257
3258 /*
3259 * Proxies a Scope from DBus
3260 */
3261
3262-private abstract interface ScopeProxy : GLib.Object
3263+public abstract interface ScopeProxy : GLib.Object
3264 {
3265- public abstract OptionsFilter sources { get; set; }
3266- public abstract bool search_in_global { get; set; }
3267- public abstract bool provides_personal_content { get; set; }
3268+ public abstract bool visible { get; }
3269+ public abstract bool is_master { get; }
3270+ public abstract bool connected { get; }
3271+ public abstract string search_hint { get; }
3272 public abstract ViewType view_type { get; set; }
3273- public abstract Dee.SerializableModel results_model { get; set; }
3274- public abstract Dee.SerializableModel global_results_model { get; set; }
3275- public abstract Dee.SerializableModel filters_model { get; set; }
3276-
3277- public abstract async ActivationReplyRaw activate (string uri,
3278- ActionType action_type,
3279- HashTable<string, Variant> hints);
3280- public abstract async HashTable<string, Variant> update_preview_property (
3281- string uri, HashTable<string, Variant> values) throws IOError;
3282+ public abstract Dee.SerializableModel filters_model { get; }
3283+ public abstract Dee.SerializableModel categories_model { get; }
3284+ /* no access to Filter class in proto lib */
3285+ public abstract Variant sources { get; }
3286+ public abstract HashTable<string, string> metadata { get; }
3287+ public abstract HashTable<string, string> optional_metadata { get; }
3288+
3289+ public signal void category_order_changed (
3290+ string channel_id, uint32[] new_order);
3291+
3292+ public signal void filter_settings_changed (
3293+ string channel_id, Variant filter_rows);
3294+
3295+ public signal void results_invalidated (ChannelType channel_type);
3296+
3297+ public abstract async ActivationReplyRaw activate (
3298+ string channel_id,
3299+ Variant[] result_arr,
3300+ ActionType action_type,
3301+ HashTable<string, Variant> hints,
3302+ Cancellable? cancellable = null) throws Error;
3303+
3304 public abstract async HashTable<string, Variant> search (
3305- string search_string, HashTable<string, Variant> hints);
3306- public abstract async HashTable<string, Variant> global_search (
3307- string search_string, HashTable<string, Variant> hints);
3308- public abstract async void set_active_sources (string[] sources);
3309+ string channel_id,
3310+ string search_string,
3311+ HashTable<string, Variant> hints,
3312+ Cancellable? cancellable = null) throws Error;
3313+
3314+ public abstract async string open_channel (
3315+ ChannelType channel_type,
3316+ ChannelFlags channel_flags,
3317+ Cancellable? cancellable = null,
3318+ out Dee.SerializableModel results_model) throws Error;
3319+
3320+ public abstract async void close_channel (
3321+ string channel_id,
3322+ Cancellable? cancellable = null) throws Error;
3323+
3324+ public signal void channels_invalidated ();
3325+
3326+ public abstract async void set_active_sources (
3327+ string channel_id,
3328+ string[] sources,
3329+ Cancellable? cancellable = null) throws Error;
3330+
3331+ public abstract async HashTable<string, Variant> push_results (
3332+ string channel_id,
3333+ string search_string,
3334+ string source_scope_id,
3335+ Dee.SerializableModel model,
3336+ string[] categories,
3337+ GLib.Cancellable? cancellable = null) throws Error;
3338+
3339+ public static async ScopeProxy new_for_id (
3340+ string id, Cancellable? cancellable = null) throws Error
3341+ {
3342+ throw new IOError.FAILED ("Unimplemented!");
3343+ }
3344+
3345+ public static async ScopeProxy new_from_dbus (
3346+ string dbus_name, string dbus_path,
3347+ Cancellable? cancellable = null) throws Error
3348+ {
3349+ var proxy = yield ScopeProxyRemote.create (dbus_name, dbus_path, cancellable);
3350+ return proxy;
3351+ }
3352+
3353+ public static async ScopeProxy new_from_metadata (
3354+ ScopeRegistry.ScopeMetadata metadata,
3355+ Cancellable? cancellable = null) throws Error
3356+ {
3357+ // FIXME: this is a place where we could use local proxies too
3358+ var proxy = yield ScopeProxyRemote.create (metadata.dbus_name, metadata.dbus_path, cancellable);
3359+ return proxy;
3360+ }
3361 }
3362
3363 } /* namespace */
3364
3365=== modified file 'src/Makefile.am'
3366--- src/Makefile.am 2012-10-16 15:33:50 +0000
3367+++ src/Makefile.am 2013-05-08 13:19:27 +0000
3368@@ -2,7 +2,7 @@
3369 BUILT_SOURCES =
3370 CLEANFILES =
3371 EXTRA_DIST =
3372-EXTRA_FLAGS =
3373+EXTRA_FLAGS = -g
3374
3375 lib_LTLIBRARIES = \
3376 libunity.la \
3377@@ -12,7 +12,7 @@
3378 # Headers, vapi, and gir
3379 ##
3380 unityincludedir = $(includedir)/unity/unity
3381-nodist_unityinclude_HEADERS = unity.h
3382+nodist_unityinclude_HEADERS = unity.h lttng-component-provider.h
3383 dist_unityinclude_HEADERS = unity-trace.h
3384
3385 unityvapidir = $(datadir)/vala/vapi
3386@@ -42,6 +42,10 @@
3387 EXTRA_FLAGS += -DENABLE_UNITY_TRACE_LOG
3388 endif
3389
3390+if ENABLE_LTTNG
3391+ EXTRA_FLAGS += -DENABLE_LTTNG
3392+endif
3393+
3394 ##
3395 # libunity
3396 ##
3397@@ -71,6 +75,7 @@
3398 --library unity \
3399 --internal-vapi=unity-internal.vapi \
3400 --internal-header=unity-internal.h \
3401+ --target-glib=2.32 \
3402 --thread \
3403 --use-header \
3404 --vapidir $(top_srcdir)/vapi \
3405@@ -85,7 +90,8 @@
3406 nodist_libunity_la_SOURCES = $(libunity_la_VALASOURCES:.vala=.c)
3407 dist_libunity_la_SOURCES = \
3408 unity-trace.c \
3409- unity-trace.h
3410+ unity-trace.h \
3411+ lttng-component-provider.h
3412
3413 libunity_la_VALASOURCES = \
3414 unity-appinfo-manager.vala \
3415@@ -93,24 +99,26 @@
3416 unity-inspector.vala \
3417 unity-io.vala \
3418 unity-launcher.vala \
3419- unity-lens.vala \
3420- unity-lens-activation.vala \
3421- unity-lens-category.vala \
3422- unity-lens-filters.vala \
3423- unity-lens-merge-strategy.vala \
3424- unity-lens-preferences-manager.vala \
3425- unity-lens-private.vala \
3426- unity-lens-search.vala \
3427- unity-lens-tools.vala \
3428+ unity-category.vala \
3429+ unity-filters.vala \
3430+ unity-preferences-manager.vala \
3431+ unity-search.vala \
3432+ unity-merge-strategy.vala \
3433+ unity-synchronizer.vala \
3434 unity-previews.vala \
3435- unity-scope.vala \
3436- unity-scope-factory.vala \
3437- unity-scope-private.vala \
3438- unity-scope-proxy.vala \
3439- unity-scope-proxy-local.vala \
3440- unity-scope-proxy-remote.vala \
3441+ unity-result-activation.vala \
3442+ unity-scope-interface.vala \
3443+ unity-scope-dbus-connector.vala \
3444+ unity-scope-dbus-impl.vala \
3445+ unity-scope-channel.vala \
3446+ unity-deprecated-scope.vala \
3447+ unity-deprecated-scope-impl.vala \
3448+ unity-aggregator-scope.vala \
3449+ unity-aggregator-scope-private.vala \
3450+ unity-master-scope.vala \
3451 unity-sound-menu.vala \
3452 unity-sound-menu-mpris.vala \
3453+ unity-utils.vala \
3454 $(NULL)
3455
3456 libunity_la_GENERATED = \
3457@@ -130,11 +138,13 @@
3458 # The second is there because forced cname in Vala is not properly propagated
3459 # into the gir file. Need https://bugzilla.gnome.org/show_bug.cgi?id=681356
3460 #
3461+# And the third because we need to specify scope manually.
3462+#
3463 libunity_la_vala.stamp: $(libunity_la_VALASOURCES)
3464 $(AM_V_GEN) $(VALAC) $(libunity_la_VALAFLAGS) $^
3465 @sed -i -e 's/<namespace name="Unity" version="@GIR_VERSION@" c:prefix="Unity">/<namespace name="Unity" version="@GIR_VERSION@" c:prefix="Unity" shared-library="libunity.so.@LIBUNITY_LT_CURRENT@">/g' Unity-@GIR_VERSION@.gir
3466- @sed -i -e 's/emit_finished/finished/g' Unity-@GIR_VERSION@.gir
3467 @sed -i -e 's/emit_preview_ready/preview_ready/g' Unity-@GIR_VERSION@.gir
3468+ @sed -i -e 's/<parameter name="async_callback" transfer-ownership="none" /<parameter name="async_callback" transfer-ownership="none" scope="async" /g' Unity-@GIR_VERSION@.gir
3469 @touch $@
3470
3471 BUILT_SOURCES += libunity_la_vala.stamp
3472
3473=== added file 'src/lttng-component-provider.h'
3474--- src/lttng-component-provider.h 1970-01-01 00:00:00 +0000
3475+++ src/lttng-component-provider.h 2013-05-08 13:19:27 +0000
3476@@ -0,0 +1,36 @@
3477+#undef TRACEPOINT_PROVIDER
3478+#define TRACEPOINT_PROVIDER libunity
3479+
3480+#undef TRACEPOINT_INCLUDE
3481+#define TRACEPOINT_INCLUDE "./lttng-component-provider.h"
3482+
3483+#ifdef __cplusplus
3484+extern "C" {
3485+#endif /* __cplusplus */
3486+
3487+#if !defined(_LIBUNITY_COMPONENT_PROVIDER_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
3488+#define _LIBUNITY_COMPONENT_PROVIDER_H
3489+
3490+#include <lttng/tracepoint.h>
3491+
3492+TRACEPOINT_EVENT(
3493+ libunity,
3494+ message,
3495+ TP_ARGS(char *, text),
3496+ TP_FIELDS(
3497+ ctf_string(message, text)
3498+ )
3499+)
3500+
3501+TRACEPOINT_LOGLEVEL(
3502+ libunity,
3503+ message,
3504+ TRACE_INFO)
3505+
3506+#endif
3507+
3508+#include <lttng/tracepoint-event.h>
3509+
3510+#ifdef __cplusplus
3511+}
3512+#endif /* __cplusplus */
3513
3514=== added file 'src/tp.c'
3515--- src/tp.c 1970-01-01 00:00:00 +0000
3516+++ src/tp.c 2013-05-08 13:19:27 +0000
3517@@ -0,0 +1,33 @@
3518+/*
3519+ * tp.c
3520+ *
3521+ * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3522+ *
3523+ * Permission is hereby granted, free of charge, to any person obtaining a copy
3524+ * of this software and associated documentation files (the "Software"), to deal
3525+ * in the Software without restriction, including without limitation the rights
3526+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3527+ * copies of the Software, and to permit persons to whom the Software is
3528+ * furnished to do so, subject to the following conditions:
3529+ *
3530+ * The above copyright notice and this permission notice shall be included in
3531+ * all copies or substantial portions of the Software.
3532+ *
3533+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3534+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3535+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3536+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3537+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3538+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3539+ * SOFTWARE.
3540+ */
3541+
3542+/*
3543+ * Defining macro creates the code objects of the traceprobes, only do
3544+ * it once per file
3545+ */
3546+#define TRACEPOINT_CREATE_PROBES
3547+/*
3548+ * The header containing our TRACEPOINT_EVENTs.
3549+ */
3550+#include "lttng-component-provider.h"
3551
3552=== added file 'src/unity-aggregator-scope-private.vala'
3553--- src/unity-aggregator-scope-private.vala 1970-01-01 00:00:00 +0000
3554+++ src/unity-aggregator-scope-private.vala 2013-05-08 13:19:27 +0000
3555@@ -0,0 +1,2028 @@
3556+/*
3557+ * Copyright (C) 2011-2012 Canonical, Ltd.
3558+ *
3559+ * This library is free software; you can redistribute it and/or modify
3560+ * it under the terms of the GNU Lesser General Public License
3561+ * version 3.0 as published by the Free Software Foundation.
3562+ *
3563+ * This library is distributed in the hope that it will be useful,
3564+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3565+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3566+ * GNU Lesser General Public License version 3.0 for more details.
3567+ *
3568+ * You should have received a copy of the GNU Lesser General Public
3569+ * License along with this library. If not, see
3570+ * <http://www.gnu.org/licenses/>.
3571+ *
3572+ * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
3573+ * Michal Hruby <michal.hruby@canonical.com>
3574+ *
3575+ */
3576+
3577+using GLib;
3578+using Dee;
3579+using Unity;
3580+using Unity.Protocol;
3581+
3582+namespace Unity.Internal {
3583+
3584+private class AggregatorScopeImpl : GLib.Object, ScopeService, ScopeDBusImpl,
3585+ DeprecatedScopeDBusImpl, MergeStrategy
3586+{
3587+ const int DEFAULT_TIMEOUT_INTERVAL_MS = 16;
3588+ private static Quark dedup_model_quark = Quark.from_string ("unity-dedup-model");
3589+
3590+ private class ScopeTracker : Object
3591+ {
3592+ private GenericArray<ScopeProxy> scope_proxy_arr;
3593+ // scope_id -> ScopeProxy
3594+ private HashTable<string, Utils.AsyncOnce<ScopeProxy>> scope_proxies;
3595+ // scope_uid -> ScopeProxy
3596+ private HashTable<string, ScopeProxy> scope_proxy_uids;
3597+ // channel_key (proxy + master_channel_id) -> scope channel_id
3598+ private HashTable<string, Utils.AsyncOnce<string>> scope_channel_ids;
3599+ // channel_key (proxy + master_channel_id) -> Dee.Model
3600+ private HashTable<string, Dee.SerializableModel> scope_models;
3601+ // master_channel_id -> ResultsSynchronizer
3602+ private HashTable<string, ResultsSynchronizer> synchronizers;
3603+ // scope_id -> ScopeMetadata
3604+ private HashTable<string, ScopeRegistry.ScopeMetadata> scope_metadata;
3605+ // binary name -> present on the system
3606+ private HashTable<string, bool> binary_present;
3607+
3608+ public ScopeTracker ()
3609+ {
3610+ scope_proxy_arr = new GenericArray<ScopeProxy> ();
3611+ scope_proxies = new HashTable<string, Utils.AsyncOnce<ScopeProxy>> (str_hash, str_equal);
3612+ scope_proxy_uids = new HashTable<string, ScopeProxy> (str_hash,str_equal);
3613+ scope_channel_ids = new HashTable<string, Utils.AsyncOnce<string>> (str_hash, str_equal);
3614+ scope_models = new HashTable<string, Dee.SerializableModel> (str_hash, str_equal);
3615+ synchronizers = new HashTable<string, ResultsSynchronizer> (str_hash, str_equal);
3616+ scope_metadata = new HashTable<string, ScopeRegistry.ScopeMetadata> (str_hash, str_equal);
3617+ binary_present = new HashTable<string, bool> (str_hash, str_equal);
3618+ }
3619+
3620+ public List<weak string> scope_ids_for_proxies ()
3621+ {
3622+ return scope_proxies.get_keys ();
3623+ }
3624+
3625+ public string? scope_id_for_proxy (ScopeProxy proxy)
3626+ {
3627+ foreach (unowned string scope_id in scope_proxies.get_keys ())
3628+ {
3629+ if (scope_proxies[scope_id].get_data () == proxy) return scope_id;
3630+ }
3631+
3632+ return null;
3633+ }
3634+
3635+ public unowned ResultsSynchronizer? get_synchronizer (string channel_id)
3636+ {
3637+ return synchronizers.lookup (channel_id);
3638+ }
3639+
3640+ private bool content_enabled (ScopeRegistry.ScopeMetadata metadata)
3641+ {
3642+ var pref_man = PreferencesManager.get_default ();
3643+ if (metadata.remote_content && pref_man.remote_content_search == PreferencesManager.RemoteContent.NONE)
3644+ {
3645+ return false;
3646+ }
3647+ return true;
3648+ }
3649+
3650+ private void perform_checks (ScopeRegistry.ScopeMetadata metadata,
3651+ ChannelType requested_channel_type)
3652+ throws ScopeError
3653+ {
3654+ // check remote content vs user preference
3655+ if (!content_enabled (metadata))
3656+ {
3657+ throw new ScopeError.DISABLED_CONTENT ("Requested content disabled");
3658+ }
3659+ // check global search flag
3660+ if (!metadata.global_searches && requested_channel_type == ChannelType.GLOBAL)
3661+ {
3662+ throw new ScopeError.DISABLED_CONTENT ("Global search is disabled");
3663+ }
3664+ // check if the required binary is installed
3665+ if (metadata.query_binary != null && metadata.query_binary != "")
3666+ {
3667+ if (!(metadata.query_binary in binary_present))
3668+ {
3669+ binary_present[metadata.query_binary] = Environment.find_program_in_path (metadata.query_binary) != null;
3670+ }
3671+ if (!binary_present[metadata.query_binary])
3672+ {
3673+ throw new ScopeError.DISABLED_CONTENT ("Required application isn't installed");
3674+ }
3675+ }
3676+ }
3677+
3678+ public async ScopeProxy? create_proxy (ScopeRegistry.ScopeMetadata metadata)
3679+ {
3680+ try
3681+ {
3682+ var proxy = yield ScopeProxy.new_from_metadata (metadata);
3683+ dynamic ScopeProxy remote_proxy = proxy;
3684+ remote_proxy.auto_reconnect = false;
3685+ // check that the proxy props match the metadata,
3686+ // will throw an error if it doesn't
3687+ check_proxy_vs_metadata (proxy, metadata);
3688+
3689+ scope_proxy_arr.add (proxy);
3690+
3691+ proxy.channels_invalidated.connect (channels_invalidated);
3692+ proxy.results_invalidated.connect (on_results_invalidated);
3693+ return proxy;
3694+ }
3695+ catch (Error err)
3696+ {
3697+ warning ("Unable to acquire proxy for scope \"%s\": %s",
3698+ metadata.id, err.message);
3699+ }
3700+ return null;
3701+ }
3702+
3703+ private void channels_invalidated (ScopeProxy proxy)
3704+ {
3705+ proxy_disconnected (proxy);
3706+
3707+ // invalidate all associated containers
3708+ string[] invalid_keys = {};
3709+ string prefix = "%p::".printf (proxy);
3710+
3711+ debug ("Invalidating channels for %s", prefix);
3712+
3713+ foreach (unowned string channel_key in scope_channel_ids.get_keys ())
3714+ {
3715+ if (channel_key.has_prefix (prefix)) invalid_keys += channel_key;
3716+ }
3717+
3718+ foreach (unowned string channel_key in invalid_keys)
3719+ {
3720+ scope_channel_ids.remove (channel_key);
3721+ scope_models.remove (channel_key);
3722+ }
3723+ }
3724+
3725+ public signal void results_invalidated (ChannelType channel_type);
3726+
3727+ private void on_results_invalidated (ScopeProxy proxy,
3728+ ChannelType channel_type)
3729+ {
3730+ this.results_invalidated (channel_type);
3731+ }
3732+
3733+ private void check_proxy_vs_metadata (
3734+ ScopeProxy proxy,
3735+ ScopeRegistry.ScopeMetadata metadata) throws Error
3736+ {
3737+ if (proxy.is_master != metadata.is_master)
3738+ throw new ScopeError.DATA_MISMATCH ("Scope file info for '%s' doesn't match on IsMaster key".printf (metadata.id));
3739+
3740+ if (metadata.required_metadata != null)
3741+ {
3742+ var dict = metadata.required_metadata.as_hash_table ();
3743+ unowned string field_name;
3744+ unowned string schema;
3745+ var iter = HashTableIter<string, string> (dict);
3746+ while (iter.next (out field_name, out schema))
3747+ {
3748+ if (proxy.metadata[field_name] != schema)
3749+ throw new ScopeError.DATA_MISMATCH ("Scope file info for '%s' doesn't match on RequiredMetadata key".printf (metadata.id));
3750+ }
3751+ }
3752+ }
3753+
3754+ private string get_channel_key (string master_channel_id, ScopeProxy proxy)
3755+ {
3756+ return "%p::%s".printf (proxy, master_channel_id);
3757+ }
3758+
3759+ public void register_channel (string master_channel_id,
3760+ Dee.SerializableModel model,
3761+ MergeStrategy merge_strategy)
3762+ {
3763+ // create new synchronizer for this channel
3764+ var synchronizer = new ResultsSynchronizer (model);
3765+ synchronizer.merge_strategy = merge_strategy;
3766+ synchronizers[master_channel_id] = synchronizer;
3767+ }
3768+
3769+ public void unregister_channel (string master_channel_id)
3770+ {
3771+ var synchronizer = synchronizers[master_channel_id];
3772+ if (synchronizer != null)
3773+ {
3774+ // break the circular reference
3775+ synchronizer.receiver.set_qdata<Dee.Model?> (dedup_model_quark, null);
3776+ synchronizers.remove (master_channel_id);
3777+ }
3778+ // FIXME: close child scopes' channels
3779+ }
3780+
3781+ private void proxy_disconnected (ScopeProxy proxy)
3782+ {
3783+ // this will clear all the models associated with the given proxy
3784+ // and remove them from the ResultsSynchronizer
3785+ foreach (var scope_id in scope_proxies.get_keys ())
3786+ {
3787+ var data = scope_proxies[scope_id].get_data ();
3788+ if (data == proxy)
3789+ {
3790+ warning ("Lost proxy connection to %s", scope_id);
3791+
3792+ string prefix = "%p:".printf (proxy);
3793+ foreach (var channel_key in scope_channel_ids.get_keys ())
3794+ {
3795+ if (channel_key.has_prefix (prefix))
3796+ {
3797+ string master_id = channel_key.substring (channel_key.last_index_of ("::") + 2);
3798+ if (synchronizers.contains (master_id))
3799+ {
3800+ debug ("Removing %s data from model of master channel %s", scope_id, master_id);
3801+ var sync = synchronizers[master_id];
3802+ sync.enable_provider (prefix);
3803+ sync.clear_provider_model (prefix);
3804+ sync.remove_provider (prefix); // isn't clear+remove racy here?
3805+ }
3806+ }
3807+ }
3808+
3809+ break;
3810+ }
3811+ }
3812+ }
3813+
3814+ private async void wait_for_seqnum (Dee.SharedModel model, uint64 seqnum)
3815+ throws Error
3816+ {
3817+ if (model.get_seqnum () >= seqnum) return;
3818+
3819+ var update_sig_id = model.end_transaction.connect ((m, begin_seqnum, end_seqnum) =>
3820+ {
3821+ if (end_seqnum < seqnum) return;
3822+
3823+ wait_for_seqnum.callback ();
3824+ });
3825+
3826+ // make sure we don't wait indefinitely
3827+ uint src_id = 0;
3828+ src_id = Timeout.add_seconds (30, () =>
3829+ {
3830+ src_id = 0;
3831+ wait_for_seqnum.callback ();
3832+ return false;
3833+ });
3834+
3835+ yield;
3836+
3837+ SignalHandler.disconnect (model, update_sig_id);
3838+ if (src_id != 0)
3839+ {
3840+ Source.remove (src_id);
3841+ }
3842+ else
3843+ {
3844+ // timeout was reached
3845+ throw new DBusError.TIMEOUT ("Timed out waiting for model update");
3846+ }
3847+ }
3848+
3849+ private Utils.AsyncOnce<ScopeProxy> get_proxy_once (string scope_id)
3850+ {
3851+ var proxy_once = scope_proxies[scope_id];
3852+ if (proxy_once == null)
3853+ {
3854+ proxy_once = new Utils.AsyncOnce<ScopeProxy> ();
3855+ scope_proxies[scope_id] = proxy_once;
3856+ }
3857+
3858+ return proxy_once;
3859+ }
3860+
3861+ private Utils.AsyncOnce<string> get_channel_id_once (string channel_key)
3862+ {
3863+ var channel_id_once = scope_channel_ids[channel_key];
3864+ if (channel_id_once == null)
3865+ {
3866+ channel_id_once = new Utils.AsyncOnce<string> ();
3867+ scope_channel_ids[channel_key] = channel_id_once;
3868+ }
3869+
3870+ return channel_id_once;
3871+ }
3872+
3873+ private unowned string? get_channel_id (string master_channel_id,
3874+ string scope_id,
3875+ out ScopeProxy? proxy) throws Error
3876+ {
3877+ var proxy_once = get_proxy_once (scope_id);
3878+ if (!proxy_once.is_initialized ())
3879+ {
3880+ proxy = null;
3881+ return null;
3882+ }
3883+
3884+ if (proxy_once.get_data () == null)
3885+ throw new ScopeError.REQUEST_FAILED ("Unable to create proxy");
3886+
3887+ proxy = proxy_once.get_data ();
3888+
3889+ var channel_key = get_channel_key (master_channel_id, proxy);
3890+ var channel_id_once = get_channel_id_once (channel_key);
3891+ if (!channel_id_once.is_initialized ()) return null;
3892+ return channel_id_once.get_data ();
3893+ }
3894+
3895+ private async unowned string init_channel (string master_channel_id,
3896+ string scope_id,
3897+ ChannelType channel_type,
3898+ out ScopeProxy proxy)
3899+ throws Error
3900+ {
3901+ // init ScopeProxy
3902+ var proxy_once = get_proxy_once (scope_id);
3903+ Error? failure = null;
3904+
3905+ // short-circuit evaluation
3906+ if (scope_id in scope_metadata)
3907+ {
3908+ // will throw if checks fail
3909+ perform_checks (scope_metadata[scope_id], channel_type);
3910+ }
3911+
3912+ if (!proxy_once.is_initialized ())
3913+ {
3914+ if (yield proxy_once.enter ())
3915+ {
3916+ ScopeProxy? actual_proxy = null;
3917+ try
3918+ {
3919+ if (!(scope_id in scope_metadata))
3920+ {
3921+ scope_metadata[scope_id] = ScopeRegistry.ScopeMetadata.for_id (scope_id);
3922+ }
3923+ var metadata = scope_metadata[scope_id];
3924+ // don't even create the proxy if one of the checks fail
3925+ perform_checks (metadata, channel_type);
3926+ actual_proxy = yield create_proxy (metadata);
3927+ }
3928+ catch (Error e)
3929+ {
3930+ failure = e;
3931+ }
3932+ finally
3933+ {
3934+ proxy_once.leave (actual_proxy);
3935+ }
3936+ }
3937+ }
3938+
3939+ proxy = proxy_once.get_data ();
3940+ if (proxy == null)
3941+ {
3942+ if (failure != null && failure is ScopeError.DISABLED_CONTENT)
3943+ {
3944+ // retry next time
3945+ proxy_once.reset ();
3946+ throw failure;
3947+ }
3948+ var msg = "Unable to create scope proxy for \"%s\": %s".printf (
3949+ scope_id, failure != null ? failure.message : "(unknown)");
3950+ throw new ScopeError.REQUEST_FAILED (msg);
3951+ }
3952+
3953+ // open a channel
3954+ var channel_key = get_channel_key (master_channel_id, proxy);
3955+ var channel_id_once = get_channel_id_once (channel_key);
3956+
3957+ if (!channel_id_once.is_initialized ())
3958+ {
3959+ if (yield channel_id_once.enter ())
3960+ {
3961+ Dee.SerializableModel model;
3962+ string? chan_id = null;
3963+ try
3964+ {
3965+ chan_id = yield proxy.open_channel (channel_type,
3966+ ChannelFlags.PRIVATE,
3967+ null,
3968+ out model);
3969+ scope_models[channel_key] = model;
3970+ model.set_data<string> ("scope-id", scope_id);
3971+ // register as receiver
3972+ var synchronizer = synchronizers[master_channel_id];
3973+ if (synchronizer != null)
3974+ {
3975+ var uid = "%p".printf (proxy);
3976+ scope_proxy_uids[uid] = proxy;
3977+ synchronizer.add_provider (model, uid);
3978+ }
3979+ else
3980+ {
3981+ warning ("Unable to find ResultsSynchronizer for channel %s",
3982+ master_channel_id);
3983+ }
3984+ }
3985+ finally
3986+ {
3987+ channel_id_once.leave (chan_id);
3988+ }
3989+ // emit a signal
3990+ scope_channel_opened (master_channel_id, proxy, model);
3991+ }
3992+ }
3993+
3994+ unowned string scope_channel_id = channel_id_once.get_data ();
3995+ if (scope_channel_id == null)
3996+ {
3997+ // uh oh, couldn't open a channel, try again next time
3998+ channel_id_once.reset ();
3999+ }
4000+ return scope_channel_id;
4001+ }
4002+
4003+ public async ActivationReplyRaw activate_wrapper (
4004+ string master_channel_id,
4005+ string scope_id,
4006+ ChannelType channel_type,
4007+ owned Variant[] result_arr,
4008+ uint action_type,
4009+ HashTable<string, Variant> hints,
4010+ GLib.Cancellable? cancellable) throws Error
4011+ {
4012+ ScopeProxy proxy;
4013+ unowned string scope_channel_id;
4014+ scope_channel_id = get_channel_id (master_channel_id, scope_id, out proxy);
4015+ if (scope_channel_id == null)
4016+ scope_channel_id = yield init_channel (master_channel_id, scope_id,
4017+ channel_type, out proxy);
4018+
4019+ cancellable.set_error_if_cancelled ();
4020+
4021+ var action = (Unity.Protocol.ActionType) action_type;
4022+ return yield proxy.activate (scope_channel_id, result_arr,
4023+ action, hints, cancellable);
4024+ }
4025+
4026+ public async HashTable<string, Variant> search_wrapper (
4027+ string master_channel_id,
4028+ ChannelType channel_type,
4029+ string search_string,
4030+ HashTable<string, Variant> hints,
4031+ string scope_id,
4032+ CategoryMerger category_merger,
4033+ GLib.Cancellable? cancellable) throws Error
4034+ {
4035+ ScopeProxy proxy;
4036+ unowned string scope_channel_id;
4037+ scope_channel_id = get_channel_id (master_channel_id, scope_id, out proxy);
4038+ if (scope_channel_id == null)
4039+ scope_channel_id = yield init_channel (master_channel_id, scope_id,
4040+ channel_type, out proxy);
4041+
4042+ cancellable.set_error_if_cancelled ();
4043+
4044+ var reply_hints = new HashTable<string, Variant> (str_hash, str_equal);
4045+
4046+ if (!content_enabled (scope_metadata[scope_id])
4047+ || scope_channel_id == null)
4048+ {
4049+ return reply_hints;
4050+ }
4051+
4052+ if (category_merger is CategoryMergerByField)
4053+ {
4054+ (category_merger as CategoryMergerByField).map_subscope_categories (scope_id, proxy.categories_model);
4055+ }
4056+
4057+ var channel_key = get_channel_key (master_channel_id, proxy);
4058+ var last_seq_num = scope_models[channel_key].get_seqnum ();
4059+
4060+ var sync = synchronizers[master_channel_id];
4061+ var provider_uid = "%p".printf (proxy);
4062+ sync.enable_provider (provider_uid);
4063+
4064+ var reply_dict = yield proxy.search (scope_channel_id, search_string,
4065+ hints, cancellable);
4066+
4067+ var iter = HashTableIter<string, Variant> (reply_dict);
4068+ unowned string key;
4069+ unowned Variant variant;
4070+
4071+ while (iter.next (out key, out variant))
4072+ {
4073+ if (key == SEARCH_SEQNUM_HINT)
4074+ {
4075+ uint64 seqnum = variant.get_uint64 ();
4076+ var model = scope_models[channel_key];
4077+ if (model.get_seqnum () < seqnum)
4078+ yield wait_for_seqnum (model as Dee.SharedModel, seqnum);
4079+
4080+ // if the proxy was disconnected and its channels invalidated, this
4081+ // model is no longer merged, check if that's the case
4082+ if (scope_models[channel_key] != model)
4083+ return reply_hints;
4084+
4085+ if (seqnum == last_seq_num)
4086+ {
4087+ debug ("Model seqnum for channel key %s not changed, copying", channel_key);
4088+ var synchronizer = get_synchronizer (master_channel_id);
4089+ if (synchronizer != null)
4090+ synchronizer.copy_model (model);
4091+ else
4092+ warning ("No synchronizer for master channel %s", master_channel_id);
4093+ }
4094+ }
4095+ else if (key == SEARCH_TIME_HINT)
4096+ {
4097+ reply_hints["%s:%s".printf (SEARCH_TIME_HINT, scope_id)] = variant;
4098+ }
4099+ else
4100+ {
4101+ reply_hints[key] = variant; // pass up
4102+ }
4103+ }
4104+
4105+ cancellable.set_error_if_cancelled ();
4106+ // don't disable the provider if this search got cancelled, new search
4107+ // might expect it to be enabled
4108+ sync.disable_provider (provider_uid);
4109+
4110+ return reply_hints;
4111+ }
4112+
4113+ public async void push_wrapper (
4114+ string parent_channel_id,
4115+ string search_string,
4116+ ChannelType channel_type,
4117+ string master_scope_id,
4118+ string scope_id,
4119+ Dee.SerializableModel results_model,
4120+ string[] categories,
4121+ GLib.Cancellable? cancellable) throws Error
4122+ {
4123+ ScopeProxy proxy;
4124+ unowned string scope_channel_id;
4125+ // we're yielding before using the array, need to copy it explicitely
4126+ string[] categories_copy = categories;
4127+ scope_channel_id = get_channel_id (parent_channel_id, master_scope_id, out proxy);
4128+ if (scope_channel_id == null)
4129+ scope_channel_id = yield init_channel (parent_channel_id,
4130+ master_scope_id,
4131+ channel_type, out proxy);
4132+
4133+ if (scope_channel_id == null)
4134+ {
4135+ return; // shouldn't be reached really
4136+ }
4137+
4138+ cancellable.set_error_if_cancelled ();
4139+
4140+ var channel_key = get_channel_key (parent_channel_id, proxy);
4141+ var sync = synchronizers[parent_channel_id];
4142+ var provider_uid = "%p".printf (proxy);
4143+ sync.enable_provider (provider_uid);
4144+
4145+ var reply_dict = yield proxy.push_results (scope_channel_id,
4146+ search_string,
4147+ scope_id,
4148+ results_model,
4149+ categories_copy, cancellable);
4150+
4151+ var iter = HashTableIter<string, Variant> (reply_dict);
4152+ unowned string key;
4153+ unowned Variant variant;
4154+
4155+ while (iter.next (out key, out variant))
4156+ {
4157+ if (key == SEARCH_SEQNUM_HINT)
4158+ {
4159+ uint64 seqnum = variant.get_uint64 ();
4160+ var model = scope_models[channel_key];
4161+ if (model.get_seqnum () < seqnum)
4162+ yield wait_for_seqnum (model as Dee.SharedModel, seqnum);
4163+ }
4164+ }
4165+
4166+ cancellable.set_error_if_cancelled ();
4167+ // don't disable the provider if this search got cancelled, new search
4168+ // might expect it to be enabled
4169+ sync.disable_provider (provider_uid);
4170+ }
4171+
4172+ public signal void scope_channel_opened (string master_channel_id,
4173+ ScopeProxy scope_proxy,
4174+ Dee.SerializableModel model);
4175+
4176+ public unowned ScopeProxy get_proxy_for_uid (string? uid) throws ScopeError
4177+ {
4178+ if (uid == null)
4179+ throw new ScopeError.REQUEST_FAILED ("Invalid scope UID");
4180+
4181+ unowned ScopeProxy proxy = scope_proxy_uids[uid];
4182+
4183+ if (proxy != null) return proxy;
4184+
4185+ throw new ScopeError.REQUEST_FAILED ("Invalid scope UID");
4186+ }
4187+ }
4188+
4189+ private abstract class CategoryMerger : Object
4190+ {
4191+ protected HashTable<string, int> category_map = new HashTable<string, int> (str_hash, str_equal);
4192+ public abstract int remap (string scope_id, uint32 category_index);
4193+ }
4194+
4195+ private class CategoryMergerByScope : CategoryMerger
4196+ {
4197+ public void add_scope_mapping (Unity.AggregatorScope scope, string scope_id)
4198+ {
4199+ var idx = scope.category_index_for_scope_id (scope_id);
4200+ if (idx >= 0)
4201+ category_map[scope_id] = idx;
4202+ }
4203+
4204+ public override int remap (string scope_id, uint32 category_index)
4205+ {
4206+ if (category_map.contains (scope_id))
4207+ return category_map[scope_id];
4208+ warning ("No category mapping for %s", scope_id);
4209+ return -1;
4210+ }
4211+ }
4212+
4213+ private class CategoryMergerByField : CategoryMerger
4214+ {
4215+ private HashTable<string, HashTable<int, int>?> subscopes = new HashTable<string, HashTable<int, int>?> (str_hash, str_equal);
4216+ private uint column_index;
4217+
4218+ public CategoryMergerByField (Dee.SerializableModel master_categories_model,
4219+ uint column_index)
4220+ {
4221+ this.column_index = column_index;
4222+ // iterate over aggregator scope categories and create name -> index mapping
4223+ int count = 0;
4224+ var iter = master_categories_model.get_first_iter ();
4225+ var end_iter = master_categories_model.get_last_iter ();
4226+ while (iter != end_iter)
4227+ {
4228+ var name = master_categories_model.get_string (iter, column_index);
4229+ if (category_map.contains (name))
4230+ warning ("Duplicated category name: %s", name);
4231+ else
4232+ category_map[name] = count++;
4233+ iter = master_categories_model.next (iter);
4234+ }
4235+ }
4236+
4237+ /**
4238+ * Creates mapping for given subscope and its categories to aggregator scope category indexes
4239+ */
4240+ public void map_subscope_categories (string scope_id, Dee.SerializableModel categories_model)
4241+ {
4242+ string[] categories = new string [0];
4243+
4244+ var iter = categories_model.get_first_iter ();
4245+ var end_iter = categories_model.get_last_iter ();
4246+ while (iter != end_iter)
4247+ {
4248+ string cat_id = categories_model.get_string (iter, column_index);
4249+ categories += cat_id;
4250+ iter = categories_model.next (iter);
4251+ }
4252+ map_subscope_categories_from_list (scope_id, categories);
4253+ }
4254+
4255+ public void map_subscope_categories_from_list (string scope_id, string[] categories)
4256+ {
4257+ int count = 0;
4258+
4259+ HashTable<int, int> subscope_category_map = subscopes.lookup (scope_id);
4260+ if (subscope_category_map == null)
4261+ {
4262+ subscope_category_map = new HashTable<int, int> (direct_hash, direct_equal);
4263+ subscopes[scope_id] = subscope_category_map;
4264+ }
4265+
4266+ foreach (var cat_id in categories)
4267+ {
4268+ if (category_map.contains (cat_id)) //does master have this category?
4269+ {
4270+ var cat_idx = category_map[cat_id];
4271+ subscope_category_map[count++] = cat_idx;
4272+ }
4273+ else
4274+ {
4275+ warning ("Subscope '%s' category '%s' not present in aggregator scope model", scope_id, cat_id);
4276+ }
4277+ }
4278+ }
4279+
4280+ public override int remap (string scope_id, uint32 category_index)
4281+ {
4282+ var subscope_category_map = subscopes.lookup (scope_id);
4283+ if (subscope_category_map != null)
4284+ {
4285+ if (subscope_category_map.contains ((int)category_index))
4286+ {
4287+ var idx = subscope_category_map[(int)category_index];
4288+ return (int)idx;
4289+ }
4290+ warning ("No category mapping for %s, category %u", scope_id, category_index);
4291+ }
4292+ warning ("No category mapping for %s", scope_id);
4293+ return -1;
4294+ }
4295+ }
4296+
4297+ private struct Sorter
4298+ {
4299+ int category;
4300+ int column_index;
4301+ string? field_name;
4302+ char schema;
4303+ int multiplier; // +1 / -1 to implement ASCENDING / DESCENDING sort
4304+
4305+ public int apply (Variant[] row1, Variant[] row2)
4306+ {
4307+ Variant dummy1;
4308+ Variant dummy2;
4309+ unowned Variant var1 = row1[column_index];
4310+ unowned Variant var2 = row2[column_index];
4311+ if (field_name != null)
4312+ {
4313+ dummy1 = var1.lookup_value ("content", VariantType.VARDICT).lookup_value (field_name, null);
4314+ dummy2 = var2.lookup_value ("content", VariantType.VARDICT).lookup_value (field_name, null);
4315+ // handle non-presence of optional fields
4316+ if (dummy1 == null && dummy2 == null) return 0;
4317+ if (dummy1 == null || dummy2 == null)
4318+ return dummy1 == null ? 1 : -1;
4319+ var1 = dummy1;
4320+ var2 = dummy2;
4321+ }
4322+ int result;
4323+ switch (schema)
4324+ {
4325+ case 's':
4326+ // FIXME: implement a way to use simple ascii sort
4327+ result = var1.get_string ().collate (var2.get_string ());
4328+ break;
4329+ case 'i':
4330+ result = compare_int (var1.get_int32 (), var2.get_int32 ());
4331+ break;
4332+ case 'u':
4333+ result = compare_uint (var1.get_uint32 (), var2.get_uint32 ());
4334+ break;
4335+ case 'x':
4336+ result = compare_int64 (var1.get_int64 (), var2.get_int64 ());
4337+ break;
4338+ case 't':
4339+ result = compare_uint64 (var1.get_uint64 (), var2.get_uint64 ());
4340+ break;
4341+ case 'd':
4342+ result = compare_double (var1.get_double (), var2.get_double ());
4343+ break;
4344+ default:
4345+ return 0;
4346+ }
4347+
4348+ return result * multiplier;
4349+ }
4350+
4351+ private static int compare_int (int a, int b)
4352+ {
4353+ return a > b ? 1 : a == b ? 0 : -1;
4354+ }
4355+
4356+ private static int compare_uint (uint a, uint b)
4357+ {
4358+ return a > b ? 1 : a == b ? 0 : -1;
4359+ }
4360+
4361+ private static int compare_int64 (int64 a, int64 b)
4362+ {
4363+ return a > b ? 1 : a == b ? 0 : -1;
4364+ }
4365+
4366+ private static int compare_uint64 (uint64 a, uint64 b)
4367+ {
4368+ return a > b ? 1 : a == b ? 0 : -1;
4369+ }
4370+
4371+ private static int compare_double (double a, double b)
4372+ {
4373+ return a > b ? 1 : a == b ? 0 : -1;
4374+ }
4375+ }
4376+
4377+ private const string SOURCES_FILTER_ID = "unity-sources";
4378+
4379+ public unowned AggregatorScope owner { private get; construct; }
4380+ private HashTable<string, ScopeChannel> _channels;
4381+ private uint _dbus_id;
4382+ private DBusConnection? _dbus_connection;
4383+ private ScopeTracker _scopes;
4384+ private Sorter[] _sorters;
4385+ private Sorter[] _constraints;
4386+ private CategoryMerger category_merger;
4387+ private Rand _rand;
4388+
4389+ public Dee.SerializableModel categories_model { get; set; }
4390+ public Dee.SerializableModel filters_model { get; set; }
4391+
4392+ /* Make sure the object doesn't reference itself, we do want it to be
4393+ * properly destroyed */
4394+ private MergeStrategy? _merge_strategy = null;
4395+ public MergeStrategy? merge_strategy
4396+ {
4397+ internal get { return _merge_strategy != null ? _merge_strategy : this; }
4398+ set { _merge_strategy = value != this ? value : null; }
4399+ }
4400+
4401+ /* we need notifications on this property */
4402+ public ViewType view_type { get; set; }
4403+
4404+ public AggregatorScopeImpl (AggregatorScope owner)
4405+ {
4406+ Object (owner: owner);
4407+ }
4408+
4409+ static bool measure_requests;
4410+
4411+ static construct
4412+ {
4413+ measure_requests =
4414+ Environment.get_variable (VAR_MEASURED_SEARCHES) != null;
4415+ }
4416+
4417+ construct
4418+ {
4419+ _rand = new Rand ();
4420+ _channels = new HashTable<string, ScopeChannel> (str_hash, str_equal);
4421+ _scopes = new ScopeTracker ();
4422+ _scopes.results_invalidated.connect (on_proxy_results_invalidated);
4423+ merge_strategy = this;
4424+ create_models ();
4425+ }
4426+
4427+ // keep the scope list in a set for fast lookup
4428+ private static Gee.Set<string> disabled_scope_ids;
4429+
4430+ private static bool is_scope_disabled (string scope_id)
4431+ {
4432+ if (disabled_scope_ids == null)
4433+ {
4434+ disabled_scope_ids = new Gee.HashSet<string> ();
4435+ var pref_man = PreferencesManager.get_default ();
4436+ pref_man.notify["disabled-scopes"].connect (update_disabled_scopes);
4437+ update_disabled_scopes ();
4438+ }
4439+
4440+ return scope_id in disabled_scope_ids;
4441+ }
4442+
4443+ private static void update_disabled_scopes ()
4444+ {
4445+ var pref_man = PreferencesManager.get_default ();
4446+ disabled_scope_ids.clear ();
4447+ foreach (unowned string scope_id in pref_man.disabled_scopes)
4448+ {
4449+ disabled_scope_ids.add (scope_id);
4450+ }
4451+ }
4452+
4453+ public GLib.List<weak string> subscope_ids ()
4454+ {
4455+ return _scopes.scope_ids_for_proxies ();
4456+ }
4457+
4458+ /* Create usable name prefix for the models */
4459+ private string create_dbus_name ()
4460+ {
4461+ /* We randomize the names to avoid conflicts to ensure that we always
4462+ * have a clean start (no processes hanging around that would cause
4463+ * our models to not be the leaders)
4464+ */
4465+ var t = get_monotonic_time ();
4466+ const string format_string = "com.canonical.Unity.Master.Scope.%s.T%" + int64.FORMAT + "%d";
4467+ var dbus_name = format_string.printf (Path.get_basename (owner.dbus_path),
4468+ t, _rand.int_range (0, 10000));
4469+ return dbus_name;
4470+ }
4471+
4472+ private void create_models ()
4473+ {
4474+ /* Schema definitions come from the Lens specification */
4475+ categories_model = new Dee.SequenceModel ();
4476+ categories_model.set_schema_full (CATEGORIES_SCHEMA);
4477+
4478+ filters_model = new Dee.SequenceModel ();
4479+ filters_model.set_schema_full (FILTERS_SCHEMA);
4480+ }
4481+
4482+ public void export () throws IOError
4483+ {
4484+ _dbus_connection = Bus.get_sync (BusType.SESSION);
4485+ _dbus_id = _dbus_connection.register_object (owner.dbus_path,
4486+ this as ScopeService);
4487+ }
4488+
4489+ public void unexport ()
4490+ {
4491+ if (_dbus_id != 0)
4492+ {
4493+ _dbus_connection.unregister_object (_dbus_id);
4494+ _dbus_id = 0;
4495+ _dbus_connection = null;
4496+ }
4497+
4498+ // get rid of open channels
4499+ string[] channel_ids = {};
4500+ foreach (unowned string channel_id in _channels.get_keys ())
4501+ {
4502+ channel_ids += channel_id;
4503+ }
4504+ foreach (unowned string channel_id in channel_ids)
4505+ {
4506+ _scopes.unregister_channel (channel_id);
4507+ _channels.remove (channel_id);
4508+ }
4509+ }
4510+
4511+ public void set_categories (List<Category> categories)
4512+ {
4513+ bool categories_model_empty = categories_model.get_n_rows () == 0;
4514+ if (!categories_model_empty)
4515+ {
4516+ // we support only appending new categories, no changes/deletes
4517+ unowned List<Category> cats = categories;
4518+ uint cats_length = categories.length ();
4519+ bool data_matches = cats_length >= categories_model.get_n_rows ();
4520+
4521+ var iter = categories_model.get_first_iter ();
4522+ var end_iter = categories_model.get_last_iter ();
4523+ while (data_matches && iter != end_iter)
4524+ {
4525+ data_matches &= cats.data.id == categories_model.get_string (iter, 0);
4526+ // FIXME: emit row-changed if other props changed
4527+ iter = categories_model.next (iter);
4528+ cats = cats.next;
4529+ }
4530+
4531+ if (!data_matches)
4532+ {
4533+ warning ("Categories can only be added, ignoring request");
4534+ return;
4535+ }
4536+ else
4537+ {
4538+ categories = cats;
4539+ }
4540+ }
4541+
4542+ foreach (unowned Category category in categories)
4543+ {
4544+ string icon_hint = Utils.icon_to_string (category.icon_hint);
4545+ categories_model.append (category.id,
4546+ category.name,
4547+ icon_hint,
4548+ category.renderer,
4549+ Utils.hash_table_to_asv (category.hints));
4550+ }
4551+
4552+ if (_dbus_id != 0)
4553+ {
4554+ queue_property_notification ("Categories",
4555+ new Variant.variant (this.categories));
4556+ }
4557+ }
4558+
4559+ public void set_filters (List<Filter> filters)
4560+ {
4561+ filters_model.clear ();
4562+
4563+ foreach (unowned Filter filter in filters)
4564+ {
4565+ //filter.changed.connect (on_filter_option_changed);
4566+ }
4567+
4568+ List<unowned Filter> filters_and_sources = filters.copy ();
4569+ if (owner.sources.options.length () > 0)
4570+ filters_and_sources.append (owner.sources);
4571+
4572+ Variant data[8];
4573+ foreach (unowned Filter filter in filters_and_sources)
4574+ {
4575+ var serialized_filter = filter.serialize ();
4576+ for (size_t i = 0; i < serialized_filter.n_children (); i++)
4577+ data[i] = serialized_filter.get_child_value (i);
4578+
4579+ filters_model.append_row (data);
4580+ }
4581+
4582+ if (_dbus_id != 0)
4583+ {
4584+ queue_property_notification ("Filters",
4585+ new Variant.variant (this.filters));
4586+ }
4587+
4588+ foreach (var channel in _channels.get_values ())
4589+ {
4590+ channel.set_filter_base (filters_model);
4591+ }
4592+ }
4593+
4594+ private void on_proxy_results_invalidated (ChannelType channel_type)
4595+ {
4596+ queue_search_for_type ((SearchType) channel_type);
4597+ }
4598+
4599+ public void queue_search_for_type (SearchType search_type)
4600+ {
4601+ var channel_type = search_type == SearchType.GLOBAL ?
4602+ ChannelType.GLOBAL : ChannelType.DEFAULT;
4603+ foreach (var channel in _channels.get_values ())
4604+ {
4605+ if (channel.channel_type == channel_type)
4606+ {
4607+ channel.last_search = null;
4608+ }
4609+ }
4610+ }
4611+
4612+ public void invalidate_search (SearchType search_type)
4613+ {
4614+ // not really relevant for master scopes
4615+ }
4616+
4617+ private VariantBuilder? changed_props;
4618+
4619+ public void queue_property_notification (string prop_name, Variant prop_value)
4620+ {
4621+ if (_dbus_id == 0) return;
4622+
4623+ bool schedule_emit = changed_props == null;
4624+ if (changed_props == null)
4625+ changed_props = new VariantBuilder (new VariantType ("a{sv}"));
4626+
4627+ changed_props.add ("{sv}", prop_name, prop_value);
4628+
4629+ if (schedule_emit)
4630+ {
4631+ Idle.add (() =>
4632+ {
4633+ var invalidated = new Variant.array (new VariantType ("s"), {});
4634+ try
4635+ {
4636+ _dbus_connection.emit_signal (null, owner.dbus_path,
4637+ "org.freedesktop.DBus.Properties",
4638+ "PropertiesChanged",
4639+ new Variant ("(sa{sv}@as)",
4640+ ScopeService.INTERFACE_NAME,
4641+ changed_props,
4642+ invalidated));
4643+ }
4644+ catch (Error err)
4645+ {
4646+ warning ("%s", err.message);
4647+ }
4648+ changed_props = null;
4649+ return false;
4650+ });
4651+ }
4652+ }
4653+
4654+
4655+
4656+ public void add_sorter (uint category_index, string field,
4657+ AggregatorScope.SortFlags flags)
4658+ {
4659+ string? schema = null;
4660+ bool is_base_column = field in RESULTS_COLUMN_NAMES;
4661+ bool field_found = false;
4662+
4663+ foreach (unowned Schema.FieldInfo? info in owner.schema.get_fields ())
4664+ {
4665+ if (info.name == field)
4666+ {
4667+ schema = info.schema;
4668+ field_found = true;
4669+ break;
4670+ }
4671+ }
4672+ // ensure the field name is valid
4673+ if (!is_base_column && !field_found)
4674+ {
4675+ critical ("Field name '%s' is not valid for this scope", field);
4676+ return;
4677+ }
4678+
4679+ // get column index
4680+ int col_index = -1;
4681+ for (int i = 0; i < RESULTS_COLUMN_NAMES.length; i++)
4682+ {
4683+ if (field == RESULTS_COLUMN_NAMES[i])
4684+ {
4685+ col_index = i;
4686+ break;
4687+ }
4688+ }
4689+
4690+ if (col_index >= 0)
4691+ schema = RESULTS_SCHEMA[col_index];
4692+
4693+ if (new VariantType (schema).is_basic () == false)
4694+ {
4695+ critical ("Only basic types can be sorted, '%s' is not supported",
4696+ schema);
4697+ return;
4698+ }
4699+
4700+ var sorter = Sorter ();
4701+ sorter.category = (int) category_index;
4702+ sorter.column_index = col_index < 0 ? RESULTS_COLUMN_NAMES.length - 1 : col_index;
4703+ sorter.field_name = col_index < 0 ? field : null;
4704+ sorter.schema = schema[0];
4705+ sorter.multiplier = AggregatorScope.SortFlags.DESCENDING in flags ? -1 : 1;
4706+
4707+ _sorters += (owned) sorter;
4708+ }
4709+
4710+ public void add_constraint (int category_index, string field)
4711+ {
4712+ string? schema = null;
4713+ bool is_base_column = field in RESULTS_COLUMN_NAMES;
4714+ bool field_found = false;
4715+
4716+ foreach (unowned Schema.FieldInfo? info in owner.schema.get_fields ())
4717+ {
4718+ if (info.name == field)
4719+ {
4720+ schema = info.schema;
4721+ field_found = true;
4722+ break;
4723+ }
4724+ }
4725+ // ensure the field name is valid
4726+ if (!is_base_column && !field_found)
4727+ {
4728+ critical ("Field name '%s' is not valid for this scope", field);
4729+ return;
4730+ }
4731+
4732+ // get column index
4733+ int col_index = -1;
4734+ for (int i = 0; i < RESULTS_COLUMN_NAMES.length; i++)
4735+ {
4736+ if (field == RESULTS_COLUMN_NAMES[i])
4737+ {
4738+ col_index = i;
4739+ break;
4740+ }
4741+ }
4742+
4743+ if (col_index >= 0)
4744+ schema = RESULTS_SCHEMA[col_index];
4745+
4746+ if (new VariantType (schema).is_basic () == false)
4747+ {
4748+ critical ("Only basic types can be sorted, '%s' is not supported",
4749+ schema);
4750+ return;
4751+ }
4752+
4753+ if (category_index >= 0)
4754+ {
4755+ // we need a category sorter
4756+ bool category_sorter_present = false;
4757+ int category_col_index = -1;
4758+ for (int i = 0; i < RESULTS_COLUMN_NAMES.length; i++)
4759+ {
4760+ if (RESULTS_COLUMN_NAMES[i] == "category")
4761+ {
4762+ category_col_index = i;
4763+ break;
4764+ }
4765+ }
4766+ warn_if_fail (category_col_index >= 0);
4767+ foreach (unowned Sorter it_sorter in _constraints)
4768+ {
4769+ if (it_sorter.column_index == category_col_index)
4770+ {
4771+ category_sorter_present = true;
4772+ break;
4773+ }
4774+ }
4775+ if (!category_sorter_present) add_constraint (-1, "category");
4776+ }
4777+
4778+ var sorter = Sorter ();
4779+ sorter.category = category_index;
4780+ sorter.column_index = col_index < 0 ? RESULTS_COLUMN_NAMES.length - 1 : col_index;
4781+ sorter.field_name = col_index < 0 ? field : null;
4782+ sorter.schema = schema[0];
4783+ sorter.multiplier = 1;
4784+
4785+ foreach (unowned Sorter it_sorter in _constraints)
4786+ {
4787+ // check for duplicate constraints
4788+ if (it_sorter.category == sorter.category &&
4789+ it_sorter.column_index == sorter.column_index &&
4790+ it_sorter.field_name == sorter.field_name &&
4791+ it_sorter.schema == sorter.schema)
4792+ {
4793+ warning ("Trying to add duplicate constraint, ignoring");
4794+ return;
4795+ }
4796+ }
4797+
4798+ _constraints += (owned) sorter;
4799+ }
4800+
4801+ private static int apply_sorters (Variant[] row1, Variant[] row2,
4802+ uint category, Sorter[] sorters)
4803+ {
4804+ foreach (unowned Sorter sorter in sorters)
4805+ {
4806+ if (sorter.category >= 0 && sorter.category != category) continue;
4807+ int sorter_result = sorter.apply (row1, row2);
4808+ if (sorter_result != 0) return sorter_result;
4809+ }
4810+ return 0;
4811+ }
4812+
4813+ /* MergeStrategy implementation */
4814+ private unowned Dee.ModelIter? merge_result (string scope_id,
4815+ Dee.Model target, Variant[] row)
4816+ {
4817+ // remap category index in the result
4818+ uint row_category = row[ResultColumn.CATEGORY].get_uint32 ();
4819+ int cat_idx = category_merger.remap (scope_id, row_category);
4820+ if (cat_idx >= 0)
4821+ {
4822+ row[ResultColumn.CATEGORY] = new GLib.Variant.uint32 (cat_idx);
4823+ }
4824+ else
4825+ {
4826+ warning ("Unable to remap category %u for %s", row_category, scope_id);
4827+ return null;
4828+ }
4829+
4830+ // check for duplicates
4831+ if (_constraints.length > 0)
4832+ {
4833+ /* the lookups need to be fast, so keeping a FilterModel on top
4834+ * of the real model that's sorted according to the de-dup fields */
4835+ var dedup_model = target.get_qdata<Dee.Model> (dedup_model_quark);
4836+ if (dedup_model == null)
4837+ {
4838+ warn_if_fail (target.get_n_rows () == 0);
4839+ var filter = Dee.Filter.new (() => {}, // no MapFunc
4840+ (orig_model, orig_iter, m) =>
4841+ {
4842+ Variant row_data[9];
4843+ orig_model.get_row_static (orig_iter, row_data);
4844+ var iter = m.find_row_sorted (row_data, (row1, row2) =>
4845+ {
4846+ uint category = row1[ResultColumn.CATEGORY].get_uint32 ();
4847+ return apply_sorters (row1, row2, category, _constraints);
4848+ }, null);
4849+ m.insert_iter_before (orig_iter, iter);
4850+ return true;
4851+ });
4852+ dedup_model = new Dee.FilterModel (target, filter);
4853+ // eek, circular reference
4854+ target.set_qdata (dedup_model_quark, dedup_model);
4855+ }
4856+ bool found;
4857+ bool fell_through = false;
4858+ dedup_model.find_row_sorted (row, (row1, row2) =>
4859+ {
4860+ uint category = row1[ResultColumn.CATEGORY].get_uint32 ();
4861+ // customized version of apply_sorters that's suitable for dedup
4862+ for (int i = 0; i < _constraints.length; i++)
4863+ {
4864+ unowned Sorter sorter = _constraints[i];
4865+ if (sorter.category >= 0 && sorter.category != category) continue;
4866+ int sorter_result = sorter.apply (row1, row2);
4867+ if (sorter_result != 0 || i == _constraints.length - 1)
4868+ return sorter_result;
4869+ }
4870+ fell_through = true;
4871+ return 0;
4872+ }, out found);
4873+ if (found && !fell_through) return null;
4874+ }
4875+
4876+ return target.insert_row_sorted (row, (row1, row2) =>
4877+ {
4878+ // first of all sort by categories
4879+ uint category = row1[ResultColumn.CATEGORY].get_uint32 ();
4880+ int cat_delta = (int) category -
4881+ (int) row2[ResultColumn.CATEGORY].get_uint32 ();
4882+ if (cat_delta != 0) return cat_delta > 0 ? 1 : -1;
4883+
4884+ return apply_sorters (row1, row2, category, _sorters);
4885+ });
4886+ }
4887+
4888+ private unowned ScopeProxy? get_proxy_for_result (Variant? result_metadata,
4889+ out string? scope_id)
4890+ throws ScopeError
4891+ {
4892+ if (result_metadata == null)
4893+ throw new ScopeError.REQUEST_FAILED ("Unable to find scope proxy");
4894+
4895+ string scope_uid;
4896+ if (!result_metadata.lookup ("scope-uid", "s", out scope_uid))
4897+ throw new ScopeError.REQUEST_FAILED ("Unable to find scope proxy");
4898+
4899+ if (scope_uid.has_prefix ("0x"))
4900+ {
4901+ unowned ScopeProxy result = _scopes.get_proxy_for_uid (scope_uid);
4902+ scope_id = _scopes.scope_id_for_proxy (result);
4903+ return result;
4904+ }
4905+ else if (scope_uid.has_prefix ("remote:"))
4906+ {
4907+ // special case the proxy for results that were pushed
4908+ var parts = scope_uid.split (":", 2);
4909+ scope_id = parts[1];
4910+ return null;
4911+ }
4912+
4913+ throw new ScopeError.REQUEST_FAILED ("Invalid scope UID");
4914+ }
4915+
4916+
4917+ /*
4918+ * DBus Interface Implementation
4919+ */
4920+ public async ActivationReplyRaw activate (
4921+ string channel_id,
4922+ Variant[] result_arr,
4923+ uint action_type,
4924+ HashTable<string, Variant> hints,
4925+ GLib.Cancellable? cancellable) throws IOError, ScopeError
4926+ {
4927+ var channel = get_channel_by_id (channel_id); // ensure the channel is valid
4928+
4929+ string? scope_id;
4930+ unowned ScopeProxy proxy;
4931+ Variant metadata = result_arr[ResultColumn.METADATA];
4932+ proxy = get_proxy_for_result (metadata, out scope_id);
4933+ result_arr[ResultColumn.METADATA] = metadata.lookup_value ("content", null);
4934+
4935+ var scope_result = ScopeResult ();
4936+ scope_result.uri = result_arr[ResultColumn.URI].get_string ();
4937+ scope_result.icon_hint = result_arr[ResultColumn.ICON_HINT].get_string ();
4938+ scope_result.category = result_arr[ResultColumn.CATEGORY].get_uint32 ();
4939+ scope_result.result_type = (ResultType) result_arr[ResultColumn.RESULT_TYPE].get_uint32 ();
4940+ scope_result.mimetype = result_arr[ResultColumn.MIMETYPE].get_string ();
4941+ scope_result.title = result_arr[ResultColumn.TITLE].get_string ();
4942+ scope_result.comment = result_arr[ResultColumn.COMMENT].get_string ();
4943+ scope_result.dnd_uri = result_arr[ResultColumn.DND_URI].get_string ();
4944+ if (result_arr[ResultColumn.METADATA].get_type ().equal (VariantType.VARDICT))
4945+ {
4946+ scope_result.metadata = (HashTable<string, Variant>) result_arr[ResultColumn.METADATA];
4947+ }
4948+
4949+ if (scope_id == null)
4950+ {
4951+ throw new ScopeError.REQUEST_FAILED ("Unable to determine scope id!");
4952+ }
4953+
4954+ // arrays in async methods are not copied by default, force the copy
4955+ var result_arr_cpy = result_arr;
4956+ var activation_obj = new AggregatorActivation (channel_id, scope_id,
4957+ action_type, scope_result);
4958+
4959+ var response = yield owner.activate (activation_obj);
4960+ if (response != null)
4961+ {
4962+ var raw = ActivationReplyRaw ();
4963+ raw.uri = scope_result.uri;
4964+ raw.handled = response.handled;
4965+ raw.hints = response.get_hints ();
4966+
4967+ return raw;
4968+ }
4969+
4970+ if (proxy == null)
4971+ {
4972+ if (action_type != Protocol.ActionType.PREVIEW_RESULT)
4973+ {
4974+ response = new ActivationResponse (HandledType.NOT_HANDLED);
4975+ }
4976+ else
4977+ {
4978+ response = new ActivationResponse.with_preview (GenericPreview.empty ());
4979+ }
4980+ var raw = ActivationReplyRaw ();
4981+ raw.uri = scope_result.uri;
4982+ raw.handled = response.handled;
4983+ raw.hints = response.get_hints ();
4984+
4985+ return raw;
4986+ }
4987+
4988+ /* proxy the request by default */
4989+ try
4990+ {
4991+ return yield _scopes.activate_wrapper (channel_id, scope_id,
4992+ channel.channel_type,
4993+ (owned) result_arr_cpy,
4994+ action_type, hints, cancellable);
4995+ }
4996+ catch (ScopeError scope_error)
4997+ {
4998+ throw scope_error;
4999+ }
5000+ catch (Error err)
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches