1.1 --- a/imip_store.py Sat Sep 19 00:11:13 2015 +0200
1.2 +++ b/imip_store.py Sat Sep 19 01:07:40 2015 +0200
1.3 @@ -741,12 +741,33 @@
1.4 self.set_requests(user, result)
1.5 return True
1.6
1.7 - def have_request(self, requests, uid, recurrenceid=None):
1.8 + def have_request(self, requests, uid, recurrenceid=None, type=None, strict=False):
1.9 +
1.10 + """
1.11 + Return whether 'requests' contains a request with the given 'uid' and
1.12 + any specified 'recurrenceid' and 'type'. If 'strict' is set to a true
1.13 + value, the precise type of the request must match; otherwise, any type
1.14 + of request for the identified object may be matched.
1.15 + """
1.16 +
1.17 for request in requests:
1.18 if request[:2] == (uid, recurrenceid):
1.19 return True
1.20 return False
1.21
1.22 + def get_counter(self, user, uid, recurrenceid=None):
1.23 +
1.24 + """
1.25 + For the given 'user', return the counter-proposal for the given 'uid'
1.26 + and optional 'recurrenceid'.
1.27 + """
1.28 +
1.29 + filename = self.get_event_filename(user, uid, recurrenceid, "counters")
1.30 + if not filename:
1.31 + return False
1.32 +
1.33 + return filename and self._get_object(user, filename)
1.34 +
1.35 def set_counter(self, user, node, uid, recurrenceid=None):
1.36
1.37 """