1.1 --- a/imip_store.py Wed Aug 12 18:23:24 2015 +0200
1.2 +++ b/imip_store.py Wed Aug 12 22:40:50 2015 +0200
1.3 @@ -348,6 +348,11 @@
1.4 """
1.5 Return a set of uncancelled events of the form (uid, recurrenceid)
1.6 providing free/busy details beyond the given datetime 'dt'.
1.7 +
1.8 + If 'dt' is not specified, all events previously found to provide
1.9 + details will be returned. Otherwise, if 'dt' is earlier than the
1.10 + datetime recorded for the known providers, None is returned, indicating
1.11 + that the list of providers must be recomputed.
1.12 """
1.13
1.14 filename = self.get_object_in_store(user, "freebusy-providers")
1.15 @@ -375,6 +380,25 @@
1.16
1.17 return t[1:]
1.18
1.19 + def set_freebusy_providers(self, user, dt, providers):
1.20 +
1.21 + """
1.22 + Define the uncancelled events providing free/busy details beyond the
1.23 + given datetime 'dt'.
1.24 + """
1.25 +
1.26 + t = [(format_datetime(dt),)]
1.27 +
1.28 + for obj in providers:
1.29 + t.append((obj.get_uid(), obj.get_recurrenceid() or ""))
1.30 +
1.31 + filename = self.get_object_in_store(user, "freebusy-providers")
1.32 + if not filename:
1.33 + return False
1.34 +
1.35 + self._set_table(user, filename, t)
1.36 + return True
1.37 +
1.38 # Free/busy period access.
1.39
1.40 def get_freebusy(self, user):