NO-JIRA: Add event root to python bindings

Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f9e9ca99
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f9e9ca99
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f9e9ca99

Branch: refs/heads/proton-go
Commit: f9e9ca998d5f9c526c5cff3f985ffa994409fa72
Parents: 529fc5d
Author: Bozo Dragojevic <[email protected]>
Authored: Mon Sep 28 08:26:26 2015 +0200
Committer: Bozo Dragojevic <[email protected]>
Committed: Mon Sep 28 13:01:24 2015 +0200

----------------------------------------------------------------------
 proton-c/bindings/python/proton/__init__.py | 4 ++++
 proton-j/src/main/resources/cengine.py      | 3 +++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f9e9ca99/proton-c/bindings/python/proton/__init__.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton/__init__.py 
b/proton-c/bindings/python/proton/__init__.py
index 150b434..0567095 100644
--- a/proton-c/bindings/python/proton/__init__.py
+++ b/proton-c/bindings/python/proton/__init__.py
@@ -3779,6 +3779,10 @@ class Event(Wrapper, EventBase):
       return None
 
   @property
+  def root(self):
+    return WrappedHandler.wrap(pn_event_root(self._impl))
+
+  @property
   def context(self):
     """Returns the context object associated with the event. The type of this 
depend on the type of event."""
     return wrappers[self.clazz](pn_event_context(self._impl))

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f9e9ca99/proton-j/src/main/resources/cengine.py
----------------------------------------------------------------------
diff --git a/proton-j/src/main/resources/cengine.py 
b/proton-j/src/main/resources/cengine.py
index 319740e..141c482 100644
--- a/proton-j/src/main/resources/cengine.py
+++ b/proton-j/src/main/resources/cengine.py
@@ -1114,6 +1114,9 @@ def pn_event_context(event):
 def pn_event_type(event):
   return event.impl.getEventType()
 
+def pn_event_root(event):
+  return event.impl.getRootHandler()
+
 def pn_event_type_name(etype):
   return str(etype)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to