summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeif Lotfy <seif@lotfy.com>2012-12-23 22:15:24 +0100
committerSeif Lotfy <seif@lotfy.com>2012-12-23 22:15:24 +0100
commita2a744e8d710a5b273e4c784e6f2d34294ca0df1 (patch)
treee98b0aac6dc3c957af7251cd8ca28a96365519ce
parent218a5d8056f0237ecf8bcd55fa900695a4c75442 (diff)
fix ownership of arguments passed
-rw-r--r--libzeitgeist/log.vala8
-rw-r--r--libzeitgeist/monitor.vala2
-rw-r--r--src/zeitgeist-daemon.vala1
3 files changed, 5 insertions, 6 deletions
diff --git a/libzeitgeist/log.vala b/libzeitgeist/log.vala
index 1192b689..67dc0238 100644
--- a/libzeitgeist/log.vala
+++ b/libzeitgeist/log.vala
@@ -137,7 +137,7 @@ public class Log : QueuedProxyWrapper
* @param events An {@link GenericArray} of {@link Event}
* @param cancellable To cancel the operation or NULL
*/
- public async Array<uint32> insert_events (GenericArray<Event> events,
+ public async Array<uint32> insert_events (owned GenericArray<Event> events,
Cancellable? cancellable=null) throws Error
{
yield wait_for_proxy ();
@@ -178,7 +178,7 @@ public class Log : QueuedProxyWrapper
*
* @param events An {@link GenericArray} of {@link Event}
*/
- public async void insert_events_no_reply (GenericArray<Event> events)
+ public async void insert_events_no_reply (owned GenericArray<Event> events)
throws Error
{
yield insert_events (events);
@@ -350,7 +350,7 @@ public class Log : QueuedProxyWrapper
*
* @param monitor A {@link Monitor} to report back inserts and deletes
*/
- public void install_monitor (Monitor monitor) throws Error
+ public void install_monitor (owned Monitor monitor) throws Error
{
// FIXME
//monitor.destroy.connect (() => {});
@@ -393,7 +393,7 @@ public class Log : QueuedProxyWrapper
*
* @param monitor A {@link Monitor} to report back inserts and deletes
*/
- public async void remove_monitor (Monitor monitor) throws Error
+ public async void remove_monitor (owned Monitor monitor) throws Error
{
yield wait_for_proxy ();
diff --git a/libzeitgeist/monitor.vala b/libzeitgeist/monitor.vala
index 5a2b898a..754d9d97 100644
--- a/libzeitgeist/monitor.vala
+++ b/libzeitgeist/monitor.vala
@@ -89,7 +89,7 @@ public class Monitor : Object, RemoteMonitor
*
* @return A reference to a newly allocated monitor
*/
- public Monitor (TimeRange time_range, GenericArray<Event> event_templates)
+ public Monitor (TimeRange time_range, owned GenericArray<Event> event_templates)
{
this.time_range = time_range;
this.event_templates = event_templates;
diff --git a/src/zeitgeist-daemon.vala b/src/zeitgeist-daemon.vala
index 6b54a092..79c6aa65 100644
--- a/src/zeitgeist-daemon.vala
+++ b/src/zeitgeist-daemon.vala
@@ -192,7 +192,6 @@ namespace Zeitgeist
BusName? sender=null) throws Error
{
var events = Events.from_variant (vevents);
-
uint32[] event_ids = engine.insert_events (events, sender);
var min_timestamp = int64.MAX;
var max_timestamp = int64.MIN;