zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #03858
[Branch ~zeitgeist/zeitgeist/bluebird] Rev 204: add get_data_source_from_id and modify test case expectation temporatly
------------------------------------------------------------
revno: 204
committer: Seif Lotfy <seif@xxxxxxxxx>
branch nick: bluebird
timestamp: Wed 2011-08-31 02:30:01 +0200
message:
add get_data_source_from_id and modify test case expectation temporatly
FIXME: why segfault?
modified:
extensions/ds-registry.vala
test/dbus/dsr-test.py
--
lp:~zeitgeist/zeitgeist/bluebird
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird
Your team Zeitgeist Framework Team is subscribed to branch lp:~zeitgeist/zeitgeist/bluebird.
To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'extensions/ds-registry.vala'
--- extensions/ds-registry.vala 2011-08-26 10:14:53 +0000
+++ extensions/ds-registry.vala 2011-08-31 00:30:01 +0000
@@ -30,7 +30,9 @@
throws Error;
public abstract void set_data_source_enabled (string unique_id,
bool enabled) throws Error;
-
+ [DBus (signature = "(sssa(asaasay)bxb)")]
+ public abstract Variant get_data_source_from_id (string id) throws Error;
+
public signal void data_source_disconnected (
[DBus (signature = "(sssa(asaasay)bxb)")] Variant data_source);
public signal void data_source_enabled (string unique_id,
@@ -201,6 +203,16 @@
warning ("DataSource \"%s\" wasn't registered!", unique_id);
}
}
+
+ public Variant get_data_source_from_id (string unique_id)
+ {
+ unowned DataSource? ds = sources.lookup (unique_id);
+ if (ds != null)
+ {
+ return ds.to_variant();
+ }
+ return null;
+ }
}
[ModuleInit]
=== modified file 'test/dbus/dsr-test.py'
--- test/dbus/dsr-test.py 2011-08-30 18:37:26 +0000
+++ test/dbus/dsr-test.py 2011-08-31 00:30:01 +0000
@@ -85,6 +85,7 @@
without DBus wrappings etc.
"""
popo = []
+ ev[0][0] = ""
popo.append(map(unicode, ev[0]))
popo.append([map(unicode, subj) for subj in ev[1]])
# We need the check here so that if D-Bus gives us an empty