Permalink
Browse files

Added `SiriPlugin.complete` function to cleanly end a session

  • Loading branch information...
1 parent 03421cb commit 319396c1104a4e6928aa5c9818f37d456c42f20b @wrboyce committed Nov 25, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 sirious/plugins/__init__.py
@@ -24,6 +24,11 @@ def handle_answer(*a, **kw):
dispatcher.disconnect(handle_answer, signal='consume_phrase')
dispatcher.connect(handle_answer, signal='consume_phrase')
+ def complete(self):
+ request_complete = SiriObjects.RequestCompleted()
+ request_complete.make_root(self.proxy.ref_id)
+ self.proxy.inject_plist(request_complete.to_dict())
+
def plist_from_server(self, plist):
return plist

0 comments on commit 319396c

Please sign in to comment.