Repository: qpid-proton
Updated Branches:
  refs/heads/master 23dc0a618 -> da1411e73


renamed PN_TIMER to PN_TIMER_TASK; added python and java wrapper


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

Branch: refs/heads/master
Commit: 80ddb3423ea5bd4e370056995da7fe28376cc1a6
Parents: 23dc0a6
Author: Rafael Schloming <[email protected]>
Authored: Sun Jan 11 14:17:10 2015 -0500
Committer: Rafael Schloming <[email protected]>
Committed: Sun Jan 11 14:17:10 2015 -0500

----------------------------------------------------------------------
 proton-c/bindings/python/proton/__init__.py                     | 2 ++
 proton-c/include/proton/cproton.i                               | 1 +
 proton-c/include/proton/event.h                                 | 2 +-
 proton-c/src/events/event.c                                     | 4 ++--
 proton-c/src/reactor/timer.c                                    | 2 +-
 proton-c/src/tests/reactor.c                                    | 4 ++--
 proton-j/src/main/java/org/apache/qpid/proton/engine/Event.java | 2 ++
 proton-j/src/main/resources/cengine.py                          | 2 ++
 8 files changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80ddb342/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 439e040..537276b 100644
--- a/proton-c/bindings/python/proton/__init__.py
+++ b/proton-c/bindings/python/proton/__init__.py
@@ -3330,6 +3330,8 @@ class Event(EventBase):
   REACTOR_INIT = EventType(PN_REACTOR_INIT, "on_reactor_init")
   REACTOR_FINAL = EventType(PN_REACTOR_FINAL, "on_reactor_final")
 
+  TIMER_TASK = EventType(PN_TIMER_TASK, "on_timer_task")
+
   CONNECTION_INIT = EventType(PN_CONNECTION_INIT, "on_connection_init")
   CONNECTION_BOUND = EventType(PN_CONNECTION_BOUND, "on_connection_bound")
   CONNECTION_UNBOUND = EventType(PN_CONNECTION_UNBOUND, 
"on_connection_unbound")

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80ddb342/proton-c/include/proton/cproton.i
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/cproton.i 
b/proton-c/include/proton/cproton.i
index 789de4b..17a8c37 100644
--- a/proton-c/include/proton/cproton.i
+++ b/proton-c/include/proton/cproton.i
@@ -1395,6 +1395,7 @@ typedef unsigned long int uintptr_t;
   pn_delivery_t *pn_cast_pn_delivery(void *x) { return (pn_delivery_t *) x; }
   pn_transport_t *pn_cast_pn_transport(void *x) { return (pn_transport_t *) x; 
}
   pn_reactor_t *pn_cast_pn_reactor(void *x) { return (pn_reactor_t *) x; }
+  pn_task_t *pn_cast_pn_task(void *x) { return (pn_task_t *) x; }
 %}
 
 %include "proton/url.h"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80ddb342/proton-c/include/proton/event.h
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/event.h b/proton-c/include/proton/event.h
index 60bce86..9db25dd 100644
--- a/proton-c/include/proton/event.h
+++ b/proton-c/include/proton/event.h
@@ -100,7 +100,7 @@ typedef enum {
   /**
    * A timer event has occurred.
    */
-  PN_TIMER,
+  PN_TIMER_TASK,
 
   /**
    * The connection has been created. This is the first event that

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80ddb342/proton-c/src/events/event.c
----------------------------------------------------------------------
diff --git a/proton-c/src/events/event.c b/proton-c/src/events/event.c
index 2fa4e06..04a5a78 100644
--- a/proton-c/src/events/event.c
+++ b/proton-c/src/events/event.c
@@ -236,8 +236,8 @@ const char *pn_event_type_name(pn_event_type_t type)
     return "PN_REACTOR_INIT";
   case PN_REACTOR_FINAL:
     return "PN_REACTOR_FINAL";
-  case PN_TIMER:
-    return "PN_TIMER";
+  case PN_TIMER_TASK:
+    return "PN_TIMER_TASK";
   case PN_CONNECTION_INIT:
     return "PN_CONNECTION_INIT";
   case PN_CONNECTION_BOUND:

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80ddb342/proton-c/src/reactor/timer.c
----------------------------------------------------------------------
diff --git a/proton-c/src/reactor/timer.c b/proton-c/src/reactor/timer.c
index fd4b39e..8281fea 100644
--- a/proton-c/src/reactor/timer.c
+++ b/proton-c/src/reactor/timer.c
@@ -130,7 +130,7 @@ void pn_timer_tick(pn_timer_t *timer, pn_timestamp_t now) {
     if (now >= task->deadline) {
       pn_task_t *min = (pn_task_t *) pn_list_minpop(timer->tasks);
       assert(min == task);
-      pn_collector_put(timer->collector, PN_OBJECT, task, PN_TIMER);
+      pn_collector_put(timer->collector, PN_OBJECT, task, PN_TIMER_TASK);
       pn_decref(task);
     } else {
       break;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80ddb342/proton-c/src/tests/reactor.c
----------------------------------------------------------------------
diff --git a/proton-c/src/tests/reactor.c b/proton-c/src/tests/reactor.c
index 8455fa8..bc4eeb3 100644
--- a/proton-c/src/tests/reactor.c
+++ b/proton-c/src/tests/reactor.c
@@ -401,7 +401,7 @@ static void test_reactor_schedule(void) {
   pn_reactor_schedule(reactor, 0, NULL);
   pn_reactor_run(reactor);
   pn_reactor_free(reactor);
-  expect(events, PN_REACTOR_INIT, PN_TIMER, PN_REACTOR_FINAL, END);
+  expect(events, PN_REACTOR_INIT, PN_TIMER_TASK, PN_REACTOR_FINAL, END);
   pn_free(events);
 }
 
@@ -417,7 +417,7 @@ static void test_reactor_schedule_handler(void) {
   pn_reactor_free(reactor);
   pn_handler_free(th);
   expect(events, PN_REACTOR_INIT, PN_REACTOR_FINAL, END);
-  expect(tevents, PN_TIMER, END);
+  expect(tevents, PN_TIMER_TASK, END);
   pn_free(events);
   pn_free(tevents);
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80ddb342/proton-j/src/main/java/org/apache/qpid/proton/engine/Event.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/Event.java 
b/proton-j/src/main/java/org/apache/qpid/proton/engine/Event.java
index 52a2ed3..36d1a7b 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/Event.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/Event.java
@@ -33,6 +33,8 @@ public interface Event
         REACTOR_INIT,
         REACTOR_FINAL,
 
+        TIMER_TASK,
+
         CONNECTION_INIT,
         CONNECTION_BOUND,
         CONNECTION_UNBOUND,

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/80ddb342/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 6d0fc8f..3730bec 100644
--- a/proton-j/src/main/resources/cengine.py
+++ b/proton-j/src/main/resources/cengine.py
@@ -953,6 +953,8 @@ from org.apache.qpid.proton.engine import Event
 PN_REACTOR_INIT = Event.Type.REACTOR_INIT
 PN_REACTOR_FINAL = Event.Type.REACTOR_FINAL
 
+PN_TIMER_TASK = Event.Type.TIMER_TASK
+
 PN_CONNECTION_INIT = Event.Type.CONNECTION_INIT
 PN_CONNECTION_BOUND = Event.Type.CONNECTION_BOUND
 PN_CONNECTION_UNBOUND = Event.Type.CONNECTION_UNBOUND


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

Reply via email to