lp:~kamstrup/zeitgeist/notification

Created by Mikkel Kamstrup Erlandsen and last modified
Get this branch:
bzr branch lp:~kamstrup/zeitgeist/notification
Only Mikkel Kamstrup Erlandsen can upload to this branch. If you are Mikkel Kamstrup Erlandsen please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Mikkel Kamstrup Erlandsen
Project:
Zeitgeist Framework
Status:
Merged

Recent revisions

1214. By Mikkel Kamstrup Erlandsen

Allow an empty set of Monitor templates to match anything

1213. By Mikkel Kamstrup Erlandsen

Whopping commit updating the Monitor/Notify framework as follows:

org.gnome.zeitgeist.Monitor now has two methods:

  NotifyInsert(in (xx) time_range, in aE events)
  NotifyDelete(in (xx) time_range, in au event_ids)

The client.install_monitor() method needed to be adapted to take two callbacks instad
The NotifyDelete call always receives _all_ deleted event ids. We can however at times
drop the notification all together if the Monitor time range is outside of the time range
of the deleted events.

The core notification system, notify.py needed update to this new DBus signature

I also changed delete_events() in resonance_engine.py to return the max and min
timestamps for the affectedd events.

Add some convenience constructors to TimeRange. Namely .always() and .from_now().

1212. By Mikkel Kamstrup Erlandsen

Implement some convenience methods regarding time ranges:

TimeRange.intersect(time_range) - calculates the intersection TimeRange of self and time_range

Event.in_time_range(time_range) - returns True if event.timestamp lies in time_range

1211. By Mikkel Kamstrup Erlandsen

Comments and doc updates

1210. By Mikkel Kamstrup Erlandsen

Change DBus API for the Monitor.Notify() method to take an uint32 as first argument.
This first arg is an enumeration: NotifyInsert=0 and NotifyDelete=1 designating
the type of notification.

Still delete notifications remains to be handled. I wrote in the docs that we only
return the event ids in the event structs on NotifyDelete

1209. By Mikkel Kamstrup Erlandsen

Fix insertion/removal of monitors in notify.py. The attached test case exposes a bug where we must use the monitor hash as key instead of simply the monitor itself

1208. By Mikkel Kamstrup Erlandsen

Fix signature of the dispath_handler() in client.remove_monitor()

Also fix a warning statement

1207. By Mikkel Kamstrup Erlandsen

Fix type in debug string

1206. By Mikkel Kamstrup Erlandsen

Add a monitor_removed_handler arg to remove_monitor()

1205. By Mikkel Kamstrup Erlandsen

Add some clarifying comments in the install_monitor()

Fix debug statement in remove_monitor()

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:zeitgeist/0.1
This branch contains Public information 
Everyone can see this information.