You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jr...@apache.org on 2018/03/20 18:33:36 UTC

[1/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Repository: qpid-proton
Updated Branches:
  refs/heads/master c82de9d3d -> 0c9bb9ffc


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py b/tests/python/proton_tests/messenger.py
deleted file mode 100644
index 91283ed..0000000
--- a/tests/python/proton_tests/messenger.py
+++ /dev/null
@@ -1,1089 +0,0 @@
-from __future__ import absolute_import
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-import os, sys, traceback
-from . import common
-from proton import *
-from threading import Thread, Event
-from time import sleep, time
-from .common import Skipped
-
-class Test(common.Test):
-
-  def setUp(self):
-    self.server_credit = 10
-    self.server_received = 0
-    self.server_finite_credit = False
-    self.server = Messenger("server")
-    self.server.timeout = self.timeout
-    self.server.start()
-    self.port = common.free_tcp_port()
-    self.server.subscribe("amqp://~127.0.0.1:%d" % self.port)
-    self.server_thread = Thread(name="server-thread", target=self.run_server)
-    self.server_thread.daemon = True
-    self.server_is_running_event = Event()
-    self.running = True
-    self.server_thread_started = False
-
-    self.client = Messenger("client")
-    self.client.timeout = self.timeout
-
-  def start(self):
-    self.server_thread_started = True
-    self.server_thread.start()
-    self.server_is_running_event.wait(self.timeout)
-    self.client.start()
-
-  def _safelyStopClient(self):
-    self.server.interrupt()
-    self.client.stop()
-    self.client = None
-
-  def tearDown(self):
-    try:
-      if self.running:
-        if not self.server_thread_started: self.start()
-        # send a message to cause the server to promptly exit
-        self.running = False
-        self._safelyStopClient()
-    finally:
-      self.server_thread.join(self.timeout)
-      self.server = None
-
-REJECT_ME = "*REJECT-ME*"
-
-class MessengerTest(Test):
-
-  def run_server(self):
-    if self.server_finite_credit:
-      self._run_server_finite_credit()
-    else:
-      self._run_server_recv()
-
-  def _run_server_recv(self):
-    """ Use recv() to replenish credit each time the server waits
-    """
-    msg = Message()
-    try:
-      while self.running:
-        self.server_is_running_event.set()
-        try:
-          self.server.recv(self.server_credit)
-          self.process_incoming(msg)
-        except Interrupt:
-          pass
-    finally:
-      self.server.stop()
-      self.running = False
-
-  def _run_server_finite_credit(self):
-    """ Grant credit once, process until credit runs out
-    """
-    msg = Message()
-    self.server_is_running_event.set()
-    try:
-      self.server.recv(self.server_credit)
-      while self.running:
-        try:
-          # do not grant additional credit (eg. call recv())
-          self.process_incoming(msg)
-          self.server.work()
-        except Interrupt:
-          break
-    finally:
-      self.server.stop()
-      self.running = False
-
-  def process_incoming(self, msg):
-    while self.server.incoming:
-      self.server.get(msg)
-      self.server_received += 1
-      if msg.body == REJECT_ME:
-        self.server.reject()
-      else:
-        self.server.accept()
-      self.dispatch(msg)
-
-  def dispatch(self, msg):
-    if msg.reply_to:
-      msg.address = msg.reply_to
-      self.server.put(msg)
-      self.server.settle()
-
-  def testSendReceive(self, size=None, address_size=None):
-    self.start()
-    msg = Message()
-    if address_size:
-      msg.address="amqp://127.0.0.1:%d/%s" % (self.port, "x"*address_size)
-    else:
-      msg.address="amqp://127.0.0.1:%d" % self.port
-    msg.reply_to = "~"
-    msg.subject="Hello World!"
-    body = "First the world, then the galaxy!"
-    if size is not None:
-      while len(body) < size:
-        body = 2*body
-      body = body[:size]
-    msg.body = body
-    self.client.put(msg)
-    self.client.send()
-
-    reply = Message()
-    self.client.recv(1)
-    assert self.client.incoming == 1, self.client.incoming
-    self.client.get(reply)
-
-    assert reply.subject == "Hello World!"
-    rbod = reply.body
-    assert rbod == body, (rbod, body)
-
-  def testSendReceive1K(self):
-    self.testSendReceive(1024)
-
-  def testSendReceive2K(self):
-    self.testSendReceive(2*1024)
-
-  def testSendReceive4K(self):
-    self.testSendReceive(4*1024)
-
-  def testSendReceive10K(self):
-    self.testSendReceive(10*1024)
-
-  def testSendReceive100K(self):
-    self.testSendReceive(100*1024)
-
-  def testSendReceive1M(self):
-    self.testSendReceive(1024*1024)
-
-  def testSendReceiveLargeAddress(self):
-    self.testSendReceive(address_size=2048)
-
-  # PROTON-285 - prevent continually failing test
-  def xtestSendBogus(self):
-    self.start()
-    msg = Message()
-    msg.address="totally-bogus-address"
-    try:
-      self.client.put(msg)
-      assert False, "Expecting MessengerException"
-    except MessengerException:
-      exc = sys.exc_info()[1]
-      err = str(exc)
-      assert "unable to send to address: totally-bogus-address" in err, err
-
-  def testOutgoingWindow(self):
-    self.server.incoming_window = 10
-    self.start()
-    msg = Message()
-    msg.address="amqp://127.0.0.1:%d" % self.port
-    msg.subject="Hello World!"
-
-    trackers = []
-    for i in range(10):
-      trackers.append(self.client.put(msg))
-
-    self.client.send()
-
-    for t in trackers:
-      assert self.client.status(t) is None
-
-    # reduce outgoing_window to 5 and then try to send 10 messages
-    self.client.outgoing_window = 5
-
-    trackers = []
-    for i in range(10):
-      trackers.append(self.client.put(msg))
-
-    for i in range(5):
-      t = trackers[i]
-      assert self.client.status(t) is None, (t, self.client.status(t))
-
-    for i in range(5, 10):
-      t = trackers[i]
-      assert self.client.status(t) is PENDING, (t, self.client.status(t))
-
-    self.client.send()
-
-    for i in range(5):
-      t = trackers[i]
-      assert self.client.status(t) is None
-
-    for i in range(5, 10):
-      t = trackers[i]
-      assert self.client.status(t) is ACCEPTED
-
-  def testReject(self, process_incoming=None):
-    if process_incoming:
-      self.process_incoming = process_incoming
-    self.server.incoming_window = 10
-    self.start()
-    msg = Message()
-    msg.address="amqp://127.0.0.1:%d" % self.port
-    msg.subject="Hello World!"
-
-    self.client.outgoing_window = 10
-    trackers = []
-    rejected = []
-    for i in range(10):
-      if i == 5:
-        msg.body = REJECT_ME
-      else:
-        msg.body = "Yay!"
-      trackers.append(self.client.put(msg))
-      if msg.body == REJECT_ME:
-        rejected.append(trackers[-1])
-
-    self.client.send()
-
-    for t in trackers:
-      if t in rejected:
-        assert self.client.status(t) is REJECTED, (t, self.client.status(t))
-      else:
-        assert self.client.status(t) is ACCEPTED, (t, self.client.status(t))
-
-  def testRejectIndividual(self):
-    self.testReject(self.reject_individual)
-
-  def reject_individual(self, msg):
-    if self.server.incoming < 10:
-      self.server.work(0)
-      return
-    while self.server.incoming:
-      t = self.server.get(msg)
-      if msg.body == REJECT_ME:
-        self.server.reject(t)
-      self.dispatch(msg)
-    self.server.accept()
-
-
-  def testIncomingWindow(self):
-    self.server.incoming_window = 10
-    self.server.outgoing_window = 10
-    self.start()
-    msg = Message()
-    msg.address="amqp://127.0.0.1:%d" % self.port
-    msg.reply_to = "~"
-    msg.subject="Hello World!"
-
-    self.client.outgoing_window = 10
-    trackers = []
-    for i in range(10):
-      trackers.append(self.client.put(msg))
-
-    self.client.send()
-
-    for t in trackers:
-      assert self.client.status(t) is ACCEPTED, (t, self.client.status(t))
-
-    self.client.incoming_window = 10
-    remaining = 10
-
-    trackers = []
-    while remaining:
-      self.client.recv(remaining)
-      while self.client.incoming:
-        t = self.client.get()
-        trackers.append(t)
-        self.client.accept(t)
-        remaining -= 1
-    for t in trackers:
-      assert self.client.status(t) is ACCEPTED, (t, self.client.status(t))
-
-  def testIncomingQueueBiggerThanWindow(self, size=10):
-    self.server.outgoing_window = size
-    self.client.incoming_window = size
-    self.start()
-
-    msg = Message()
-    msg.address = "amqp://127.0.0.1:%d" % self.port
-    msg.reply_to = "~"
-    msg.subject = "Hello World!"
-
-    for i in range(2*size):
-      self.client.put(msg)
-
-    trackers = []
-    while len(trackers) < 2*size:
-      self.client.recv(2*size - len(trackers))
-      while self.client.incoming:
-        t = self.client.get(msg)
-        assert self.client.status(t) is SETTLED, (t, self.client.status(t))
-        trackers.append(t)
-
-    for t in trackers[:size]:
-      assert self.client.status(t) is None, (t, self.client.status(t))
-    for t in trackers[size:]:
-      assert self.client.status(t) is SETTLED, (t, self.client.status(t))
-
-    self.client.accept()
-
-    for t in trackers[:size]:
-      assert self.client.status(t) is None, (t, self.client.status(t))
-    for t in trackers[size:]:
-      assert self.client.status(t) is ACCEPTED, (t, self.client.status(t))
-
-  def testIncomingQueueBiggerThanSessionWindow(self):
-    self.testIncomingQueueBiggerThanWindow(2048)
-
-  def testBuffered(self):
-    self.client.outgoing_window = 1000
-    self.client.incoming_window = 1000
-    self.start();
-    assert self.server_received == 0
-    buffering = 0
-    count = 100
-    for i in range(count):
-      msg = Message()
-      msg.address="amqp://127.0.0.1:%d" % self.port
-      msg.subject="Hello World!"
-      msg.body = "First the world, then the galaxy!"
-      t = self.client.put(msg)
-      buffered = self.client.buffered(t)
-      # allow transition from False to True, but not back
-      if buffered:
-          buffering += 1
-      else:
-        assert not buffering, ("saw %s buffered deliveries before?" % buffering)
-
-    while self.client.outgoing:
-        last = self.client.outgoing
-        self.client.send()
-        #print "sent ", last - self.client.outgoing
-
-    assert self.server_received == count
-
-  def test_proton222(self):
-    self.start()
-    msg = Message()
-    msg.address="amqp://127.0.0.1:%d" % self.port
-    msg.subject="Hello World!"
-    msg.body = "First the world, then the galaxy!"
-    assert self.server_received == 0
-    self.client.put(msg)
-    self.client.send()
-    # ensure the server got the message without requiring client to stop first
-    deadline = time() + 10
-    while self.server_received == 0:
-      assert time() < deadline, "Server did not receive message!"
-      sleep(.1)
-    assert self.server_received == 1
-
-  def testUnlimitedCredit(self):
-    """ Bring up two links.  Verify credit is granted to each link by
-    transferring a message over each.
-    """
-    self.server_credit = -1
-    self.start()
-
-    msg = Message()
-    msg.address="amqp://127.0.0.1:%d/XXX" % self.port
-    msg.reply_to = "~"
-    msg.subject="Hello World!"
-    body = "First the world, then the galaxy!"
-    msg.body = body
-    self.client.put(msg)
-    self.client.send()
-
-    reply = Message()
-    self.client.recv(1)
-    assert self.client.incoming == 1
-    self.client.get(reply)
-
-    assert reply.subject == "Hello World!"
-    rbod = reply.body
-    assert rbod == body, (rbod, body)
-
-    msg = Message()
-    msg.address="amqp://127.0.0.1:%d/YYY" % self.port
-    msg.reply_to = "~"
-    msg.subject="Hello World!"
-    body = "First the world, then the galaxy!"
-    msg.body = body
-    self.client.put(msg)
-    self.client.send()
-
-    reply = Message()
-    self.client.recv(1)
-    assert self.client.incoming == 1
-    self.client.get(reply)
-
-    assert reply.subject == "Hello World!"
-    rbod = reply.body
-    assert rbod == body, (rbod, body)
-
-  def _DISABLE_test_proton268(self):
-    """ Reproducer for JIRA Proton-268 """
-    """ DISABLED: Causes failure on Jenkins, appears to be unrelated to fix """
-    self.server_credit = 2048
-    self.start()
-
-    msg = Message()
-    msg.address="amqp://127.0.0.1:%d" % self.port
-    msg.body = "X" * 1024
-
-    for x in range( 100 ):
-      self.client.put( msg )
-    self.client.send()
-
-    try:
-      self.client.stop()
-    except Timeout:
-      assert False, "Timeout waiting for client stop()"
-
-    # need to restart client, as tearDown() uses it to stop server
-    self.client.start()
-
-  def testRoute(self):
-    # anonymous cipher not supported on Windows
-    if os.name == "nt" or not common.isSSLPresent():
-        domain = "amqp"
-    else:
-        domain = "amqps"
-    port = common.free_tcp_port()
-    self.server.subscribe(domain + "://~0.0.0.0:%d" % port)
-    self.start()
-    self.client.route("route1", "amqp://127.0.0.1:%d" % self.port)
-    self.client.route("route2", domain + "://127.0.0.1:%d" % port)
-
-    msg = Message()
-    msg.address = "route1"
-    msg.reply_to = "~"
-    msg.body = "test"
-    self.client.put(msg)
-    self.client.recv(1)
-
-    reply = Message()
-    self.client.get(reply)
-
-    msg = Message()
-    msg.address = "route2"
-    msg.reply_to = "~"
-    msg.body = "test"
-    self.client.put(msg)
-    self.client.recv(1)
-
-    self.client.get(reply)
-    assert reply.body == "test"
-
-  def testDefaultRoute(self):
-    self.start()
-    self.client.route("*", "amqp://127.0.0.1:%d" % self.port)
-
-    msg = Message()
-    msg.address = "asdf"
-    msg.body = "test"
-    msg.reply_to = "~"
-
-    self.client.put(msg)
-    self.client.recv(1)
-
-    reply = Message()
-    self.client.get(reply)
-    assert reply.body == "test"
-
-  def testDefaultRouteSubstitution(self):
-    self.start()
-    self.client.route("*", "amqp://127.0.0.1:%d/$1" % self.port)
-
-    msg = Message()
-    msg.address = "asdf"
-    msg.body = "test"
-    msg.reply_to = "~"
-
-    self.client.put(msg)
-    self.client.recv(1)
-
-    reply = Message()
-    self.client.get(reply)
-    assert reply.body == "test"
-
-  def testIncomingRoute(self):
-    self.start()
-    port = common.free_tcp_port()
-    self.client.route("in", "amqp://~0.0.0.0:%d" % port)
-    self.client.subscribe("in")
-
-    msg = Message()
-    msg.address = "amqp://127.0.0.1:%d" %self.port
-    msg.reply_to = "amqp://127.0.0.1:%d" % port
-    msg.body = "test"
-
-    self.client.put(msg)
-    self.client.recv(1)
-    reply = Message()
-    self.client.get(reply)
-    assert reply.body == "test"
-
-  def echo_address(self, msg):
-    while self.server.incoming:
-      self.server.get(msg)
-      msg.body = msg.address
-      self.dispatch(msg)
-
-  def _testRewrite(self, original, rewritten):
-    self.start()
-    self.process_incoming = self.echo_address
-    self.client.route("*", "amqp://127.0.0.1:%d" % self.port)
-
-    msg = Message()
-    msg.address = original
-    msg.body = "test"
-    msg.reply_to = "~"
-
-    self.client.put(msg)
-    assert msg.address == original
-    self.client.recv(1)
-    assert self.client.incoming == 1
-
-    echo = Message()
-    self.client.get(echo)
-    assert echo.body == rewritten, (echo.body, rewritten)
-    assert msg.address == original
-
-  def testDefaultRewriteH(self):
-    self._testRewrite("original", "original")
-
-  def testDefaultRewriteUH(self):
-    self._testRewrite("user@original", "original")
-
-  def testDefaultRewriteUPH(self):
-    self._testRewrite("user:pass@original", "original")
-
-  def testDefaultRewriteHP(self):
-    self._testRewrite("original:123", "original:123")
-
-  def testDefaultRewriteUHP(self):
-    self._testRewrite("user@original:123", "original:123")
-
-  def testDefaultRewriteUPHP(self):
-    self._testRewrite("user:pass@original:123", "original:123")
-
-  def testDefaultRewriteHN(self):
-    self._testRewrite("original/name", "original/name")
-
-  def testDefaultRewriteUHN(self):
-    self._testRewrite("user@original/name", "original/name")
-
-  def testDefaultRewriteUPHN(self):
-    self._testRewrite("user:pass@original/name", "original/name")
-
-  def testDefaultRewriteHPN(self):
-    self._testRewrite("original:123/name", "original:123/name")
-
-  def testDefaultRewriteUHPN(self):
-    self._testRewrite("user@original:123/name", "original:123/name")
-
-  def testDefaultRewriteUPHPN(self):
-    self._testRewrite("user:pass@original:123/name", "original:123/name")
-
-  def testDefaultRewriteSH(self):
-    self._testRewrite("amqp://original", "amqp://original")
-
-  def testDefaultRewriteSUH(self):
-    self._testRewrite("amqp://user@original", "amqp://original")
-
-  def testDefaultRewriteSUPH(self):
-    self._testRewrite("amqp://user:pass@original", "amqp://original")
-
-  def testDefaultRewriteSHP(self):
-    self._testRewrite("amqp://original:123", "amqp://original:123")
-
-  def testDefaultRewriteSUHP(self):
-    self._testRewrite("amqp://user@original:123", "amqp://original:123")
-
-  def testDefaultRewriteSUPHP(self):
-    self._testRewrite("amqp://user:pass@original:123", "amqp://original:123")
-
-  def testDefaultRewriteSHN(self):
-    self._testRewrite("amqp://original/name", "amqp://original/name")
-
-  def testDefaultRewriteSUHN(self):
-    self._testRewrite("amqp://user@original/name", "amqp://original/name")
-
-  def testDefaultRewriteSUPHN(self):
-    self._testRewrite("amqp://user:pass@original/name", "amqp://original/name")
-
-  def testDefaultRewriteSHPN(self):
-    self._testRewrite("amqp://original:123/name", "amqp://original:123/name")
-
-  def testDefaultRewriteSUHPN(self):
-    self._testRewrite("amqp://user@original:123/name", "amqp://original:123/name")
-
-  def testDefaultRewriteSUPHPN(self):
-    self._testRewrite("amqp://user:pass@original:123/name", "amqp://original:123/name")
-
-  def testRewriteSuppress(self):
-    self.client.rewrite("*", None)
-    self._testRewrite("asdf", None)
-
-  def testRewrite(self):
-    self.client.rewrite("a", "b")
-    self._testRewrite("a", "b")
-
-  def testRewritePattern(self):
-    self.client.rewrite("amqp://%@*", "amqp://$2")
-    self._testRewrite("amqp://foo@bar", "amqp://bar")
-
-  def testRewriteToAt(self):
-    self.client.rewrite("amqp://%/*", "$2@$1")
-    self._testRewrite("amqp://domain/name", "name@domain")
-
-  def testRewriteOverrideDefault(self):
-    self.client.rewrite("*", "$1")
-    self._testRewrite("amqp://user:pass@host", "amqp://user:pass@host")
-
-  def testCreditBlockingRebalance(self):
-    """ The server is given a fixed amount of credit, and runs until that
-    credit is exhausted.
-    """
-    self.server_finite_credit = True
-    self.server_credit = 11
-    self.start()
-
-    # put one message out on "Link1" - since there are no other links, it
-    # should get all the credit (10 after sending)
-    msg = Message()
-    msg.address="amqp://127.0.0.1:%d/Link1" % self.port
-    msg.subject="Hello World!"
-    body = "First the world, then the galaxy!"
-    msg.body = body
-    msg.reply_to = "~"
-    self.client.put(msg)
-    self.client.send()
-    self.client.recv(1)
-    assert self.client.incoming == 1
-
-    # Now attempt to exhaust credit using a different link
-    for i in range(10):
-      msg.address="amqp://127.0.0.1:%d/Link2" % self.port
-      self.client.put(msg)
-    self.client.send()
-
-    deadline = time() + self.timeout
-    count = 0
-    while count < 11 and time() < deadline:
-        self.client.recv(-1)
-        while self.client.incoming:
-            self.client.get(msg)
-            count += 1
-    assert count == 11, count
-
-    # now attempt to send one more.  There isn't enough credit, so it should
-    # not be sent
-    self.client.timeout = 1
-    msg.address="amqp://127.0.0.1:%d/Link2" % self.port
-    self.client.put(msg)
-    try:
-      self.client.send()
-      assert False, "expected client to time out in send()"
-    except Timeout:
-      pass
-    assert self.client.outgoing == 1
-
-
-class NBMessengerTest(common.Test):
-
-  def setUp(self):
-    self.client = Messenger("client")
-    self.client2 = Messenger("client2")
-    self.server = Messenger("server")
-    self.messengers = [self.client, self.client2, self.server]
-    self.client.blocking = False
-    self.client2.blocking = False
-    self.server.blocking = False
-    self.server.start()
-    self.client.start()
-    self.client2.start()
-    port = common.free_tcp_port()
-    self.address = "amqp://127.0.0.1:%d" % port
-    self.server.subscribe("amqp://~0.0.0.0:%d" % port)
-
-  def _pump(self, timeout, work_triggers_exit):
-    for msgr in self.messengers:
-      if msgr.work(timeout) and work_triggers_exit:
-        return True
-    return False
-
-  def pump(self, timeout=0):
-    while self._pump(0, True): pass
-    self._pump(timeout, False)
-    while self._pump(0, True): pass
-
-  def tearDown(self):
-    self.server.stop()
-    self.client.stop()
-    self.client2.stop()
-    self.pump()
-    assert self.server.stopped
-    assert self.client.stopped
-    assert self.client2.stopped
-
-  def testSmoke(self, count=1):
-    self.server.recv()
-
-    msg = Message()
-    msg.address = self.address
-    for i in range(count):
-      msg.body = "Hello %s" % i
-      self.client.put(msg)
-
-    msg2 = Message()
-    for i in range(count):
-      if self.server.incoming == 0:
-        self.pump()
-      assert self.server.incoming > 0, self.server.incoming
-      self.server.get(msg2)
-      assert msg2.body == "Hello %s" % i, (msg2.body, i)
-
-    assert self.client.outgoing == 0, self.client.outgoing
-    assert self.server.incoming == 0, self.client.incoming
-
-  def testSmoke1024(self):
-    self.testSmoke(1024)
-
-  def testSmoke4096(self):
-    self.testSmoke(4096)
-
-  def testPushback(self):
-    self.server.recv()
-
-    msg = Message()
-    msg.address = self.address
-    for i in range(16):
-      for i in range(1024):
-        self.client.put(msg)
-      self.pump()
-      if self.client.outgoing > 0:
-        break
-
-    assert self.client.outgoing > 0
-
-  def testRecvBeforeSubscribe(self):
-    self.client.recv()
-    self.client.subscribe(self.address + "/foo")
-
-    self.pump()
-
-    msg = Message()
-    msg.address = "amqp://client/foo"
-    msg.body = "Hello World!"
-    self.server.put(msg)
-
-    assert self.client.incoming == 0
-    self.pump(self.delay)
-    assert self.client.incoming == 1
-
-    msg2 = Message()
-    self.client.get(msg2)
-    assert msg2.address == msg.address
-    assert msg2.body == msg.body
-
-  def testCreditAutoBackpressure(self):
-    """ Verify that use of automatic credit (pn_messenger_recv(-1)) does not
-    fill the incoming queue indefinitely.  If the receiver does not 'get' the
-    message, eventually the sender will block.  See PROTON-350 """
-    self.server.recv()
-    msg = Message()
-    msg.address = self.address
-    deadline = time() + self.timeout
-    while time() < deadline:
-        old = self.server.incoming
-        for j in range(1001):
-            self.client.put(msg)
-        self.pump()
-        if old == self.server.incoming:
-            break;
-    assert old == self.server.incoming, "Backpressure not active!"
-
-  def testCreditRedistribution(self):
-    """ Verify that a fixed amount of credit will redistribute to new
-    links.
-    """
-    self.server.recv( 5 )
-
-    # first link will get all credit
-    msg1 = Message()
-    msg1.address = self.address + "/msg1"
-    self.client.put(msg1)
-    self.pump()
-    assert self.server.incoming == 1, self.server.incoming
-    assert self.server.receiving == 4, self.server.receiving
-
-    # no credit left over for this link
-    msg2 = Message()
-    msg2.address = self.address + "/msg2"
-    self.client.put(msg2)
-    self.pump()
-    assert self.server.incoming == 1, self.server.incoming
-    assert self.server.receiving == 4, self.server.receiving
-
-    # eventually, credit will rebalance and the new link will send
-    deadline = time() + self.timeout
-    while time() < deadline:
-        sleep(.1)
-        self.pump()
-        if self.server.incoming == 2:
-            break;
-    assert self.server.incoming == 2, self.server.incoming
-    assert self.server.receiving == 3, self.server.receiving
-
-  def testCreditReclaim(self):
-    """ Verify that credit is reclaimed when a link with outstanding credit is
-    torn down.
-    """
-    self.server.recv( 9 )
-
-    # first link will get all credit
-    msg1 = Message()
-    msg1.address = self.address + "/msg1"
-    self.client.put(msg1)
-    self.pump()
-    assert self.server.incoming == 1, self.server.incoming
-    assert self.server.receiving == 8, self.server.receiving
-
-    # no credit left over for this link
-    msg2 = Message()
-    msg2.address = self.address + "/msg2"
-    self.client.put(msg2)
-    self.pump()
-    assert self.server.incoming == 1, self.server.incoming
-    assert self.server.receiving == 8, self.server.receiving
-
-    # and none for this new client
-    msg3 = Message()
-    msg3.address = self.address + "/msg3"
-    self.client2.put(msg3)
-    self.pump()
-
-    # eventually, credit will rebalance and all links will
-    # send a message
-    deadline = time() + self.timeout
-    while time() < deadline:
-        sleep(.1)
-        self.pump()
-        if self.server.incoming == 3:
-            break;
-    assert self.server.incoming == 3, self.server.incoming
-    assert self.server.receiving == 6, self.server.receiving
-
-    # now tear down client two, this should cause its outstanding credit to be
-    # made available to the other links
-    self.client2.stop()
-    self.pump()
-
-    for i in range(4):
-        self.client.put(msg1)
-        self.client.put(msg2)
-
-    # should exhaust all credit
-    deadline = time() + self.timeout
-    while time() < deadline:
-        sleep(.1)
-        self.pump()
-        if self.server.incoming == 9:
-            break;
-    assert self.server.incoming == 9, self.server.incoming
-    assert self.server.receiving == 0, self.server.receiving
-
-  def testCreditReplenish(self):
-    """ When extra credit is available it should be granted to the first
-    link that can use it.
-    """
-    # create three links
-    msg = Message()
-    for i in range(3):
-        msg.address = self.address + "/%d" % i
-        self.client.put(msg)
-
-    self.server.recv( 50 )  # 50/3 = 16 per link + 2 extra
-
-    self.pump()
-    assert self.server.incoming == 3, self.server.incoming
-    assert self.server.receiving == 47, self.server.receiving
-
-    # 47/3 = 15 per link, + 2 extra
-
-    # verify one link can send 15 + the two extra (17)
-    for i in range(17):
-        msg.address = self.address + "/0"
-        self.client.put(msg)
-    self.pump()
-    assert self.server.incoming == 20, self.server.incoming
-    assert self.server.receiving == 30, self.server.receiving
-
-    # now verify that the remaining credit (30) will eventually rebalance
-    # across all links (10 per link)
-    for j in range(10):
-        for i in range(3):
-            msg.address = self.address + "/%d" % i
-            self.client.put(msg)
-
-    deadline = time() + self.timeout
-    while time() < deadline:
-        sleep(.1)
-        self.pump()
-        if self.server.incoming == 50:
-            break
-    assert self.server.incoming == 50, self.server.incoming
-    assert self.server.receiving == 0, self.server.receiving
-
-from select import select
-
-class Pump:
-
-  def __init__(self, *messengers):
-    self.messengers = messengers
-    self.selectables = []
-
-  def pump_once(self):
-    for m in self.messengers:
-      while True:
-        sel = m.selectable()
-        if sel:
-          self.selectables.append(sel)
-        else:
-          break
-
-    reading = []
-    writing = []
-
-    for sel in self.selectables[:]:
-      if sel.is_terminal:
-        sel.release()
-        self.selectables.remove(sel)
-      else:
-        if sel.reading:
-          reading.append(sel)
-        if sel.writing:
-          writing.append(sel)
-
-    readable, writable, _ = select(reading, writing, [], 0.1)
-
-    count = 0
-    for s in readable:
-      s.readable()
-      count += 1
-    for s in writable:
-      s.writable()
-      count += 1
-    return count
-
-  def pump(self):
-    while self.pump_once(): pass
-
-class SelectableMessengerTest(common.Test):
-
-  def testSelectable(self, count = 1):
-    if os.name=="nt":
-      # Conflict between native OS select() in Pump and IOCP based pn_selector_t
-      # makes this fail on Windows (see PROTON-668).
-      raise Skipped("Invalid test on Windows with IOCP.")
-
-    mrcv = Messenger()
-    mrcv.passive = True
-    port = common.free_tcp_port()
-    mrcv.subscribe("amqp://~0.0.0.0:%d" % port)
-
-    msnd = Messenger()
-    msnd.passive = True
-    m = Message()
-    m.address = "amqp://127.0.0.1:%d" % port
-
-    for i in range(count):
-      m.body = u"Hello World! %s" % i
-      msnd.put(m)
-
-    p = Pump(msnd, mrcv)
-    p.pump()
-
-    assert msnd.outgoing == count
-    assert mrcv.incoming == 0
-
-    mrcv.recv()
-
-    mc = Message()
-
-    try:
-      for i in range(count):
-        while mrcv.incoming == 0:
-          p.pump()
-        assert mrcv.incoming > 0, (count, msnd.outgoing, mrcv.incoming)
-        mrcv.get(mc)
-        assert mc.body == u"Hello World! %s" % i, (i, mc.body)
-    finally:
-      mrcv.stop()
-      msnd.stop()
-      assert not mrcv.stopped
-      assert not msnd.stopped
-      p.pump()
-      assert mrcv.stopped
-      assert msnd.stopped
-
-  def testSelectable16(self):
-    self.testSelectable(count=16)
-
-  def testSelectable1024(self):
-    self.testSelectable(count=1024)
-
-  def testSelectable4096(self):
-    self.testSelectable(count=4096)
-
-
-class IdleTimeoutTest(common.Test):
-
-  def testIdleTimeout(self):
-    """
-    Verify that a Messenger connection is kept alive using empty idle frames
-    when a idle_timeout is advertised by the remote peer.
-    """
-    idle_timeout_secs = self.delay
-
-    try:
-      idle_server = common.TestServer(idle_timeout=idle_timeout_secs)
-      idle_server.timeout = self.timeout
-      idle_server.start()
-
-      idle_client = Messenger("idle_client")
-      idle_client.timeout = self.timeout
-      idle_client.start()
-
-      idle_client.subscribe("amqp://%s:%s/foo" %
-                            (idle_server.host, idle_server.port))
-      idle_client.work(idle_timeout_secs/10)
-
-      # wait up to 3x the idle timeout and hence verify that everything stays
-      # connected during that time by virtue of no Exception being raised
-      duration = 3 * idle_timeout_secs
-      deadline = time() + duration
-      while time() <= deadline:
-        idle_client.work(idle_timeout_secs/10)
-        continue
-
-      # confirm link is still active
-      assert not idle_server.conditions, idle_server.conditions
-    finally:
-      try:
-        idle_client.stop()
-      except:
-        pass
-      try:
-        idle_server.stop()
-      except:
-        pass

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/python/proton_tests/soak.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/soak.py b/tests/python/proton_tests/soak.py
index 52382ba..b7b521c 100644
--- a/tests/python/proton_tests/soak.py
+++ b/tests/python/proton_tests/soak.py
@@ -22,7 +22,6 @@ import sys
 from .common import Test, Skipped, free_tcp_ports, \
     MessengerReceiverC, MessengerSenderC, \
     MessengerReceiverValgrind, MessengerSenderValgrind, \
-    MessengerReceiverPython, MessengerSenderPython, \
     ReactorReceiverC, ReactorSenderC, \
     ReactorReceiverValgrind, ReactorSenderValgrind, \
     isSSLPresent
@@ -294,15 +293,6 @@ class MessengerTests(AppTests):
         self.valgrind_test()
         self._do_oneway_test(MessengerReceiverValgrind(), MessengerSenderValgrind())
 
-    def test_oneway_Python(self):
-        self._do_oneway_test(MessengerReceiverPython(), MessengerSenderPython())
-
-    def test_oneway_C_Python(self):
-        self._do_oneway_test(MessengerReceiverC(), MessengerSenderPython())
-
-    def test_oneway_Python_C(self):
-        self._do_oneway_test(MessengerReceiverPython(), MessengerSenderC())
-
     def test_echo_C(self):
         self._do_echo_test(MessengerReceiverC(), MessengerSenderC())
 
@@ -314,15 +304,6 @@ class MessengerTests(AppTests):
         self.valgrind_test()
         self._do_echo_test(MessengerReceiverValgrind(), MessengerSenderValgrind())
 
-    def test_echo_Python(self):
-        self._do_echo_test(MessengerReceiverPython(), MessengerSenderPython())
-
-    def test_echo_C_Python(self):
-        self._do_echo_test(MessengerReceiverC(), MessengerSenderPython())
-
-    def test_echo_Python_C(self):
-        self._do_echo_test(MessengerReceiverPython(), MessengerSenderC())
-
     def test_relay_C(self):
         self._do_relay_test(MessengerReceiverC(), MessengerReceiverC(), MessengerSenderC())
 
@@ -334,12 +315,6 @@ class MessengerTests(AppTests):
         self.valgrind_test()
         self._do_relay_test(MessengerReceiverValgrind(), MessengerReceiverValgrind(), MessengerSenderValgrind())
 
-    def test_relay_C_Python(self):
-        self._do_relay_test(MessengerReceiverC(), MessengerReceiverPython(), MessengerSenderPython())
-
-    def test_relay_Python(self):
-        self._do_relay_test(MessengerReceiverPython(), MessengerReceiverPython(), MessengerSenderPython())
-
     def test_star_topology_C(self):
         self._do_star_topology_test( MessengerReceiverC, MessengerSenderC )
 
@@ -351,15 +326,6 @@ class MessengerTests(AppTests):
         self.valgrind_test()
         self._do_star_topology_test( MessengerReceiverValgrind, MessengerSenderValgrind )
 
-    def test_star_topology_Python(self):
-        self._do_star_topology_test( MessengerReceiverPython, MessengerSenderPython )
-
-    def test_star_topology_Python_C(self):
-        self._do_star_topology_test( MessengerReceiverPython, MessengerSenderC )
-
-    def test_star_topology_C_Python(self):
-        self._do_star_topology_test( MessengerReceiverPython, MessengerSenderC )
-
     def test_oneway_reactor(self):
         self._do_oneway_test(ReactorReceiverC(), ReactorSenderC())
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/python/proton_tests/ssl.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/ssl.py b/tests/python/proton_tests/ssl.py
index 1cada89..d2e2f44 100644
--- a/tests/python/proton_tests/ssl.py
+++ b/tests/python/proton_tests/ssl.py
@@ -934,125 +934,3 @@ class SslTest(common.Test):
             assert False, "Expected error did not occur!"
         except SSLException:
             pass
-
-class MessengerSSLTests(common.Test):
-
-    def setUp(self):
-        if not common.isSSLPresent():
-            raise Skipped("No SSL libraries found.")
-        self.server = Messenger()
-        self.client = Messenger()
-        self.server.blocking = False
-        self.client.blocking = False
-
-    def tearDown(self):
-        self.server.stop()
-        self.client.stop()
-        self.pump()
-        assert self.server.stopped
-        assert self.client.stopped
-
-    def pump(self, timeout=0):
-        while self.client.work(0) or self.server.work(0): pass
-        self.client.work(timeout)
-        self.server.work(timeout)
-        while self.client.work(0) or self.server.work(0): pass
-
-    def test_server_credentials(self,
-                                cert="server-certificate.pem",
-                                key="server-private-key.pem",
-                                password="server-password",
-                                exception=None):
-        import sys
-        self.server.certificate = _testpath(cert)
-        self.server.private_key = _testpath(key)
-        self.server.password = password
-        port = common.free_tcp_ports()[0]
-        try:
-            self.server.start()
-            self.server.subscribe("amqps://~0.0.0.0:%s" % port)
-            if exception is not None:
-                assert False, "expected failure did not occur"
-        except MessengerException:
-            e = sys.exc_info()[1]
-            if exception:
-                assert exception in str(e), str(e)
-            else:
-                raise e
-
-    def test_server_credentials_bad_cert(self):
-        self.test_server_credentials(cert="bad",
-                                     exception="invalid credentials")
-
-    def test_server_credentials_bad_key(self):
-        self.test_server_credentials(key="bad",
-                                     exception="invalid credentials")
-
-    def test_server_credentials_bad_password(self):
-        self.test_server_credentials(password="bad",
-                                     exception="invalid credentials")
-
-    def test_client_credentials(self,
-                                trusted="ca-certificate.pem",
-                                cert="client-certificate.pem",
-                                key="client-private-key.pem",
-                                password="client-password",
-                                altserv=False,
-                                fail=False):
-        if altserv:
-            self.server.certificate = _testpath("bad-server-certificate.pem")
-            self.server.private_key = _testpath("bad-server-private-key.pem")
-            self.server.password = "server-password"
-        else:
-            self.server.certificate = _testpath("client-certificate.pem")
-            self.server.private_key = _testpath("client-private-key.pem")
-            self.server.password = "client-password"
-        self.server.start()
-        port = common.free_tcp_ports()[0]
-        self.server.subscribe("amqps://~0.0.0.0:%s" % port)
-        self.server.incoming_window = 10
-
-        self.client.trusted_certificates = _testpath(trusted)
-        self.client.certificate = _testpath(cert)
-        self.client.private_key = _testpath(key)
-        self.client.password = password
-        self.client.outgoing_window = 10
-        self.client.start()
-
-        self.server.recv()
-
-        msg = Message()
-        msg.address = "amqps://127.0.0.1:%s" % port
-        # make sure a large, uncompressible message body works!
-        msg.body = "".join(random.choice(string.ascii_letters)
-                           for x in range(10099))
-        trk = self.client.put(msg)
-        self.client.send()
-
-        self.pump()
-
-        if fail:
-            assert self.server.incoming == 0, self.server.incoming
-            assert self.client.status(trk) == ABORTED, self.client.status(trk)
-        else:
-            assert self.server.incoming == 1, self.server.incoming
-
-            rmsg = Message()
-            self.server.get(rmsg)
-            assert rmsg.body == msg.body
-            self.server.accept()
-            self.pump()
-
-            assert self.client.status(trk) == ACCEPTED, self.client.status(trk)
-
-    def test_client_credentials_bad_cert(self):
-        self.test_client_credentials(cert="bad", fail=True)
-
-    def test_client_credentials_bad_trusted(self):
-        self.test_client_credentials(trusted="bad", fail=True)
-
-    def test_client_credentials_bad_password(self):
-        self.test_client_credentials(password="bad", fail=True)
-
-    def test_client_credentials_untrusted(self):
-        self.test_client_credentials(altserv=True, fail=True)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/smoke/recv.php
----------------------------------------------------------------------
diff --git a/tests/smoke/recv.php b/tests/smoke/recv.php
deleted file mode 100755
index 96c2ec9..0000000
--- a/tests/smoke/recv.php
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-include("proton.php");
-
-$messenger = new Messenger();
-$messenger->incoming_window = 10;
-$message = new Message();
-
-$address = $argv[1];
-if (!$address) {
-  $address = "~0.0.0.0";
-}
-$messenger->subscribe($address);
-
-$messenger->start();
-
-while (true) {
-  $messenger->recv();
-  $messenger->get($message);
-  print "Got: $message\n";
-  $messenger->accept();
-}
-
-$messenger->stop();
-
-?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/smoke/recv.pl
----------------------------------------------------------------------
diff --git a/tests/smoke/recv.pl b/tests/smoke/recv.pl
deleted file mode 100755
index 796bb7e..0000000
--- a/tests/smoke/recv.pl
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env perl
-require 'qpid_proton.pm';
-
-my $messenger = qpid::proton::Messenger->new();
-$messenger->set_incoming_window(1);
-my $message = qpid::proton::Message->new();
-
-my $address = $ARGV[0];
-$address = "~0.0.0.0" if !defined $address;
-$messenger->subscribe($address);
-
-$messenger->start();
-
-while (true) {
-    my $err = $messenger->receive();
-    # XXX: no exceptions!
-    die $messenger->get_error() if $err < 0;
-    $messenger->get($message);
-    print "Got: $message\n";
-    $messenger->accept();
-}
-
-$messenger->stop();

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/smoke/recv.py
----------------------------------------------------------------------
diff --git a/tests/smoke/recv.py b/tests/smoke/recv.py
deleted file mode 100755
index e6aa2b6..0000000
--- a/tests/smoke/recv.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-from __future__ import print_function
-import sys
-from proton import *
-
-messenger = Messenger()
-messenger.incoming_window = 1
-message = Message()
-
-address = "~0.0.0.0"
-if len(sys.argv) > 1:
-  address = sys.argv[1]
-messenger.subscribe(address)
-
-messenger.start()
-
-while True:
-  messenger.recv()
-  messenger.get(message)
-  print("Got: %s" % message)
-  messenger.accept()
-
-messenger.stop()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/smoke/recv.rb
----------------------------------------------------------------------
diff --git a/tests/smoke/recv.rb b/tests/smoke/recv.rb
deleted file mode 100755
index 29df6cf..0000000
--- a/tests/smoke/recv.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'qpid_proton.rb'
-
-messenger = Qpid::Proton::Messenger.new()
-messenger.incoming_window = 1
-message = Qpid::Proton::Message.new()
-
-address = ARGV[0]
-if not address then
-  address = "~0.0.0.0"
-end
-messenger.subscribe(address)
-
-messenger.start()
-
-while (true) do
-  messenger.receive()
-  messenger.get(message)
-  print "Got: #{message}\n"
-  messenger.accept()
-end
-
-messenger.stop()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/smoke/send.php
----------------------------------------------------------------------
diff --git a/tests/smoke/send.php b/tests/smoke/send.php
deleted file mode 100755
index e77d89d..0000000
--- a/tests/smoke/send.php
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-include("proton.php");
-
-$messenger = new Messenger();
-$messenger->outgoing_window = 10;
-$message = new Message();
-
-$address = $argv[1];
-if (!$address) {
-  $address = "0.0.0.0";
-}
-
-$message->address = $address;
-$message->properties = Array("binding" => "php",
-                             "version" => phpversion());
-$message->body = "Hello World!";
-
-$messenger->start();
-$tracker = $messenger->put($message);
-print "Put: $message\n";
-$messenger->send();
-print "Status: " . $messenger->status($tracker) . "\n";
-$messenger->stop();
-
-?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/smoke/send.pl
----------------------------------------------------------------------
diff --git a/tests/smoke/send.pl b/tests/smoke/send.pl
deleted file mode 100755
index 11c5a04..0000000
--- a/tests/smoke/send.pl
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env perl
-require 'qpid_proton.pm';
-my $messenger = qpid::proton::Messenger->new();
-$messenger->set_outgoing_window(10);
-my $message = qpid::proton::Message->new();
-
-my $address = $ARGV[0];
-$address = "0.0.0.0" if !defined $address;
-$message->set_address($address);
-# how do we set properties and body?
-
-$messenger->start();
-my $tracker = $messenger->put($message);
-print "Put: $message\n";
-$messenger->send();
-print "Status: ", $messenger->status($tracker), "\n";
-$messenger->stop();

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/smoke/send.py
----------------------------------------------------------------------
diff --git a/tests/smoke/send.py b/tests/smoke/send.py
deleted file mode 100755
index 7daee01..0000000
--- a/tests/smoke/send.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-from __future__ import print_function
-import sys
-from proton import *
-
-messenger = Messenger()
-messenger.outgoing_window = 10
-message = Message()
-
-address = "0.0.0.0"
-if len(sys.argv) > 1:
-  address = sys.argv[1]
-
-message.address = address
-message.properties = {u"binding": u"python",
-                      u"version": sys.version}
-message.body = u"Hello World!"
-
-messenger.start()
-tracker = messenger.put(message)
-print("Put: %s" % message)
-messenger.send()
-print("Status: %s" % messenger.status(tracker))
-messenger.stop()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/smoke/send.rb
----------------------------------------------------------------------
diff --git a/tests/smoke/send.rb b/tests/smoke/send.rb
deleted file mode 100755
index c6865af..0000000
--- a/tests/smoke/send.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'qpid_proton.rb'
-
-messenger = Qpid::Proton::Messenger.new()
-messenger.outgoing_window = 10
-message = Qpid::Proton::Message.new()
-
-address = ARGV[0]
-if not address then
-  address = "0.0.0.0"
-end
-
-message.address = address
-message.properties = {"binding" => "ruby",
-  "version" => "#{RUBY_VERSION} #{RUBY_PLATFORM}"}
-message.body = "Hello World!"
-
-messenger.start()
-tracker = messenger.put(message)
-print "Put: #{message}\n"
-messenger.send()
-print "Status: ", messenger.status(tracker), "\n"
-messenger.stop()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/tools/apps/python/msgr-recv.py
----------------------------------------------------------------------
diff --git a/tests/tools/apps/python/msgr-recv.py b/tests/tools/apps/python/msgr-recv.py
deleted file mode 100755
index 757b19c..0000000
--- a/tests/tools/apps/python/msgr-recv.py
+++ /dev/null
@@ -1,206 +0,0 @@
-#!/usr/bin/env python
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-from __future__ import print_function
-import sys, optparse, time
-import logging
-from proton import *
-
-# Hi python3!
-try:
-    long()
-except:
-    long = int
-
-
-usage = """
-Usage: msgr-recv [OPTIONS]
- -a <addr>[,<addr>]* \tAddresses to listen on [amqp://~0.0.0.0]
- -c # \tNumber of messages to receive before exiting [0=forever]
- -b # \tArgument to Messenger::recv(n) [2048]
- -w # \tSize for incoming window [0]
- -t # \tInactivity timeout in seconds, -1 = no timeout [-1]
- -e # \t# seconds to report statistics, 0 = end of test [0] *TBD*
- -R \tSend reply if 'reply-to' present
- -W # \t# outgoing window size [0]
- -F <addr>[,<addr>]* \tAddresses used for forwarding received messages
- -N <name> \tSet the container name to <name>
- -X <text> \tPrint '<text>\\n' to stdout after all subscriptions are created
- -V \tEnable debug logging"""
-
-
-def parse_options( argv ):
-    parser = optparse.OptionParser(usage=usage)
-    parser.add_option("-a", dest="subscriptions", action="append", type="string")
-    parser.add_option("-c", dest="msg_count", type="int", default=0)
-    parser.add_option("-b", dest="recv_count", type="int", default=-1)
-    parser.add_option("-w", dest="incoming_window", type="int")
-    parser.add_option("-t", dest="timeout", type="int", default=-1)
-    parser.add_option("-e", dest="report_interval", type="int", default=0)
-    parser.add_option("-R", dest="reply", action="store_true")
-    parser.add_option("-W", dest="outgoing_window", type="int")
-    parser.add_option("-F", dest="forwarding_targets", action="append", type="string")
-    parser.add_option("-N", dest="name", type="string")
-    parser.add_option("-X", dest="ready_text", type="string")
-    parser.add_option("-V", dest="verbose", action="store_true")
-
-    return parser.parse_args(args=argv)
-
-
-class Statistics(object):
-    def __init__(self):
-        self.start_time = 0.0
-        self.latency_samples = 0
-        self.latency_total = 0.0
-        self.latency_min = None
-        self.latency_max = None
-
-    def start(self):
-        self.start_time = time.time()
-
-    def msg_received(self, msg):
-        ts = msg.creation_time
-        if ts:
-            l = long(time.time() * 1000) - ts
-            if l > 0.0:
-                self.latency_total += l
-                self.latency_samples += 1
-                if self.latency_samples == 1:
-                    self.latency_min = self.latency_max = l
-                else:
-                    if self.latency_min > l:
-                        self.latency_min = l
-                    if self.latency_max < l:
-                        self.latency_max = l
-
-    def report(self, sent, received):
-        secs = time.time() - self.start_time
-        print("Messages sent: %d recv: %d" % (sent, received) )
-        print("Total time: %f sec" % secs )
-        if secs:
-            print("Throughput: %f msgs/sec" % (sent/secs) )
-        if self.latency_samples:
-            print("Latency (sec): %f min %f max %f avg" % (self.latency_min/1000.0,
-                                                           self.latency_max/1000.0,
-                                                           (self.latency_total/self.latency_samples)/1000.0))
-
-
-def main(argv=None):
-    opts = parse_options(argv)[0]
-    if opts.subscriptions is None:
-        opts.subscriptions = ["amqp://~0.0.0.0"]
-    stats = Statistics()
-    sent = 0
-    received = 0
-    forwarding_index = 0
-
-    log = logging.getLogger("msgr-recv")
-    log.addHandler(logging.StreamHandler())
-    if opts.verbose:
-        log.setLevel(logging.DEBUG)
-    else:
-        log.setLevel(logging.INFO)
-
-    message = Message()
-    messenger = Messenger( opts.name )
-
-    if opts.incoming_window is not None:
-        messenger.incoming_window = opts.incoming_window
-    if opts.timeout > 0:
-        opts.timeout *= 1000
-    messenger.timeout = opts.timeout
-
-    messenger.start()
-
-    # unpack addresses that were specified using comma-separated list
-
-    for x in opts.subscriptions:
-        z = x.split(",")
-        for y in z:
-            if y:
-                log.debug("Subscribing to %s", y)
-                messenger.subscribe(y)
-
-    forwarding_targets = []
-    if opts.forwarding_targets:
-        for x in opts.forwarding_targets:
-            z = x.split(",")
-            for y in z:
-                if y:
-                    forwarding_targets.append(y)
-
-    # hack to let test scripts know when the receivers are ready (so that the
-    # senders may be started)
-    if opts.ready_text:
-        print("%s" % opts.ready_text)
-        sys.stdout.flush()
-
-    while opts.msg_count == 0 or received < opts.msg_count:
-
-        log.debug("Calling pn_messenger_recv(%d)", opts.recv_count)
-        rc = messenger.recv(opts.recv_count)
-
-        # start the timer only after receiving the first msg
-        if received == 0:
-            stats.start()
-
-        log.debug("Messages on incoming queue: %d", messenger.incoming)
-        while messenger.incoming > 0:
-            messenger.get(message)
-            received += 1
-            # TODO: header decoding?
-            # uint64_t id = pn_message_get_correlation_id( message ).u.as_ulong;
-            stats.msg_received( message )
-
-            if opts.reply:
-                if message.reply_to:
-                    log.debug("Replying to: %s", message.reply_to )
-                    message.address = message.reply_to
-                    message.creation_time = long(time.time() * 1000)
-                    messenger.put( message )
-                    sent += 1
-
-            if forwarding_targets:
-                forward_addr = forwarding_targets[forwarding_index]
-                forwarding_index += 1
-                if forwarding_index == len(forwarding_targets):
-                    forwarding_index = 0
-                log.debug("Forwarding to: %s", forward_addr )
-                message.address = forward_addr
-                message.reply_to = None
-                message.creation_time = long(time.time() * 1000)
-                messenger.put( message )
-                sent += 1
-
-        log.debug("Messages received=%lu sent=%lu", received, sent)
-
-    # this will flush any pending sends
-    if messenger.outgoing > 0:
-        log.debug("Calling pn_messenger_send()")
-        messenger.send()
-
-    messenger.stop()
-
-    stats.report( sent, received )
-    return 0
-
-
-if __name__ == "__main__":
-  sys.exit(main())

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/tools/apps/python/msgr-send.py
----------------------------------------------------------------------
diff --git a/tests/tools/apps/python/msgr-send.py b/tests/tools/apps/python/msgr-send.py
deleted file mode 100755
index 2e2583f..0000000
--- a/tests/tools/apps/python/msgr-send.py
+++ /dev/null
@@ -1,205 +0,0 @@
-#!/usr/bin/env python
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-from __future__ import print_function
-import sys, optparse, time
-import logging
-from proton import *
-
-# Hi python3!
-try:
-    long()
-except:
-    long = int
-
-
-usage = """
-Usage: msgr-send [OPTIONS]
- -a <addr>[,<addr>]* \tThe target address [amqp[s]://domain[/name]]
- -c # \tNumber of messages to send before exiting [0=forever]
- -b # \tSize of message body in bytes [1024]
- -p # \tSend batches of # messages (wait for replies before sending next batch if -R) [1024]
- -w # \t# outgoing window size [0]
- -e # \t# seconds to report statistics, 0 = end of test [0]
- -R \tWait for a reply to each sent message
- -t # \tInactivity timeout in seconds, -1 = no timeout [-1]
- -W # \tIncoming window size [0]
- -B # \tArgument to Messenger::recv(n) [-1]
- -N <name> \tSet the container name to <name>
- -V \tEnable debug logging"""
-
-
-def parse_options( argv ):
-    parser = optparse.OptionParser(usage=usage)
-    parser.add_option("-a", dest="targets", action="append", type="string")
-    parser.add_option("-c", dest="msg_count", type="int", default=0)
-    parser.add_option("-b", dest="msg_size", type="int", default=1024)
-    parser.add_option("-p", dest="send_batch", type="int", default=1024)
-    parser.add_option("-w", dest="outgoing_window", type="int")
-    parser.add_option("-e", dest="report_interval", type="int", default=0)
-    parser.add_option("-R", dest="get_replies", action="store_true")
-    parser.add_option("-t", dest="timeout", type="int", default=-1)
-    parser.add_option("-W", dest="incoming_window", type="int")
-    parser.add_option("-B", dest="recv_count", type="int", default=-1)
-    parser.add_option("-N", dest="name", type="string")
-    parser.add_option("-V", dest="verbose", action="store_true")
-
-    return parser.parse_args(args=argv)
-
-
-class Statistics(object):
-    def __init__(self):
-        self.start_time = 0.0
-        self.latency_samples = 0
-        self.latency_total = 0.0
-        self.latency_min = None
-        self.latency_max = None
-
-    def start(self):
-        self.start_time = time.time()
-
-    def msg_received(self, msg):
-        ts = msg.creation_time
-        if ts:
-            l = long(time.time() * 1000) - ts
-            if l > 0.0:
-                self.latency_total += l
-                self.latency_samples += 1
-                if self.latency_samples == 1:
-                    self.latency_min = self.latency_max = l
-                else:
-                    if self.latency_min > l:
-                        self.latency_min = l
-                    if self.latency_max < l:
-                        self.latency_max = l
-
-    def report(self, sent, received):
-        secs = time.time() - self.start_time
-        print("Messages sent: %d recv: %d" % (sent, received) )
-        print("Total time: %f sec" % secs )
-        if secs:
-            print("Throughput: %f msgs/sec" % (sent/secs) )
-        if self.latency_samples:
-            print("Latency (sec): %f min %f max %f avg" % (self.latency_min/1000.0,
-                                                           self.latency_max/1000.0,
-                                                           (self.latency_total/self.latency_samples)/1000.0))
-
-
-
-def process_replies( messenger, message, stats, max_count, log):
-    """
-    Return the # of reply messages received
-    """
-    received = 0
-    log.debug("Calling pn_messenger_recv(%d)", max_count)
-    messenger.recv( max_count )
-    log.debug("Messages on incoming queue: %d", messenger.incoming)
-    while messenger.incoming > 0:
-        messenger.get( message )
-        received += 1
-        # TODO: header decoding?
-        stats.msg_received( message )
-        # uint64_t id = pn_message_get_correlation_id( message ).u.as_ulong;
-    return received
-
-def main(argv=None):
-    opts = parse_options(argv)[0]
-    if opts.targets is None:
-        opts.targets = ["amqp://0.0.0.0"]
-    stats = Statistics()
-    sent = 0
-    received = 0
-    target_index = 0
-
-    log = logging.getLogger("msgr-send")
-    log.addHandler(logging.StreamHandler())
-    if opts.verbose:
-        log.setLevel(logging.DEBUG)
-    else:
-        log.setLevel(logging.INFO)
-
-
-    message = Message()
-    message.reply_to = "~"
-    message.body = "X" * opts.msg_size
-    reply_message = Message()
-    messenger = Messenger( opts.name )
-
-    if opts.outgoing_window is not None:
-        messenger.outgoing_window = opts.outgoing_window
-    if opts.timeout > 0:
-        opts.timeout *= 1000
-    messenger.timeout = opts.timeout
-
-    messenger.start()
-
-    # unpack targets that were specified using comma-separated list
-    #
-    targets = []
-    for x in opts.targets:
-        z = x.split(",")
-        for y in z:
-            if y:
-                targets.append(y)
-
-    stats.start()
-    while opts.msg_count == 0 or sent < opts.msg_count:
-        # send a message
-        message.address = targets[target_index]
-        if target_index == len(targets) - 1:
-            target_index = 0
-        else:
-            target_index += 1
-        message.correlation_id = sent
-        message.creation_time = long(time.time() * 1000)
-        messenger.put( message )
-        sent += 1
-
-        if opts.send_batch and (messenger.outgoing >= opts.send_batch):
-            if opts.get_replies:
-                while received < sent:
-                    # this will also transmit any pending sent messages
-                    received += process_replies( messenger, reply_message,
-                                                 stats, opts.recv_count, log )
-            else:
-                log.debug("Calling pn_messenger_send()")
-                messenger.send()
-
-    log.debug("Messages received=%d sent=%d", received, sent)
-
-    if opts.get_replies:
-        # wait for the last of the replies
-        while received < sent:
-            count = process_replies( messenger, reply_message, stats,
-                                     opts.recv_count, log )
-            received += count
-            log.debug("Messages received=%d sent=%d", received, sent)
-
-    elif messenger.outgoing > 0:
-        log.debug("Calling pn_messenger_send()")
-        messenger.send()
-
-    messenger.stop()
-
-    stats.report( sent, received )
-    return 0
-
-if __name__ == "__main__":
-    sys.exit(main())

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tools/cmake/Modules/FindEmscripten.cmake
----------------------------------------------------------------------
diff --git a/tools/cmake/Modules/FindEmscripten.cmake b/tools/cmake/Modules/FindEmscripten.cmake
deleted file mode 100644
index 7289731..0000000
--- a/tools/cmake/Modules/FindEmscripten.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# FindEmscripten
-# This module checks if Emscripten and its prerequisites are installed and if so
-# sets EMSCRIPTEN_FOUND Emscripten (https://github.com/kripken/emscripten) is a
-# C/C++ to JavaScript cross-compiler used to generate the JavaScript bindings.
-
-if (NOT EMSCRIPTEN_FOUND)
-    # First check that Node.js is installed as that is needed by Emscripten.
-    find_program(NODE node)
-    if (NOT NODE)
-        message(STATUS "Node.js (http://nodejs.org) is not installed: can't build JavaScript binding")
-    else (NOT NODE)
-        # Check that the Emscripten C/C++ to JavaScript cross-compiler is installed.
-        find_program(EMCC emcc)
-        if (NOT EMCC)
-            message(STATUS "Emscripten (https://github.com/kripken/emscripten) is not installed: can't build JavaScript binding")
-        else (NOT EMCC)
-            set(EMSCRIPTEN_FOUND ON)
-        endif (NOT EMCC)
-    endif (NOT NODE)
-endif (NOT EMSCRIPTEN_FOUND)
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tools/cmake/Modules/FindNodePackages.cmake
----------------------------------------------------------------------
diff --git a/tools/cmake/Modules/FindNodePackages.cmake b/tools/cmake/Modules/FindNodePackages.cmake
deleted file mode 100644
index f6c0e49..0000000
--- a/tools/cmake/Modules/FindNodePackages.cmake
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# FindNodePackages
-# This module finds and installs (using npm) node.js packages that are used by
-# the JavaScript binding. The binding should still compile if these packages
-# cannot be installed but certain features might not work as described below.
-#
-# * The ws package is the WebSocket library used by emscripten when the target is
-#   node.js, it isn't needed for applications hosted on a browser (where native 
-#   WebSockets will be used), but without it it won't work with node.js.
-#
-# * The jsdoc package is a JavaScript API document generator analogous to Doxygen
-#   or JavaDoc, it is used by the docs target in the JavaScript binding.
-
-if (NOT NODE_PACKAGES_FOUND)
-    # Check if the specified node.js package is already installed, if not install it.
-    macro(InstallPackage varname name)
-        execute_process(
-            COMMAND npm list --local ${name}
-            OUTPUT_VARIABLE check_package
-        )
-
-        set(${varname} OFF)
-
-        if (check_package MATCHES "${name}@.")
-            message(STATUS "Found node.js package: ${name}")
-            set(${varname} ON)
-        else()
-            message(STATUS "Installing node.js package: ${name}")
-
-            execute_process(
-                COMMAND npm install ${name}
-                WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
-                OUTPUT_VARIABLE var
-            )
-
-            if (var)
-                message(STATUS "Installed node.js package: ${name}")
-                set(${varname} ON)
-            endif (var)
-        endif()
-    endmacro()
-
-    # Check if ws WebSocket library https://github.com/websockets/ws is installed
-    # N.B. something changed between ws 0.5.0 and 0.6.0 that breaks proton js
-    # so explicitly pulling version 0.5.0
-    # TODO update javascript binding/emscripten/both to work with latest ws.
-    InstallPackage("NODE_WS_FOUND" "ws@0.5.0")
-
-    # Check if jsdoc3 API documentation generator https://github.com/jsdoc3/jsdoc is installed
-    InstallPackage("NODE_JSDOC_FOUND" "jsdoc")
-
-    set(NODE_PACKAGES_FOUND ON)
-endif (NOT NODE_PACKAGES_FOUND)
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tools/cmake/Modules/ProtonFindPerl.cmake
----------------------------------------------------------------------
diff --git a/tools/cmake/Modules/ProtonFindPerl.cmake b/tools/cmake/Modules/ProtonFindPerl.cmake
deleted file mode 100644
index e2f3fef..0000000
--- a/tools/cmake/Modules/ProtonFindPerl.cmake
+++ /dev/null
@@ -1,81 +0,0 @@
-# - Find Perl Libraries
-# This module searches for Perl libraries in the event that those files aren't
-# found by the default Cmake module.
-
-# include(${CMAKE_CURRENT_LIST_DIR}/FindPerlLibs.cmake)
-
-include(FindPerl)
-include(FindPerlLibs)
-
-if(NOT PERLLIBS_FOUND)
-  MESSAGE ( STATUS "Trying alternative search for Perl" )
-
-  # taken from Cmake 2.8 FindPerlLibs.cmake
-  EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
-                     -V:installarchlib
-                     OUTPUT_VARIABLE PERL_ARCHLIB_OUTPUT_VARIABLE
-                     RESULT_VARIABLE PERL_ARCHLIB_RESULT_VARIABLE )
-
-  if (NOT PERL_ARCHLIB_RESULT_VARIABLE)
-    string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE})
-    file(TO_CMAKE_PATH "${PERL_ARCHLIB}" PERL_ARCHLIB)
-  endif ( NOT PERL_ARCHLIB_RESULT_VARIABLE )
-
-  EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
-                    -MConfig -e "print \$Config{archlibexp}"
-                    OUTPUT_VARIABLE PERL_OUTPUT
-                    RESULT_VARIABLE PERL_RETURN_VALUE )
-
-  IF ( NOT PERL_RETURN_VALUE )
-    FIND_PATH ( PERL_INCLUDE_PATH perl.h ${PERL_OUTPUT}/CORE )
-
-    IF (PERL_INCLUDE_PATH MATCHES .*-NOTFOUND OR NOT PERL_INCLUDE_PATH)
-        MESSAGE(STATUS "Could not find perl.h")
-    ENDIF ()
-
-  ENDIF ( NOT PERL_RETURN_VALUE )
-
-  # if either the library path is not found not set at all
-  # then do our own search
-  if ( NOT PERL_LIBRARY )
-    EXECUTE_PROCESS( COMMAND ${PERL_EXECUTABLE} -V:libperl
-                     OUTPUT_VARIABLE PERL_LIBRARY_OUTPUT
-                     RESULT_VARIABLE PERL_LIBRARY_RESULT )
-
-    IF ( NOT PERL_LIBRARY_RESULT )
-      string(REGEX REPLACE "libperl='([^']+)'.*" "\\1" PERL_POSSIBLE_LIBRARIES ${PERL_LIBRARY_OUTPUT})
-    ENDIF ( NOT PERL_LIBRARY_RESULT )
-
-    MESSAGE ( STATUS  "Looking for ${PERL_POSSIBLE_LIBRARIES}" )
-
-    find_file(PERL_LIBRARY
-      NAMES ${PERL_POSSIBLE_LIBRARIES}
-      PATHS /usr/lib
-            ${PERL_ARCHLIB}/CORE
-      )
-
-  endif ( NOT PERL_LIBRARY )
-
-  IF ( PERL_LIBRARY MATCHES .*-NOTFOUND OR NOT PERL_LIBRARY )
-      EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
-                        -MConfig -e "print \$Config{libperl}"
-                        OUTPUT_VARIABLE PERL_OUTPUT
-                        RESULT_VARIABLE PERL_RETURN_VALUE )
-
-      IF ( NOT PERL_RETURN_VALUE )
-        FIND_LIBRARY ( PERL_LIBRARY NAMES ${PERL_OUTPUT}
-                                    PATHS ${PERL_INCLUDE_PATH} )
-
-      ENDIF ( NOT PERL_RETURN_VALUE )
-  ENDIF ( PERL_LIBRARY MATCHES .*-NOTFOUND OR NOT PERL_LIBRARY )
-
-  IF(PERL_LIBRARY MATCHES .*-NOTFOUND OR NOT PERL_LIBRARY OR
-     PERL_INCLUDE_PATH MATCHES .*-NOTFOUND OR NOT PERL_INCLUDE_PATH)
-    MESSAGE (STATUS "No Perl devel environment found - skipping Perl bindings")
-    SET (DEFAULT_PERL OFF)
-  ELSE()
-    MESSAGE ( STATUS "Found PerlLibs: ${PERL_LIBRARY}" )
-    SET (DEFAULT_PERL ON)
-  ENDIF()
-
-endif(NOT PERLLIBS_FOUND)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[7/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Posted by jr...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/data.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/data.js b/proton-c/bindings/javascript/data.js
deleted file mode 100644
index 05e537b..0000000
--- a/proton-c/bindings/javascript/data.js
+++ /dev/null
@@ -1,1582 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                                    Data                                   */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Constructs a proton.Data instance.
- * @classdesc
- * The Data class provides an interface for decoding, extracting, creating, and
- * encoding arbitrary AMQP data. A Data object contains a tree of AMQP values.
- * Leaf nodes in this tree correspond to scalars in the AMQP type system such as
- * ints<INT> or strings<STRING>. Non-leaf nodes in this tree correspond to compound
- * values in the AMQP type system such as lists<LIST>, maps<MAP>, arrays<ARRAY>,
- * or described values<DESCRIBED>. The root node of the tree is the Data object
- * itself and can have an arbitrary number of children.
- * <p>
- * A Data object maintains the notion of the current sibling node and a current
- * parent node. Siblings are ordered within their parent. Values are accessed
- * and/or added by using the next, prev, enter, and exit methods to navigate to
- * the desired location in the tree and using the supplied variety of put* and
- * get* methods to access or add a value of the desired type.
- * <p>
- * The put* methods will always add a value after the current node in the tree.
- * If the current node has a next sibling the put* method will overwrite the value
- * on this node. If there is no current node or the current node has no next
- * sibling then one will be added. The put* methods always set the added/modified
- * node to the current node. The get* methods read the value of the current node
- * and do not change which node is current.
- * @constructor proton.Data
- * @param {number} data an optional pointer to a pn_data_t instance. If supplied
- *        the underlying data is "owned" by another object (for example a Message)
- *        and that object is assumed to be responsible for freeing the data if
- *        necessary. If no data is supplied then the Data is stand-alone and the
- *        client application is responsible for freeing the underlying data via
- *        a call to free().
- * @param {boolean} decodeBinaryAsString if set decode any AMQP Binary payload
- *        objects as strings. This can be useful as the data in Binary objects
- *        will be overwritten with subsequent calls to get, so they must be
- *        explicitly copied. Needless to say it is only safe to set this flag if
- *        you know that the data you are dealing with is actually a string, for
- *        example C/C++ applications often seem to encode strings as AMQP binary,
- *        a common cause of interoperability problems.
- */
-Module['Data'] = function(data, decodeBinaryAsString) { // Data Constructor.
-    if (!data) {
-        this._data = _pn_data(16); // Default capacity is 16
-        this['free'] = function() {
-            _pn_data_free(this._data);
-            // Set free to a null function to prevent possibility of a "double free".
-            this['free'] = function() {};
-        };
-    } else {
-        this._data = data;
-        this['free'] = function() {};
-    }
-    this._decodeBinaryAsString = decodeBinaryAsString;
-};
-
-// Expose constructor as package scope variable to make internal calls less verbose.
-var Data = Module['Data'];
-
-// Expose prototype as a variable to make method declarations less verbose.
-var _Data_ = Data.prototype;
-
-// ************************** Class properties ********************************
-
-Data['NULL']       = 1;
-Data['BOOL']       = 2;
-Data['UBYTE']      = 3;
-Data['BYTE']       = 4;
-Data['USHORT']     = 5;
-Data['SHORT']      = 6;
-Data['UINT']       = 7;
-Data['INT']        = 8;
-Data['CHAR']       = 9;
-Data['ULONG']      = 10;
-Data['LONG']       = 11;
-Data['TIMESTAMP']  = 12;
-Data['FLOAT']      = 13;
-Data['DOUBLE']     = 14;
-Data['DECIMAL32']  = 15;
-Data['DECIMAL64']  = 16;
-Data['DECIMAL128'] = 17;
-Data['UUID']       = 18;
-Data['BINARY']     = 19;
-Data['STRING']     = 20;
-Data['SYMBOL']     = 21;
-Data['DESCRIBED']  = 22;
-Data['ARRAY']      = 23;
-Data['LIST']       = 24;
-Data['MAP']        = 25;
-
-/**
- * Look-up table mapping proton-c types to the accessor method used to
- * deserialise the type. N.B. this is a simple Array and not a map because the
- * types that we get back from pn_data_type are integers from the pn_type_t enum.
- * @property {Array<String>} TypeNames ['NULL', 'NULL', 'BOOL', 'UBYTE', 'BYTE',
- * 'USHORT', 'SHORT', 'UINT', 'INT', 'CHAR', 'ULONG', 'LONG', 'TIMESTAMP',
- * 'FLOAT', 'DOUBLE', 'DECIMAL32', 'DECIMAL64', 'DECIMAL128', 'UUID',
- * 'BINARY', 'STRING', 'SYMBOL', 'DESCRIBED', 'ARRAY', 'LIST', 'MAP']
- * @memberof! proton.Data
- */
-Data['TypeNames'] = [
-    'NULL',       // 0
-    'NULL',       // PN_NULL       = 1
-    'BOOL',       // PN_BOOL       = 2
-    'UBYTE',      // PN_UBYTE      = 3
-    'BYTE',       // PN_BYTE       = 4
-    'USHORT',     // PN_USHORT     = 5
-    'SHORT',      // PN_SHORT      = 6
-    'UINT',       // PN_UINT       = 7
-    'INT',        // PN_INT        = 8
-    'CHAR',       // PN_CHAR       = 9
-    'ULONG',      // PN_ULONG      = 10
-    'LONG',       // PN_LONG       = 11
-    'TIMESTAMP',  // PN_TIMESTAMP  = 12
-    'FLOAT',      // PN_FLOAT      = 13
-    'DOUBLE',     // PN_DOUBLE     = 14
-    'DECIMAL32',  // PN_DECIMAL32  = 15
-    'DECIMAL64',  // PN_DECIMAL64  = 16
-    'DECIMAL128', // PN_DECIMAL128 = 17
-    'UUID',       // PN_UUID       = 18
-    'BINARY',     // PN_BINARY     = 19
-    'STRING',     // PN_STRING     = 20
-    'SYMBOL',     // PN_SYMBOL     = 21
-    'DESCRIBED',  // PN_DESCRIBED  = 22
-    'ARRAY',      // PN_ARRAY      = 23
-    'LIST',       // PN_LIST       = 24
-    'MAP'         // PN_MAP        = 25
-];
-
-// *************************** Class methods **********************************
-
-/**
- * Test if a given Object is a JavaScript Array.
- * @method isArray
- * @memberof! proton.Data
- * @param {object} o the Object that we wish to test.
- * @returns {boolean} true iff the Object is a JavaScript Array.
- */
-Data.isArray = Array.isArray || function(o) {
-    return Object.prototype.toString.call(o) === '[object Array]';
-};
-
-/**
- * Test if a given Object is a JavaScript Number.
- * @method isNumber
- * @memberof! proton.Data
- * @param {object} o the Object that we wish to test.
- * @returns {boolean} true iff the Object is a JavaScript Number.
- */
-Data.isNumber = function(o) {
-    return typeof o === 'number' || 
-          (typeof o === 'object' && Object.prototype.toString.call(o) === '[object Number]');
-};
-
-/**
- * Test if a given Object is a JavaScript String.
- * @method isString
- * @memberof! proton.Data
- * @param {object} o the Object that we wish to test.
- * @returns {boolean} true iff the Object is a JavaScript String.
- */
-Data.isString = function(o) {
-    return typeof o === 'string' ||
-          (typeof o === 'object' && Object.prototype.toString.call(o) === '[object String]');
-};
-
-/**
- * Test if a given Object is a JavaScript Boolean.
- * @method isBoolean
- * @memberof! proton.Data
- * @param {object} o the Object that we wish to test.
- * @returns {boolean} true iff the Object is a JavaScript Boolean.
- */
-Data.isBoolean = function(o) {
-    return typeof o === 'boolean' ||
-          (typeof o === 'object' && Object.prototype.toString.call(o) === '[object Boolean]');
-};
-
-
-// ************************* Protected methods ********************************
-
-// We use the dot notation rather than associative array form for protected
-// methods so they are visible to this "package", but the Closure compiler will
-// minify and obfuscate names, effectively making a de facto "protected" method.
-
-/**
- * This helper method checks the supplied error code, converts it into an
- * exception and throws the exception. This method will try to use the message
- * populated in pn_data_error(), if present, but if not it will fall
- * back to using the basic error code rendering from pn_code().
- * @param code the error code to check.
- */
-_Data_._check = function(code) {
-    if (code < 0) {
-        var errno = this['getErrno']();
-        var message = errno ? this['getError']() : Pointer_stringify(_pn_code(code));
-
-        throw new Module['DataError'](message);
-    } else {
-        return code;
-    }
-};
-
-
-// *************************** Public methods *********************************
-
-/**
- * @method getErrno
- * @memberof! proton.Data#
- * @returns {number} the most recent error message code.
- */
-_Data_['getErrno'] = function() {
-    return _pn_data_errno(this._data);
-};
-
-/**
- * @method getError
- * @memberof! proton.Data#
- * @returns {string} the most recent error message as a String.
- */
-_Data_['getError'] = function() {
-    return Pointer_stringify(_pn_error_text(_pn_data_error(this._data)));
-};
-
-/**
- * Clears the data object.
- * @method clear
- * @memberof! proton.Data#
- */
-_Data_['clear'] = function() {
-    _pn_data_clear(this._data);
-};
-
-/**
- * Clears current node and sets the parent to the root node.  Clearing the current
- * node sets it _before_ the first node, calling next() will advance to the first node.
- * @method rewind
- * @memberof! proton.Data#
- */
-_Data_['rewind'] = function() {
-    _pn_data_rewind(this._data);
-};
-
-/**
- * Advances the current node to its next sibling and returns its type. If there
- * is no next sibling the current node remains unchanged and null is returned.
- * @method next
- * @memberof! proton.Data#
- * @returns {number} the type of the next sibling or null.
- */
-_Data_['next'] = function() {
-    var found = _pn_data_next(this._data);
-    if (found) {
-        return this.type();
-    } else {
-        return null;
-    }
-};
-
-/**
- * Advances the current node to its previous sibling and returns its type. If there
- * is no previous sibling the current node remains unchanged and null is returned.
- * @method prev
- * @memberof! proton.Data#
- * @returns {number} the type of the previous sibling or null.
- */
-_Data_['prev'] = function() {
-    var found = _pn_data_prev(this._data);
-    if (found) {
-        return this.type();
-    } else {
-        return null;  
-    }
-};
-
-/**
- * Sets the parent node to the current node and clears the current node. Clearing
- * the current node sets it _before_ the first child, next() advances to the first child.
- * @method enter
- * @memberof! proton.Data#
- */
-_Data_['enter'] = function() {
-    return (_pn_data_enter(this._data) > 0);
-};
-
-/**
- * Sets the current node to the parent node and the parent node to its own parent.
- * @method exit
- * @memberof! proton.Data#
- */
-_Data_['exit'] = function() {
-    return (_pn_data_exit(this._data) > 0);
-};
-
-/**
- * Look up a value by name. N.B. Need to use getObject() to retrieve the actual
- * value after lookup succeeds.
- * @method lookup
- * @memberof! proton.Data#
- * @param {string} name the name of the property to look up.
- * @returns {boolean} true iff the lookup succeeded.
- */
-_Data_['lookup'] = function(name) {
-    var sp = Runtime.stackSave();
-    var lookup = _pn_data_lookup(this._data, allocate(intArrayFromString(name), 'i8', ALLOC_STACK));
-    Runtime.stackRestore(sp);
-    return (lookup > 0);
-};
-
-// TODO document - not quite sure what these are for?
-_Data_['narrow'] = function() {
-    _pn_data_narrow(this._data);
-};
-
-_Data_['widen'] = function() {
-    _pn_data_widen(this._data);
-};
-
-/**
- * @method type
- * @memberof! proton.Data#
- * @returns {number} the type of the current node or null if the type is unknown.
- */
-_Data_['type'] = function() {
-    var dtype = _pn_data_type(this._data);
-    if (dtype === -1) {
-        return null;
-    } else {
-        return dtype;
-    }
-};
-
-/**
- * Return a Binary representation of the data encoded in AMQP format. N.B. the
- * returned {@link proton.Data.Binary} "owns" the underlying raw data and is thus
- * responsible for freeing it or passing it to a method that consumes a Binary
- * such as {@link proton.Data.decode} or {@link proton.Data.putBINARY}.
- * @method encode
- * @memberof! proton.Data#
- * @returns {proton.Data.Binary} a representation of the data encoded in AMQP format.
- */
-_Data_['encode'] = function() {
-    var size = 1024;
-    while (true) {
-        var bytes = _malloc(size); // Allocate storage from emscripten heap.
-        var cd = _pn_data_encode(this._data, bytes, size);
-
-        if (cd === Module['Error']['OVERFLOW']) {
-            _free(bytes);
-            size *= 2;
-        } else if (cd >= 0) {
-            return new Data['Binary'](cd, bytes);
-        } else {
-            _free(bytes);
-            this._check(cd);
-            return;
-        }
-    }
-};
-
-/**
- * Decodes the first value from supplied Binary AMQP data and returns a new
- * {@link proton.Data.Binary} containing the remainder of the data or null if
- * all the supplied data has been consumed. N.B. this method "consumes" data
- * from a {@link proton.Data.Binary} in other words it takes responsibility for
- * the underlying data and frees the raw data from the Binary.
- * @method decode
- * @memberof! proton.Data#
- * @param {proton.Data.Binary} encoded the AMQP encoded binary data.
- * @returns {proton.Data.Binary} a Binary containing the remaining bytes or null
- *          if all the data has been consumed.
- */
-_Data_['decode'] = function(encoded) {
-    var start = encoded.start;
-    var size = encoded.size;
-    var consumed = this._check(_pn_data_decode(this._data, start, size));
-
-    size = size - consumed;
-    start = _malloc(size); // Allocate storage from emscripten heap.
-    _memcpy(start, encoded.start + consumed, size);
-
-    encoded['free'](); // Free the original Binary.
-    return size > 0 ? new Data['Binary'](size, start) : null;
-};
-
-/**
- * Puts a list node. Elements may be filled by entering the list
- * node and putting element values.
- * <pre>
- *  var data = new proton.Data();
- *  data.putLISTNODE();
- *  data.enter();
- *  data.putINT(1);
- *  data.putINT(2);
- *  data.putINT(3);
- *  data.exit();
- * </pre>
- * @method putLISTNODE
- * @memberof! proton.Data#
- */
-_Data_['putLISTNODE'] = function() {
-    this._check(_pn_data_put_list(this._data));
-};
-
-/**
- * Puts a map node. Elements may be filled by entering the map node
- * and putting alternating key value pairs.
- * <pre>
- *  var data = new proton.Data();
- *  data.putMAPNODE();
- *  data.enter();
- *  data.putSTRING('key');
- *  data.putSTRING('value');
- *  data.exit();
- * </pre>
- * @method putMAPNODE
- * @memberof! proton.Data#
- */
-_Data_['putMAPNODE'] = function() {
-    this._check(_pn_data_put_map(this._data));
-};
-
-/**
- * Puts an array node. Elements may be filled by entering the array node and
- * putting the element values. The values must all be of the specified array
- * element type. If an array is described then the first child value of the array
- * is the descriptor and may be of any type.
- * <pre>
- *  var data = new proton.Data();
- *  data.putARRAYNODE(false, proton.Data.INT);
- *  data.enter();
- *  data.putINT(1);
- *  data.putINT(2);
- *  data.putINT(3);
- *  data.exit();
- *
- *  data.putARRAYNODE(true, proton.Data.DOUBLE);
- *  data.enter();
- *  data.putSYMBOL('array-descriptor');
- *  data.putDOUBLE(1.1);
- *  data.putDOUBLE(1.2);
- *  data.putDOUBLE(1.3);
- *  data.exit();
- * </pre>
- * @method putARRAYNODE
- * @param {boolean} described specifies whether the array is described.
- * @param {number} type the type of the array elements.
- * @memberof! proton.Data#
- */
-_Data_['putARRAYNODE'] = function(described, type) {
-    this._check(_pn_data_put_array(this._data, described, type));
-};
-
-/**
- * Puts a described node. A described node has two children, the descriptor and
- * value. These are specified by entering the node and putting the desired values.
- * <pre>
- *  var data = new proton.Data();
- *  data.putDESCRIBEDNODE();
- *  data.enter();
- *  data.putSYMBOL('value-descriptor');
- *  data.putSTRING('the value');
- *  data.exit();
- * </pre>
- * @method putDESCRIBEDNODE
- * @memberof! proton.Data#
- */
-_Data_['putDESCRIBEDNODE'] = function() {
-    this._check(_pn_data_put_described(this._data));
-};
-
-/**
- * Puts a null value.
- * @method putNULL
- * @memberof! proton.Data#
- */
-_Data_['putNULL'] = function() {
-    this._check(_pn_data_put_null(this._data));
-};
-
-/**
- * Puts a boolean value.
- * @method putBOOL
- * @memberof! proton.Data#
- * @param {boolean} b a boolean value.
- */
-_Data_['putBOOL'] = function(b) {
-    this._check(_pn_data_put_bool(this._data, b));
-};
-
-/**
- * Puts a unsigned byte value.
- * @method putUBYTE
- * @memberof! proton.Data#
- * @param {number} ub an integral value.
- */
-_Data_['putUBYTE'] = function(ub) {
-    this._check(_pn_data_put_ubyte(this._data, ub));
-};
-
-/**
- * Puts a signed byte value.
- * @method putBYTE
- * @memberof! proton.Data#
- * @param {number} b an integral value.
- */
-_Data_['putBYTE'] = function(b) {
-    this._check(_pn_data_put_byte(this._data, b));
-};
-
-/**
- * Puts a unsigned short value.
- * @method putUSHORT
- * @memberof! proton.Data#
- * @param {number} us an integral value.
- */
-_Data_['putUSHORT'] = function(us) {
-    this._check(_pn_data_put_ushort(this._data, us));
-};
-
-/**
- * Puts a signed short value.
- * @method putSHORT
- * @memberof! proton.Data#
- * @param {number} s an integral value.
- */
-_Data_['putSHORT'] = function(s) {
-    this._check(_pn_data_put_short(this._data, s));
-};
-
-/**
- * Puts a unsigned integer value.
- * @method putUINT
- * @memberof! proton.Data#
- * @param {number} ui an integral value.
- */
-_Data_['putUINT'] = function(ui) {
-    this._check(_pn_data_put_uint(this._data, ui));
-};
-
-/**
- * Puts a signed integer value.
- * @method putINT
- * @memberof! proton.Data#
- * @param {number} i an integral value.
- */
-_Data_['putINT'] = function(i) {
-    this._check(_pn_data_put_int(this._data, i));
-};
-
-/**
- * Puts a signed char value.
- * @method putCHAR
- * @memberof! proton.Data#
- * @param {(string|number)} c a single character expressed either as a string or a number.
- */
-_Data_['putCHAR'] = function(c) {
-    c = Data.isString(c) ? c.charCodeAt(0) : c;
-    this._check(_pn_data_put_char(this._data, c));
-};
-
-/**
- * Puts a unsigned long value. N.B. large values can suffer from a loss of
- * precision as JavaScript numbers are restricted to 64 bit double values.
- * @method putULONG
- * @memberof! proton.Data#
- * @param {number} ul an integral value.
- */
-_Data_['putULONG'] = function(ul) {
-    // If the supplied number exceeds the range of Data.Long invert it before
-    // constructing the Data.Long.
-    ul = (ul >= Data.Long.TWO_PWR_63_DBL_) ? (ul = -(Data.Long.TWO_PWR_64_DBL_ - ul)) : ul;
-    var long = Data.Long.fromNumber(ul);
-    this._check(_pn_data_put_ulong(this._data, long.getLowBitsUnsigned(), long.getHighBits()));
-};
-
-/**
- * Puts a signed long value. N.B. large values can suffer from a loss of
- * precision as JavaScript numbers are restricted to 64 bit double values.
- * @method putLONG
- * @memberof! proton.Data#
- * @param {number} i an integral value.
- */
-_Data_['putLONG'] = function(l) {
-    var long = Data.Long.fromNumber(l);
-    this._check(_pn_data_put_long(this._data, long.getLowBitsUnsigned(), long.getHighBits()));
-};
-
-/**
- * Puts a timestamp.
- * @method putTIMESTAMP
- * @memberof! proton.Data#
- * @param {(number|Date)} d a Date value.
- */
-_Data_['putTIMESTAMP'] = function(d) {
-    // Note that a timestamp is a 64 bit number so we have to use a proton.Data.Long.
-    var timestamp = Data.Long.fromNumber(d.valueOf());
-    this._check(_pn_data_put_timestamp(this._data, timestamp.getLowBitsUnsigned(), timestamp.getHighBits()));
-};
-
-/**
- * Puts a float value. N.B. converting between floats and doubles is imprecise
- * so the resulting value might not quite be what you expect.
- * @method putFLOAT
- * @memberof! proton.Data#
- * @param {number} f a floating point value.
- */
-_Data_['putFLOAT'] = function(f) {
-    this._check(_pn_data_put_float(this._data, f));
-};
-
-/**
- * Puts a double value.
- * @method putDOUBLE
- * @memberof! proton.Data#
- * @param {number} d a floating point value.
- */
-_Data_['putDOUBLE'] = function(d) {
-    this._check(_pn_data_put_double(this._data, d));
-};
-
-/**
- * Puts a decimal32 value.
- * @method putDECIMAL32
- * @memberof! proton.Data#
- * @param {number} d a decimal32 value.
- */
-_Data_['putDECIMAL32'] = function(d) {
-    this._check(_pn_data_put_decimal32(this._data, d));
-};
-
-/**
- * Puts a decimal64 value.
- * @method putDECIMAL64
- * @memberof! proton.Data#
- * @param {number} d a decimal64 value.
- */
-_Data_['putDECIMAL64'] = function(d) {
-    this._check(_pn_data_put_decimal64(this._data, d));
-};
-
-/**
- * Puts a decimal128 value.
- * @method putDECIMAL128
- * @memberof! proton.Data#
- * @param {number} d a decimal128 value.
- */
-_Data_['putDECIMAL128'] = function(d) {
-    this._check(_pn_data_put_decimal128(this._data, d));
-};
-
-/**
- * Puts a UUID value.
- * @method putUUID
- * @memberof! proton.Data#
- * @param {proton.Data.Uuid} u a uuid value
- */
-_Data_['putUUID'] = function(u) {
-    var sp = Runtime.stackSave();
-    this._check(_pn_data_put_uuid(this._data, allocate(u['uuid'], 'i8', ALLOC_STACK)));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Puts a binary value consuming the underlying raw data in the process.
- * @method putBINARY
- * @memberof! proton.Data#
- * @param {proton.Data.Binary} b a binary value.
- */
-_Data_['putBINARY'] = function(b) {
-    var sp = Runtime.stackSave();
-    // The implementation here is a bit "quirky" due to some low-level details
-    // of the interaction between emscripten and LLVM and the use of pn_bytes.
-    // The JavaScript code below is basically a binding to:
-    //
-    // pn_data_put_binary(data, pn_bytes(b.size, b.start));
-
-    // Here's the quirky bit, pn_bytes actually returns pn_bytes_t *by value* but
-    // the low-level code handles this *by pointer* so we first need to allocate
-    // 8 bytes storage for {size, start} on the emscripten stack and then we
-    // pass the pointer to that storage as the first parameter to the pn_bytes.
-    var bytes = allocate(8, 'i8', ALLOC_STACK);
-    _pn_bytes(bytes, b.size, b.start);
-
-    // The compiled pn_data_put_binary takes the pn_bytes_t by reference not value.
-    this._check(_pn_data_put_binary(this._data, bytes));
-
-    // After calling _pn_data_put_binary the underlying Data object "owns" the
-    // binary data, so we can call free on the proton.Data.Binary instance to
-    // release any storage it has acquired back to the emscripten heap.
-    b['free']();
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Puts a unicode string value.
- * @method putSTRING
- * @memberof! proton.Data#
- * @param {string} s a unicode string value.
- */
-_Data_['putSTRING'] = function(s) {
-    var sp = Runtime.stackSave();
-    // The implementation here is a bit "quirky" due to some low-level details
-    // of the interaction between emscripten and LLVM and the use of pn_bytes.
-    // The JavaScript code below is basically a binding to:
-    //
-    // pn_data_put_string(data, pn_bytes(strlen(text), text));
-
-    // First create an array from the JavaScript String using the intArrayFromString
-    // helper function (from emscripten/src/preamble.js). We use this idiom in a
-    // few places but here we create array as a separate var as we need its length.
-    var array = intArrayFromString(s, true); // The true means don't add NULL.
-    // Allocate temporary storage for the array on the emscripten stack.
-    var str = allocate(array, 'i8', ALLOC_STACK);
-
-    // Here's the quirky bit, pn_bytes actually returns pn_bytes_t *by value* but
-    // the low-level code handles this *by pointer* so we first need to allocate
-    // 8 bytes storage for {size, start} on the emscripten stack and then we
-    // pass the pointer to that storage as the first parameter to the pn_bytes.
-    var bytes = allocate(8, 'i8', ALLOC_STACK);
-    _pn_bytes(bytes, array.length, str);
-
-    // The compiled pn_data_put_string takes the pn_bytes_t by reference not value.
-    this._check(_pn_data_put_string(this._data, bytes));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Puts a symbolic value. According to the AMQP 1.0 Specification Symbols are
- * values from a constrained domain. Although the set of possible domains is
- * open-ended, typically the both number and size of symbols in use for any
- * given application will be small, e.g. small enough that it is reasonable to
- * cache all the distinct values. Symbols are encoded as ASCII characters.
- * @method putSYMBOL
- * @memberof! proton.Data#
- * @param {proton.Data.Symbol|string} s the symbol name.
- */
-_Data_['putSYMBOL'] = function(s) {
-    var sp = Runtime.stackSave();
-    // The implementation here is a bit "quirky" due to some low-level details
-    // of the interaction between emscripten and LLVM and the use of pn_bytes.
-    // The JavaScript code below is basically a binding to:
-    //
-    // pn_data_put_symbol(data, pn_bytes(strlen(text), text));
-
-    // First create an array from the JavaScript String using the intArrayFromString
-    // helper function (from emscripten/src/preamble.js). We use this idiom in a
-    // few places but here we create array as a separate var as we need its length.
-    var array = intArrayFromString(s, true); // The true means don't add NULL.
-    // Allocate temporary storage for the array on the emscripten stack.
-    var str = allocate(array, 'i8', ALLOC_STACK);
-
-    // Here's the quirky bit, pn_bytes actually returns pn_bytes_t *by value* but
-    // the low-level code handles this *by pointer* so we first need to allocate
-    // 8 bytes storage for {size, start} on the emscripten stack and then we
-    // pass the pointer to that storage as the first parameter to the pn_bytes.
-    var bytes = allocate(8, 'i8', ALLOC_STACK);
-    _pn_bytes(bytes, array.length, str);
-
-    // The compiled pn_data_put_symbol takes the pn_bytes_t by reference not value.
-    this._check(_pn_data_put_symbol(this._data, bytes));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * If the current node is a list node, return the number of elements,
- * otherwise return zero. List elements can be accessed by entering
- * the list.
- * <pre>
- *  var count = data.getLISTNODE();
- *  data.enter();
- *  for (var i = 0; i < count; i++) {
- *      var type = data.next();
- *      if (type === proton.Data.STRING) {
- *          console.log(data.getSTRING());
- *      }
- *  }
- *  data.exit();
- * </pre>
- * @method getLISTNODE
- * @memberof! proton.Data#
- * @returns {number} the number of elements if the current node is a list,
- *          zero otherwise.
- */
-_Data_['getLISTNODE'] = function() {
-    return _pn_data_get_list(this._data);
-};
-
-/**
- * If the current node is a map, return the number of child elements,
- * otherwise return zero. Key value pairs can be accessed by entering
- * the map.
- * <pre>
- *  var count = data.getMAPNODE();
- *  data.enter();
- *  for (var i = 0; i < count/2; i++) {
- *      var type = data.next();
- *      if (type === proton.Data.STRING) {
- *          console.log(data.getSTRING());
- *      }
- *  }
- *  data.exit();
- * </pre>
- * @method getMAPNODE
- * @memberof! proton.Data#
- * @returns {number} the number of elements if the current node is a list,
- *          zero otherwise.
- */
-_Data_['getMAPNODE'] = function() {
-    return _pn_data_get_map(this._data);
-};
-
-/**
- * If the current node is an array, return an object containing the tuple of the
- * element count, a boolean indicating whether the array is described, and the
- * type of each element, otherwise return {count: 0, described: false, type: null).
- * Array data can be accessed by entering the array.
- * <pre>
- *  // Read an array of strings with a symbolic descriptor
- *  var metadata = data.getARRAYNODE();
- *  var count = metadata.count;
- *  data.enter();
- *  data.next();
- *  console.log("Descriptor:" + data.getSYMBOL());
- *  for (var i = 0; i < count; i++) {
- *      var type = data.next();
- *      console.log("Element:" + data.getSTRING());
- *  }
- *  data.exit();
- * </pre>
- * @method getARRAYNODE
- * @memberof! proton.Data#
- * @returns {object} the tuple of the element count, a boolean indicating whether
- *          the array is described, and the type of each element.
- */
-_Data_['getARRAYNODE'] = function() {
-    var count = _pn_data_get_array(this._data);
-    var described = (_pn_data_is_array_described(this._data) > 0);
-    var type = _pn_data_get_array_type(this._data);
-    type = (type == -1) ? null : type;
-    return {'count': count, 'described': described, 'type': type};
-};
-
-/**
- * Checks if the current node is a described node. The descriptor and value may
- * be accessed by entering the described node.
- * <pre>
- *  // read a symbolically described string
- *  assert(data.isDESCRIBEDNODE()); // will error if the current node is not described
- *  data.enter();
- *  console.log(data.getSYMBOL());
- *  console.log(data.getSTRING());
- *  data.exit();
- * </pre>
- * @method isDESCRIBEDNODE
- * @memberof! proton.Data#
- * @returns {boolean} true iff the current node is a described, false otherwise.
- */
-_Data_['isDESCRIBEDNODE'] = function() {
-    return _pn_data_is_described(this._data);
-};
-
-/**
- * @method getNULL
- * @memberof! proton.Data#
- * @returns a null value.
- */
-_Data_['getNULL'] = function() {
-    return null;
-};
-
-/**
- * Checks if the current node is a null.
- * @method isNULL
- * @memberof! proton.Data#
- * @returns {boolean} true iff the current node is null.
- */
-_Data_['isNULL'] = function() {
-    return (_pn_data_is_null(this._data) > 0);
-};
-
-/**
- * @method getBOOL
- * @memberof! proton.Data#
- * @returns {boolean} a boolean value if the current node is a boolean, returns
- *          false otherwise.
- */
-_Data_['getBOOL'] = function() {
-    return (_pn_data_get_bool(this._data) > 0);
-};
-
-/**
- * @method getUBYTE
- * @memberof! proton.Data#
- * @returns {number} value if the current node is an unsigned byte, returns 0 otherwise.
- */
-_Data_['getUBYTE'] = function() {
-    return _pn_data_get_ubyte(this._data) & 0xFF; // & 0xFF converts to unsigned;
-};
-
-/**
- * @method getBYTE
- * @memberof! proton.Data#
- * @returns {number} value if the current node is a signed byte, returns 0 otherwise.
- */
-_Data_['getBYTE'] = function() {
-    return _pn_data_get_byte(this._data);
-};
-
-/**
- * @method getUSHORT
- * @memberof! proton.Data#
- * @returns {number} value if the current node is an unsigned short, returns 0 otherwise.
- */
-_Data_['getUSHORT'] = function() {
-    return _pn_data_get_ushort(this._data) & 0xFFFF; // & 0xFFFF converts to unsigned;
-};
-
-/**
- * @method getSHORT
- * @memberof! proton.Data#
- * @returns {number} value if the current node is a signed short, returns 0 otherwise.
- */
-_Data_['getSHORT'] = function() {
-    return _pn_data_get_short(this._data);
-};
-
-/**
- * @method getUINT
- * @memberof! proton.Data#
- * @returns {number} value if the current node is an unsigned int, returns 0 otherwise.
- */
-_Data_['getUINT'] = function() {
-    var value = _pn_data_get_uint(this._data);
-    return (value > 0) ? value : 4294967296 + value; // 4294967296 == 2^32
-};
-
-/**
- * @method getINT
- * @memberof! proton.Data#
- * @returns {number} value if the current node is a signed int, returns 0 otherwise.
- */
-_Data_['getINT'] = function() {
-    return _pn_data_get_int(this._data);
-};
-
-/**
- * @method getCHAR
- * @memberof! proton.Data#
- * @returns {string} the character represented by the unicode value of the current node.
- */
-_Data_['getCHAR'] = function() {
-    return String.fromCharCode(_pn_data_get_char(this._data));
-};
-
-/**
- * Retrieve an unsigned long value. N.B. large values can suffer from a loss of
- * precision as JavaScript numbers are restricted to 64 bit double values.
- * @method getULONG
- * @memberof! proton.Data#
- * @returns {proton.Data.Long} value if the current node is an unsigned long, returns 0 otherwise.
- */
-_Data_['getULONG'] = function() {
-    var low = _pn_data_get_ulong(this._data);
-    var high = Runtime.getTempRet0();
-    var long = new Data.Long(low, high);
-    long = long.toNumber();
-    return (long >= 0) ? long : Data.Long.TWO_PWR_64_DBL_ + long;
-};
-
-/**
- * Retrieve a signed long value. N.B. large values can suffer from a loss of
- * precision as JavaScript numbers are restricted to 64 bit double values.
- * @method getLONG
- * @memberof! proton.Data#
- * @returns {proton.Data.Long} value if the current node is a signed long, returns 0 otherwise.
- */
-_Data_['getLONG'] = function() {
-    // Getting the long is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to hold
-    // the 64 bit number and Data.Long.toNumber() to convert it back into a
-    // JavaScript number.
-    var low = _pn_data_get_long(this._data);
-    var high = Runtime.getTempRet0();
-    var long = new Data.Long(low, high);
-    long = long.toNumber();
-    return long;
-};
-
-/**
- * @method getTIMESTAMP
- * @memberof! proton.Data#
- * @returns {Date} a native JavaScript Date instance representing the timestamp.
- */
-_Data_['getTIMESTAMP'] = function() {
-    // Getting the timestamp is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to hold
-    // the 64 bit number and Data.Long.toNumber() to convert it back into a
-    // JavaScript number.
-    var low =  _pn_data_get_timestamp(this._data);
-    var high = Runtime.getTempRet0();
-    var long = new Data.Long(low, high);
-    long = long.toNumber();
-    return new Date(long);
-};
-
-/**
- * Retrieves a  float value. N.B. converting between floats and doubles is imprecise
- * so the resulting value might not quite be what you expect.
- * @method getFLOAT
- * @memberof! proton.Data#
- * @returns {number} value if the current node is a float, returns 0 otherwise.
- */
-_Data_['getFLOAT'] = function() {
-    return _pn_data_get_float(this._data);
-};
-
-/**
- * @method getDOUBLE
- * @memberof! proton.Data#
- * @returns {number} value if the current node is a double, returns 0 otherwise.
- */
-_Data_['getDOUBLE'] = function() {
-    return _pn_data_get_double(this._data);
-};
-
-/**
- * @method getDECIMAL32
- * @memberof! proton.Data#
- * @returns {number} value if the current node is a decimal32, returns 0 otherwise.
- */
-_Data_['getDECIMAL32'] = function() {
-console.log("getDECIMAL32 not properly implemented yet");
-    return _pn_data_get_decimal32(this._data);
-};
-
-/**
- * @method getDECIMAL64
- * @memberof! proton.Data#
- * @returns {number} value if the current node is a decimal64, returns 0 otherwise.
- */
-_Data_['getDECIMAL64'] = function() {
-console.log("getDECIMAL64 not properly implemented yet");
-    return _pn_data_get_decimal64(this._data);
-};
-
-/**
- * @method getDECIMAL128
- * @memberof! proton.Data#
- * @returns {number} value if the current node is a decimal128, returns 0 otherwise.
- */
-_Data_['getDECIMAL128'] = function() {
-console.log("getDECIMAL128 not properly implemented yet");
-    return _pn_data_get_decimal128(this._data);
-};
-
-/**
- * @method getUUID
- * @memberof! proton.Data#
- * @returns {proton.Data.Uuid} value if the current node is a UUID, returns null otherwise.
- */
-_Data_['getUUID'] = function() {
-    var sp = Runtime.stackSave();
-
-    // Here's the quirky bit, pn_data_get_uuid actually returns pn_uuid_t
-    // *by value* but the low-level code handles this *by pointer* so we first
-    // need to allocate 16 bytes storage for pn_uuid_t on the emscripten stack
-    // and then we pass the pointer to that storage as the first parameter to the
-    // compiled pn_data_get_uuid.
-    var bytes = allocate(16, 'i8', ALLOC_STACK); // pn_uuid_t is 16 bytes.
-    _pn_data_get_uuid(bytes, this._data);
-
-    // Create a new UUID from the bytes
-    var uuid = new Data['Uuid'](bytes);
-
-    // Tidy up the memory that we allocated on emscripten's stack.
-    Runtime.stackRestore(sp);
-
-    return uuid;
-};
-
-/**
- * @method getBINARY
- * @memberof! proton.Data#
- * @returns {proton.Data.Binary} value if the current node is a Binary, returns null otherwise.
- */
-_Data_['getBINARY'] = function() {
-    var sp = Runtime.stackSave();
-    // The implementation here is a bit "quirky" due to some low-level details
-    // of the interaction between emscripten and LLVM and the use of pn_bytes.
-    // The JavaScript code below is basically a binding to:
-    //
-    // pn_bytes bytes = pn_data_get_binary(data);
-
-    // Here's the quirky bit, pn_data_get_binary actually returns pn_bytes_t 
-    // *by value* but the low-level code handles this *by pointer* so we first
-    // need to allocate 8 bytes storage for {size, start} on the emscripten stack
-    // and then we pass the pointer to that storage as the first parameter to the
-    // compiled pn_data_get_binary.
-    var bytes = allocate(8, 'i8', ALLOC_STACK);
-    _pn_data_get_binary(bytes, this._data);
-
-    // The bytes variable is really of type pn_bytes_t* so we use emscripten's
-    // getValue() call to retrieve the size and then the start pointer.
-    var size  = getValue(bytes, 'i32');
-    var start = getValue(bytes + 4, '*');
-
-    // Create a proton.Data.Binary from the pn_bytes_t information.
-    var binary = new Data['Binary'](size, start);
-
-    // Tidy up the memory that we allocated on emscripten's stack.
-    Runtime.stackRestore(sp);
-
-    // If _decodeBinaryAsString is set return the stringified form of the Binary.
-    if (this._decodeBinaryAsString) {
-        return binary.toString();
-    } else {
-        return binary;
-    }
-};
-
-/**
- * Gets a unicode String value from the current node.
- * @method getSTRING
- * @memberof! proton.Data#
- * @returns {string} value if the current node is a String, returns "" otherwise.
- */
-_Data_['getSTRING'] = function() {
-    var sp = Runtime.stackSave();
-    // The implementation here is a bit "quirky" due to some low-level details
-    // of the interaction between emscripten and LLVM and the use of pn_bytes.
-    // The JavaScript code below is basically a binding to:
-    //
-    // pn_bytes bytes = pn_data_get_string(data);
-
-    // Here's the quirky bit, pn_data_get_string actually returns pn_bytes_t 
-    // *by value* but the low-level code handles this *by pointer* so we first
-    // need to allocate 8 bytes storage for {size, start} on the emscripten stack
-    // and then we pass the pointer to that storage as the first parameter to the
-    // compiled pn_data_get_string.
-    var bytes = allocate(8, 'i8', ALLOC_STACK);
-    _pn_data_get_string(bytes, this._data);
-
-    // The bytes variable is really of type pn_bytes_t* so we use emscripten's
-    // getValue() call to retrieve the size and then the start pointer.
-    var size  = getValue(bytes, 'i32');
-    var start = getValue(bytes + 4, '*');
-
-    // Create a native JavaScript String from the pn_bytes_t information.
-    var string = Pointer_stringify(start, size);
-
-    // Tidy up the memory that we allocated on emscripten's stack.
-    Runtime.stackRestore(sp);
-
-    return string;
-};
-
-/**
- * Gets a symbolic value. According to the AMQP 1.0 Specification Symbols are
- * values from a constrained domain. Although the set of possible domains is
- * open-ended, typically the both number and size of symbols in use for any
- * given application will be small, e.g. small enough that it is reasonable to
- * cache all the distinct values. Symbols are encoded as ASCII characters.
- * @method getSYMBOL
- * @memberof! proton.Data#
- * @returns {proton.Data.Symbol} value if the current node is a Symbol, returns "" otherwise.
- */
-_Data_['getSYMBOL'] = function() {
-    var sp = Runtime.stackSave();
-    // The implementation here is a bit "quirky" due to some low-level details
-    // of the interaction between emscripten and LLVM and the use of pn_bytes.
-    // The JavaScript code below is basically a binding to:
-    //
-    // pn_bytes bytes = pn_data_get_symbol(data);
-
-    // Here's the quirky bit, pn_data_get_symbol actually returns pn_bytes_t 
-    // *by value* but the low-level code handles this *by pointer* so we first
-    // need to allocate 8 bytes storage for {size, start} on the emscripten stack
-    // and then we pass the pointer to that storage as the first parameter to the
-    // compiled pn_data_get_symbol.
-    var bytes = allocate(8, 'i8', ALLOC_STACK);
-    _pn_data_get_symbol(bytes, this._data);
-
-    // The bytes variable is really of type pn_bytes_t* so we use emscripten's
-    // getValue() call to retrieve the size and then the start pointer.
-    var size  = getValue(bytes, 'i32');
-    var start = getValue(bytes + 4, '*');
-
-    // Create a native JavaScript String from the pn_bytes_t information.
-    var string = Pointer_stringify(start, size);
-
-    // Tidy up the memory that we allocated on emscripten's stack.
-    Runtime.stackRestore(sp);
-
-    return new Data['Symbol'](string);
-};
-
-/**
- * Performs a deep copy of the current {@link proton.Data} instance and returns it
- * @method copy
- * @memberof! proton.Data#
- * @returns {proton.Data} a copy of the current {@link proton.Data} instance.
- */
-_Data_['copy'] = function() {
-    var copy = new Data();
-    this._check(_pn_data_copy(copy._data, this._data));
-    return copy;
-};
-
-/**
- * Format the encoded AMQP Data into a string representation and return it.
- * @method format
- * @memberof! proton.Data#
- * @returns {string} a formatted string representation of the encoded Data.
- */
-_Data_['format'] = function() {
-    var sp = Runtime.stackSave();
-    var sizeptr = allocate(4, 'i32', ALLOC_STACK);
-
-    var size = 1024; // Pass by reference variable - need to use setValue to initialise it.
-    while (true) {
-        setValue(sizeptr, size, 'i32'); // Set pass by reference variable.
-        var bytes = _malloc(size);   // Allocate storage from emscripten heap.
-        var err = _pn_data_format(this._data, bytes, sizeptr);
-        var size = getValue(sizeptr, 'i32'); // Dereference the real size value;
-
-        if (err === Module['Error']['OVERFLOW']) {
-            _free(bytes);
-            size *= 2;
-        } else {
-            var string = Pointer_stringify(bytes, size);
-            _free(bytes);
-            // Tidy up the memory that we allocated on emscripten's stack.
-            Runtime.stackRestore(sp);
-            this._check(err)
-            return string;
-        }
-    }
-};
-
-/**
- * Print the internal state of the {@link proton.Data} in human readable form.
- * TODO. This seems to "crash" if compound nodes such as DESCRIBED, MAP or LIST
- * are present in the tree, this is most likely a problem with the underlying C
- * implementation as all the other navigation and format methods work - need to
- * check by testing with some native C code.
- * @method dump
- * @memberof! proton.Data#
- */
-_Data_['dump'] = function() {
-    _pn_data_dump(this._data);
-};
-
-/**
- * Serialise a Native JavaScript Object into an AMQP Map.
- * @method putMAP
- * @memberof! proton.Data#
- * @param {object} object the Native JavaScript Object that we wish to serialise.
- */
-_Data_['putMAP'] = function(object) {
-    this['putMAPNODE']();
-    this['enter']();
-    for (var key in object) {
-        if (object.hasOwnProperty(key)) {
-            this['putObject'](key);
-            this['putObject'](object[key]);
-        }
-    }
-    this['exit']();
-};
-
-/**
- * Deserialise from an AMQP Map into a Native JavaScript Object.
- * @method getMAP
- * @memberof! proton.Data#
- * @returns {object} the deserialized Native JavaScript Object.
- */
-_Data_['getMAP'] = function() {
-    if (this['enter']()) {
-        var result = {};
-        while (this['next']()) {
-            var key = this['getObject']();
-            var value = null;
-            if (this['next']()) {
-                value = this['getObject']();
-            }
-            result[key] = value;
-        }
-        this['exit']();
-        return result;
-    }
-};
-
-/**
- * Serialise a Native JavaScript Array into an AMQP List.
- * @method putLIST
- * @memberof! proton.Data#
- * @param {Array} array the Native JavaScript Array that we wish to serialise.
- */
-_Data_['putLIST'] = function(array) {
-    this['putLISTNODE']();
-    this['enter']();
-    for (var i = 0, len = array.length; i < len; i++) {
-        this['putObject'](array[i]);
-    }
-    this['exit']();
-};
-
-/**
- * Deserialise from an AMQP List into a Native JavaScript Array.
- * @method getLIST
- * @memberof! proton.Data#
- * @returns {Array} the deserialized Native JavaScript Array.
- */
-_Data_['getLIST'] = function() {
-    if (this['enter']()) {
-        var result = [];
-        while (this['next']()) {
-            result.push(this['getObject']());
-        }
-        this['exit']();
-        return result;
-    }
-};
-
-/**
- * Serialise a proton.Data.Described into an AMQP Described.
- * @method putDESCRIBED
- * @memberof! proton.Data#
- * @param {proton.Data.Described} d the proton.Data.Described that we wish to serialise.
- */
-_Data_['putDESCRIBED'] = function(d) {
-    this['putDESCRIBEDNODE']();
-    this['enter']();
-    this['putObject'](d['descriptor']);
-    this['putObject'](d['value']);
-    this['exit']();
-};
-
-/**
- * Deserialise from an AMQP Described into a proton.Data.Described.
- * @method getDESCRIBED
- * @memberof! proton.Data#
- * @returns {proton.Data.Described} the deserialized proton.Data.Described.
- */
-_Data_['getDESCRIBED'] = function() {
-    if (this['enter']()) {
-        this['next']();
-        var descriptor = this['getObject']();
-        this['next']();
-        var value = this['getObject']();
-        this['exit']();
-        return new Data['Described'](value, descriptor);
-    }
-};
-
-/**
- * Serialise a proton.Data.Array or JavaScript TypedArray into an AMQP Array.
- * @method putARRAY
- * @memberof! proton.Data#
- * @param {object} a the proton.Data.Array or TypedArray that we wish to serialise.
- */
-_Data_['putARRAY'] = function(a) {
-    var type = 1;
-    var descriptor = 'TypedArray';
-    var array = a;
-
-    if (a instanceof Data['Array']) { // Array is a proton.Data.Array
-        type = Data[a['type']]; // Find the integer type from its name string.
-        descriptor = a['descriptor'];
-        array = a['elements'];
-    } else { // Array is a Native JavaScript TypedArray so work out the right type.
-        if (a instanceof Int8Array) {
-            type = Data['BYTE'];
-        } else if (a instanceof Uint8Array || a instanceof Uint8ClampedArray) {
-            type = Data['UBYTE'];
-        } else if (a instanceof Int16Array) {
-            type = Data['SHORT'];
-        } else if (a instanceof Uint16Array) {
-            type = Data['USHORT'];
-        } else if (a instanceof Int32Array) {
-            type = Data['INT'];
-        } else if (a instanceof Uint32Array) {
-            type = Data['UINT'];
-        } else if (a instanceof Float32Array) {
-            type = Data['FLOAT'];
-        } else if (a instanceof Float64Array) {
-            type = Data['DOUBLE'];
-        }
-    }
-
-    var described = descriptor != null;
-
-    this['putARRAYNODE'](described, type);
-    this['enter']();
-    if (described) {
-        this['putObject'](descriptor);
-    }
-    var putter = 'put' + Data['TypeNames'][type];
-    for (var i = 0, len = array.length; i < len; i++) {
-        var value = array[i];
-        value = (value instanceof Data.TypedNumber) ? value.value : value;
-        this[putter](value);
-    }
-    this['exit']();
-};
-
-/**
- * Deserialise from an AMQP Array into a proton.Data.Array.
- * @method getARRAY
- * @memberof! proton.Data#
- * @returns {proton.Data.Array} the deserialized proton.Data.Array.
- */
-_Data_['getARRAY'] = function() {
-    var metadata = this['getARRAYNODE']();
-    var count = metadata['count'];
-    var described = metadata['described'];
-    var type = metadata['type'];
-
-    if (type === null) {
-        return null;
-    }
-
-    var elements = null;
-    if (typeof ArrayBuffer === 'function') {
-        if (type === Data['BYTE']) {
-            elements = new Int8Array(count);
-        } else if (type === Data['UBYTE']) {
-            elements = new Uint8Array(count);
-        } else if (type === Data['SHORT']) {
-            elements = new Int16Array(count);
-        } else if (type === Data['USHORT']) {
-            elements = new Uint16Array(count);
-        } else if (type === Data['INT']) {
-            elements = new Int32Array(count);
-        } else if (type === Data['UINT']) {
-            elements = new Uint32Array(count);
-        } else if (type === Data['FLOAT']) {
-            elements = new Float32Array(count);
-        } else if (type === Data['DOUBLE']) {
-            elements = new Float64Array(count);
-        } else {
-            elements = new Array(count);
-        }
-    } else {
-        elements = new Array(count);
-    }
-
-    if (this['enter']()) {
-        var descriptor; // Deliberately initialised as undefined not null.
-        if (described) {
-            this['next']();
-            descriptor = this['getObject']();
-        }
-
-        for (var i = 0; i < count; i++) {
-            this['next']();
-            elements[i] = this['getObject']();
-        }
-
-        this['exit']();
-        if (descriptor === 'TypedArray') {
-            return elements;
-        } else {
-            return new Data['Array'](type, elements, descriptor);
-        }
-    }
-};
-
-/**
- * This method is the entry point for serialising native JavaScript types into
- * AMQP types. In an ideal world there would be a nice clean one to one mapping
- * and we could employ a look-up table but in practice the JavaScript type system
- * doesn't really lend itself to that and we have to employ extra checks,
- * heuristics and inferences.
- * @method putObject
- * @memberof! proton.Data#
- * @param {object} obj the JavaScript Object or primitive to be serialised.
- */
-_Data_['putObject'] = function(obj) {
-//console.log("Data.putObject " + obj);
-
-    if (obj == null) { // == Checks for null and undefined.
-        this['putNULL']();
-    } else if (Data.isString(obj)) {
-        var quoted = obj.match(/(['"])[^'"]*\1/);
-        if (quoted) { // If a quoted string extract the string inside the quotes.
-            obj = quoted[0].slice(1, -1);
-        }
-        this['putSTRING'](obj);
-    } else if (obj instanceof Date) {
-        this['putTIMESTAMP'](obj);
-    } else if (obj instanceof Data['Uuid']) {
-        this['putUUID'](obj);
-    } else if (obj instanceof Data['Binary']) {
-        this['putBINARY'](obj);
-    } else if (obj instanceof Data['Symbol']) {
-        this['putSYMBOL'](obj);
-    } else if (obj instanceof Data['Described']) {
-        this['putDESCRIBED'](obj);
-    } else if (obj instanceof Data['Array']) {
-        this['putARRAY'](obj);
-    } else if (obj.buffer && (typeof ArrayBuffer === 'function') && 
-               obj.buffer instanceof ArrayBuffer) {
-        this['putARRAY'](obj);
-    } else if (obj instanceof Data.TypedNumber) { // Dot notation used for "protected" inner class.
-        // Call the appropriate serialisation method based upon the numerical type.
-        this['put' + obj.type](obj.value);
-    } else if (Data.isNumber(obj)) {
-        /**
-         * This block encodes standard JavaScript numbers by making some inferences.
-         * Encoding JavaScript numbers is surprisingly complex and has several
-         * gotchas. The code here tries to do what the author believes is the
-         * most "intuitive" encoding of the native JavaScript Number. It first
-         * tries to identify if the number is an integer or floating point type
-         * by checking if the number modulo 1 is zero (i.e. if it has a remainder
-         * then it's a floating point type, which is encoded here as a double).
-         * If the number is an integer type a test is made to check if it is a
-         * 32 bit Int value. N.B. gotcha - JavaScript automagically coerces floating
-         * point numbers with a zero Fractional Part into an *exact* integer so
-         * numbers like 1.0, 100.0 etc. will be encoded as int or long here,
-         * which is unlikely to be what is wanted. There's no easy "transparent"
-         * way around this. The TypedNumber approach above allows applications
-         * to express more explicitly what is required, for example (1.0).float()
-         * (1).ubyte(), (5).long() etc.
-         */
-        if (obj % 1 === 0) {
-            if (obj === (obj|0)) { // the |0 coerces to a 32 bit value.
-                // 32 bit integer - encode as an INT.
-                this['putINT'](obj);
-            } else { // Longer than 32 bit - encode as a Long.
-                this['putLONG'](obj);
-            }
-        } else { // Floating point type - encode as a Double
-            this['putDOUBLE'](obj);
-        }
-    } else if (Data.isBoolean(obj)) {
-        this['putBOOL'](obj);
-    } else if (Data.isArray(obj)) { // Native JavaScript Array
-        this['putLIST'](obj);
-    } else {
-        this['putMAP'](obj);
-    }
-};
-
-/**
- * @method getObject
- * @memberof! proton.Data#
- * @returns {object} the JavaScript Object or primitive being deserialized.
- */
-_Data_['getObject'] = function() {
-    var type = Data['TypeNames'][this.type()];
-    type = type ? type : 'NULL';
-    var getter = 'get' + type;
-    return this[getter]();
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/error.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/error.js b/proton-c/bindings/javascript/error.js
deleted file mode 100644
index 4069bef..0000000
--- a/proton-c/bindings/javascript/error.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                                   Status                                  */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Export Status Enum, avoiding minification.
- * @enum
- * @alias Status
- * @memberof proton
- */
-Module['Status'] = {
-    /** PN_STATUS_UNKNOWN */  'UNKNOWN':  0, // The tracker is unknown.
-    /** PN_STATUS_PENDING */  'PENDING':  1, // The message is in flight.
-                                             // For outgoing messages, use messenger.isBuffered()
-                                             // to see if it has been sent or not.
-    /** PN_STATUS_ACCEPTED */ 'ACCEPTED': 2, // The message was accepted.
-    /** PN_STATUS_REJECTED */ 'REJECTED': 3, // The message was rejected.
-    /** PN_STATUS_RELEASED */ 'RELEASED': 4, // The message was released.
-    /** PN_STATUS_MODIFIED */ 'MODIFIED': 5, // The message was modified.
-    /** PN_STATUS_ABORTED */  'ABORTED':  6, // The message was aborted.
-    /** PN_STATUS_SETTLED */  'SETTLED':  7  // The remote party has settled the message.
-};
-
-
-/*****************************************************************************/
-/*                                                                           */
-/*                                   Error                                   */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Export Error Enum, avoiding minification.
- * @enum
- * @alias Error
- * @memberof proton
- */
-Module['Error'] = {
-    /** PN_EOS */        'EOS':        -1,
-    /** PN_ERR */        'ERR':        -2,
-    /** PN_OVERFLOW */   'OVERFLOW':   -3,
-    /** PN_UNDERFLOW */  'UNDERFLOW':  -4,
-    /** PN_STATE_ERR */  'STATE_ERR':  -5,
-    /** PN_ARG_ERR */    'ARG_ERR':    -6,
-    /** PN_TIMEOUT */    'TIMEOUT':    -7,
-    /** PN_INTR */       'INTR':       -8,
-    /** PN_INPROGRESS */ 'INPROGRESS': -9
-};
-
-
-/*****************************************************************************/
-/*                                                                           */
-/*                               MessengerError                              */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Constructs a proton.MessengerError instance.
- * @classdesc This class is a subclass of Error.
- * @constructor proton.MessengerError
- * @param {string} message the error message.
- */
-Module['MessengerError'] = function(message) { // MessengerError constructor.
-    this.name = "MessengerError";
-    this.message = (message || "");
-};
-
-Module['MessengerError'].prototype = new Error();
-Module['MessengerError'].prototype.constructor = Module['MessengerError'];
-
-Module['MessengerError'].prototype.toString = function() {
-    return this.name + ': ' + this.message;
-};
-
-
-/*****************************************************************************/
-/*                                                                           */
-/*                              SubscriptionError                            */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Constructs a proton.SubscriptionError instance.
- * @classdesc This class is a subclass of MessengerError.
- * @constructor proton.SubscriptionError
- * @param {string} source the address that we want to subscribe to.
- * @param {string} message the error message.
- */
-Module['SubscriptionError'] = function(source, message) { // SubscriptionError constructor.
-    this.name = "SubscriptionError";
-    this.source = source;
-    this.message = (message || "");
-};
-
-Module['SubscriptionError'].prototype = new Module['MessengerError']();
-Module['SubscriptionError'].prototype.constructor = Module['SubscriptionError'];
-
-Module['SubscriptionError'].prototype.toString = function() {
-    return this.name + ': ' + this.source + ': ' + this.message;
-};
-
-
-/*****************************************************************************/
-/*                                                                           */
-/*                                MessageError                               */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Constructs a proton.MessageError instance.
- * @classdesc This class is a subclass of Error.
- * @constructor proton.MessageError
- * @param {string} message the error message.
- */
-Module['MessageError'] = function(message) { // MessageError constructor.
-    this.name = "MessageError";
-    this.message = (message || "");
-};
-
-Module['MessageError'].prototype = new Error();
-Module['MessageError'].prototype.constructor = Module['MessageError'];
-
-Module['MessageError'].prototype.toString = function() {
-    return this.name + ': ' + this.message;
-};
-
-
-/*****************************************************************************/
-/*                                                                           */
-/*                                  DataError                                */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Constructs a proton.DataError instance.
- * @classdesc This class is a subclass of Error.
- * @constructor proton.DataError
- * @param {string} message the error message.
- */
-Module['DataError'] = function(message) { // DataError constructor.
-    this.name = "DataError";
-    this.message = (message || "");
-};
-
-Module['DataError'].prototype = new Error();
-Module['DataError'].prototype.constructor = Module['DataError'];
-
-Module['DataError'].prototype.toString = function() {
-    return this.name + ': ' + this.message;
-};
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[4/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Posted by jr...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/Message.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Message.pm b/proton-c/bindings/perl/lib/qpid/proton/Message.pm
deleted file mode 100644
index 0251b89..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/Message.pm
+++ /dev/null
@@ -1,538 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-package qpid::proton::Message;
-
-our $DATA_FORMAT = $cproton_perl::PN_DATA;
-our $TEXT_FORMAT = $cproton_perl::PN_TEXT;
-our $AMQP_FORMAT = $cproton_perl::PN_AMQP;
-our $JSON_FORMAT = $cproton_perl::PN_JSON;
-
-sub new {
-    my ($class) = @_;
-    my ($self) = {};
-
-    my $impl = cproton_perl::pn_message();
-    $self->{_impl} = $impl;
-    $self->{_properties} = {};
-    $self->{_instructions} = {};
-    $self->{_annotations} = {};
-    $self->{_body} = undef;
-    $self->{_body_type} = undef;
-
-    bless $self, $class;
-    return $self;
-}
-
-use overload fallback => 1,
-    '""' => sub {
-        my ($self) = @_;
-        my $tmp = cproton_perl::pn_string("");
-        cproton_perl::pn_inspect($self->{_impl}, $tmp);
-        my $result = cproton_perl::pn_string_get($tmp);
-        cproton_perl::pn_free($tmp);
-        return $result;
-};
-
-sub DESTROY {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_message_free($impl);
-}
-
-sub get_impl {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    return $impl;
-}
-
-sub clear {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_message_clear($impl);
-
-    $self->{_body} = undef;
-    $self->{_properties} = {};
-    $self->{_instructions} = {};
-    $self->{_annotations} = {};
-}
-
-sub errno {
-    my ($self) = @_;
-    return cproton_perl::pn_message_errno($self->{_impl});
-}
-
-sub error {
-    my ($self) = @_;
-    return cproton_perl::pn_message_error($self->{_impl});
-}
-
-sub set_durable {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_durable($self->{_impl}, $_[1]);
-}
-
-sub get_durable {
-    my ($self) = @_;
-    return cproton_perl::pn_message_is_durable($self->{_impl});
-}
-
-sub set_priority {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_priority($self->{_impl}, $_[1]);
-}
-
-sub get_priority {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_priority($self->{_impl});
-}
-
-sub set_ttl {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_ttl($self->{_impl}, $_[1]);
-}
-
-sub get_ttl {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_ttl($self->{_impl});
-}
-
-sub set_first_acquirer {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_first_acquirer($self->{_impl}, $_[1]);
-}
-
-sub get_first_acquirer {
-    my ($self) = @_;
-    return cproton_perl::pn_message_is_first_acquirer($self->{_impl});
-}
-
-sub set_delivery_count {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_delivery_count($self->{_impl}, $_[1]);
-}
-
-sub get_delivery_count {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_delivery_count($self->{_impl});
-}
-
-sub set_id {
-    my ($self) = @_;
-    my $id = $_[1];
-
-    die "Message id must be defined" if !defined($id);
-
-    cproton_perl::pn_message_set_id($self->{_impl}, $id);
-}
-
-sub get_id {
-    my ($self) = @_;
-    my $id = cproton_perl::pn_message_get_id($self->{_impl});
-
-    return $id;
-}
-
-sub set_user_id {
-    my ($self) = @_;
-    my $user_id = $_[1];
-
-    die "User id must be defined" if !defined($user_id);
-
-    cproton_perl::pn_message_set_user_id($self->{_impl}, $user_id);
-}
-
-sub get_user_id {
-    my ($self) = @_;
-    my $user_id = cproton_perl::pn_message_get_user_id($self->{_impl});
-
-    return $user_id;
-}
-
-sub set_address {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_address($self->{_impl}, $_[1]);
-}
-
-sub get_address {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_address($self->{_impl});
-}
-
-sub set_subject {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_subject($self->{_impl}, $_[1]);
-}
-
-sub get_subject {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_subject($self->{_impl});
-}
-
-sub set_reply_to {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_reply_to($self->{_impl}, $_[1]);
-}
-
-sub get_reply_to {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_reply_to($self->{_impl});
-}
-
-sub set_correlation_id {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_correlation_id($self->{_impl}, $_[1]);
-}
-
-sub get_correlation_id {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_correlation_id($self->{_impl});
-}
-
-sub set_format {
-    my ($self) = @_;
-    my $format = $_[1];
-
-    die "Format must be defined" if !defined($format);
-
-    cproton_perl::pn_message_set_format($self->{_impl}, $format);
-}
-
-sub get_format {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_format($self->{_impl});
-}
-
-sub set_content_type {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_content_type($self->{_impl}, $_[1]);
-}
-
-sub get_content_type {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_content_type($self->{_impl});
-}
-
-sub set_content_encoding {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_content_encoding($self->{_impl}, $_[1]);
-}
-
-sub get_content_encoding {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_content_encoding($self->{_impl});
-}
-
-sub set_expiry_time {
-    my ($self) = @_;
-    my $expiry_time = $_[1];
-
-    die "Expiry time must be defined" if !defined($expiry_time);
-
-    $expiry_time = int($expiry_time);
-
-    die "Expiry time must be non-negative" if $expiry_time < 0;
-
-    cproton_perl::pn_message_set_expiry_time($self->{_impl}, $expiry_time);
-}
-
-sub get_expiry_time {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_expiry_time($self->{_impl});
-}
-
-sub set_creation_time {
-    my ($self) = @_;
-    my $creation_time = $_[1];
-
-    die "Creation time must be defined" if !defined($creation_time);
-
-    $creation_time = int($creation_time);
-
-    die "Creation time must be non-negative" if $creation_time < 0;
-
-    cproton_perl::pn_message_set_creation_time($self->{_impl}, $creation_time);
-}
-
-sub get_creation_time {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_creation_time($self->{_impl});
-}
-
-sub set_group_id {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_group_id($self->{_impl}, $_[1]);
-}
-
-sub get_group_id {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_group_id($self->{_impl});
-}
-
-sub set_group_sequence {
-    my ($self) = @_;
-    my $group_sequence = $_[1];
-
-    die "Group sequence must be defined" if !defined($group_sequence);
-
-    cproton_perl::pn_message_set_group_sequence($self->{_impl}, int($_[1]));
-}
-
-sub get_group_sequence {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_group_sequence($self->{_impl});
-}
-
-sub set_reply_to_group_id {
-    my ($self) = @_;
-    cproton_perl::pn_message_set_reply_to_group_id($self->{_impl}, $_[1]);
-}
-
-sub get_reply_to_group_id {
-    my ($self) = @_;
-    return cproton_perl::pn_message_get_reply_to_group_id($self->{_impl});
-}
-
-=pod
-
-=head2 PROPERTIES
-
-Allows for accessing and updating the set of properties associated with the
-message.
-
-=over
-
-=item my $props = $msg->get_properties;
-
-=item $msg->set_properties( [VAL] );
-
-=item my $value = $msg->get_property( [KEY] );
-
-=item $msg->set_propert( [KEY], [VALUE] );
-
-=back
-
-=cut
-
-sub get_properties {
-    my ($self) = @_;
-
-    return $self->{_properties};
-}
-
-sub set_properties {
-    my ($self) = @_;
-    my ($properties) = $_[1];
-
-    $self->{_properties} = $properties;
-}
-
-sub get_property {
-    my ($self) = @_;
-    my $name = $_[1];
-    my $properties = $self->{_properties};
-
-    return $properties{$name};
-}
-
-sub set_property {
-    my ($self) = @_;
-    my $name = $_[1];
-    my $value = $_[2];
-    my $properties = $self->{_properties};
-
-    $properties->{"$name"} = $value;
-}
-
-=pod
-
-=head2 ANNOTATIONS
-
-Allows for accessing and updatin ghte set of annotations associated with the
-message.
-
-=over
-
-=item my $annotations = $msg->get_annotations;
-
-=item $msg->get_annotations->{ [KEY] } = [VALUE];
-
-=item $msg->set_annotations( [VALUE ]);
-
-=back
-
-=cut
-
-sub get_annotations {
-    my ($self) = @_;
-    return $self->{_annotations};
-}
-
-sub set_annotations {
-    my ($self) = @_;
-    my $annotations = $_[1];
-
-    $self->{_annotations} = $annotations;
-}
-
-=pod
-
-=cut
-
-sub get_instructions {
-    my ($self) = @_;
-    return $self->{_instructions};
-}
-
-sub set_instructions {
-    my ($self) = @_;
-    my $instructions = $_[1];
-
-    $self->{_instructions} = $instructions;
-}
-
-=pod
-
-=head2 BODY
-
-The body of the message. When setting the body value a type must be specified,
-such as I<qpid::proton::INT>. If unspecified, the body type will default to
-B<qpid::proton::STRING>.
-
-=over
-
-=item $msg->set_body( [VALUE], [TYPE] );
-
-=item $msg->get_body();
-
-=item $msg->get_body_type();
-
-=back
-
-=cut
-
-sub set_body {
-    my ($self) = @_;
-    my $body = $_[1];
-    my $body_type = $_[2] || undef;
-
-    # if no body type was defined, then attempt to infer what it should
-    # be, which is going to be a best guess
-    if (!defined($body_type)) {
-        if (qpid::proton::utils::is_num($body)) {
-            if (qpid::proton::utils::is_float($body)) {
-                $body_type = qpid::proton::FLOAT;
-            } else {
-                $body_type = qpid::proton::INT;
-            }
-        } elsif (!defined($body)) {
-            $body_type =  qpid::proton::NULL;
-        } elsif ($body eq '') {
-            $body_type =  qpid::proton::STRING;
-        } elsif (ref($body) eq 'HASH') {
-            $body_type =  qpid::proton::MAP;
-        } elsif (ref($body) eq 'ARRAY') {
-            $body_type =  qpid::proton::LIST;
-        } else {
-            $body_type =  qpid::proton::STRING;
-        }
-    }
-
-    $self->{_body} = $body;
-    $self->{_body_type} = $body_type;
-}
-
-sub get_body {
-    my ($self) = @_;
-    my $body = $self->{_body};
-
-    return $body;
-}
-
-sub get_body_type {
-    my ($self) = @_;
-
-    return $self->{_body_type};
-}
-
-sub preencode() {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $my_body = $self->{_body};
-    my $body_type = $self->{_body_type};
-    my $body = new qpid::proton::Data(cproton_perl::pn_message_body($impl));
-
-    $body->clear();
-    $body_type->put($body, $my_body) if(defined($my_body) && $body_type);
-
-    my $my_props = $self->{_properties};
-    my $props = new qpid::proton::Data(cproton_perl::pn_message_properties($impl));
-    $props->clear();
-    qpid::proton::MAP->put($props, $my_props) if $my_props;
-
-    my $my_insts = $self->{_instructions};
-    my $insts = new qpid::proton::Data(cproton_perl::pn_message_instructions($impl));
-    $insts->clear;
-    qpid::proton::MAP->put($insts, $my_insts) if $my_insts;
-
-    my $my_annots = $self->{_annotations};
-    my $annotations = new qpid::proton::Data(cproton_perl::pn_message_annotations($impl));
-    $annotations->clear();
-    qpid::proton::MAP->put($annotations, $my_annots);
-}
-
-sub postdecode() {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    $self->{_body} = undef;
-    $self->{_body_type} = undef;
-    my $body = new qpid::proton::Data(cproton_perl::pn_message_body($impl));
-    if ($body->next()) {
-        $self->{_body_type} = $body->get_type();
-        $self->{_body} = $body->get_type()->get($body);
-    }
-
-    my $props = new qpid::proton::Data(cproton_perl::pn_message_properties($impl));
-    $props->rewind;
-    if ($props->next) {
-        my $properties = $props->get_type->get($props);
-        $self->{_properties} = $props->get_type->get($props);
-    }
-
-    my $insts = new qpid::proton::Data(cproton_perl::pn_message_instructions($impl));
-    $insts->rewind;
-    if ($insts->next) {
-        $self->{_instructions} = $insts->get_type->get($insts);
-    }
-
-    my $annotations = new qpid::proton::Data(cproton_perl::pn_message_annotations($impl));
-    $annotations->rewind;
-    if ($annotations->next) {
-        my $annots = $annotations->get_type->get($annotations);
-        $self->{_annotations} = $annots;
-    } else {
-        $self->{_annotations} = {};
-    }
-}
-
-1;
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/Messenger.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Messenger.pm b/proton-c/bindings/perl/lib/qpid/proton/Messenger.pm
deleted file mode 100644
index c60bfb6..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/Messenger.pm
+++ /dev/null
@@ -1,353 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use strict;
-use warnings;
-use cproton_perl;
-
-package qpid::proton::Messenger;
-
-sub new {
-    my ($class) = @_;
-    my ($self) = {};
-
-    my $impl = cproton_perl::pn_messenger($_[1]);
-    $self->{_impl} = $impl;
-
-    bless $self, $class;
-    return $self;
-}
-
-sub DESTROY {
-    my ($self) = @_;
-    cproton_perl::pn_messenger_stop($self->{_impl});
-    cproton_perl::pn_messenger_free($self->{_impl});
-}
-
-sub get_name {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_name($self->{_impl});
-}
-
-sub set_timeout {
-    my ($self) = @_;
-    my $timeout = $_[1];
-
-    $timeout = 0 if !defined($timeout);
-    $timeout = int($timeout);
-
-    cproton_perl::pn_messenger_set_timeout($self->{_impl}, $timeout);
-}
-
-sub get_timeout {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_get_timeout($self->{_impl});
-}
-
-sub set_outgoing_window {
-    my ($self) = @_;
-    my $window = $_[1];
-
-    $window = 0 if !defined($window);
-    $window = int($window);
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_set_outgoing_window($self->{_impl}, $window), $self);
-}
-
-sub get_outgoing_window {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_get_outgoing_window($self->{_impl});
-}
-
-sub set_incoming_window{
-    my ($self) = @_;
-    my $window = $_[1];
-
-    $window = 0 if !defined($window);
-    $window = int($window);
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_set_incoming_window($self->{_impl}, $window), $self);
-}
-
-sub get_incoming_window {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_get_incoming_window($self->{_impl});
-}
-
-sub get_error {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $text = cproton_perl::pn_error_text(cproton_perl::pn_messenger_error($impl));
-
-    return $text || "";
-}
-
-sub get_errno {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_errno($self->{_impl});
-}
-
-sub start {
-    my ($self) = @_;
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_start($self->{_impl}), $self);
-}
-
-sub stop {
-    my ($self) = @_;
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_stop($self->{_impl}), $self);
-}
-
-sub stopped {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    return cproton_perl::pn_messenger_stopped($impl);
-}
-
-sub subscribe {
-    my ($self) = @_;
-    cproton_perl::pn_messenger_subscribe($self->{_impl}, $_[1]);
-}
-
-sub set_certificate {
-    my ($self) = @_;
-    cproton_perl::pn_messenger_set_certificate($self->{_impl}, $_[1]);
-}
-
-sub get_certificate {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_get_certificate($self->{_impl});
-}
-
-sub set_private_key {
-    my ($self) = @_;
-    cproton_perl::pn_messenger_set_private_key($self->{_impl}, $_[1]);
-}
-
-sub get_private_key {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_get_private_key($self->{_impl});
-}
-
-sub set_password {
-    my ($self) = @_;
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_set_password($self->{_impl}, $_[1]), $self);
-}
-
-sub get_password {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_get_password($self->{_impl});
-}
-
-sub set_trusted_certificates {
-    my ($self) = @_;
-    cproton_perl::pn_messenger_set_trusted_certificates($self->{_impl}, $_[1]);
-}
-
-sub get_trusted_certificates {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_get_trusted_certificates($self->{_impl});
-}
-
-sub put {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $message = $_[1];
-
-    $message->preencode();
-    my $msgimpl = $message->get_impl();
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_put($impl, $msgimpl), $self);
-
-    my $tracker = $self->get_outgoing_tracker();
-    return $tracker;
-}
-
-sub get_outgoing_tracker {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    my $tracker = cproton_perl::pn_messenger_outgoing_tracker($impl);
-    if ($tracker != -1) {
-        return qpid::proton::Tracker->new($tracker);
-    } else {
-        return undef;
-    }
-}
-
-sub send {
-    my ($self) = @_;
-    my $n = $_[1];
-    $n = -1 if !defined $n;
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_send($self->{_impl}, $n), $self);
-}
-
-sub get {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $message = $_[1] || new proton::Message();
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_get($impl, $message->get_impl()), $self);
-    $message->postdecode();
-
-    my $tracker = $self->get_incoming_tracker();
-    return $tracker;
-}
-
-sub get_incoming_tracker {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $result = undef;
-
-    my $tracker = cproton_perl::pn_messenger_incoming_tracker($impl);
-    if ($tracker != -1) {
-        $result = new qpid::proton::Tracker($tracker);
-    }
-
-    return $result;
-}
-
-sub receive {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $n = $_[1] || -1;
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_recv($impl, $n), $self);
-}
-
-sub set_blocking {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $blocking = int($_[1] || 0);
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_set_blocking($impl, $blocking));
-}
-
-sub get_blocking {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    return cproton_perl::pn_messenger_is_blocking($impl);
-}
-
-sub work {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $timeout = $_[1];
-
-    if (!defined($timeout)) {
-        $timeout = -1;
-    } else {
-        $timeout = int($timeout * 1000);
-    }
-    my $err = cproton_perl::pn_messenger_work($impl, $timeout);
-    if ($err == qpid::proton::Errors::TIMEOUT) {
-        return 0;
-    } else {
-        qpid::proton::check_for_error($err);
-        return 1;
-    }
-}
-
-sub interrupt {
-    my ($self) = @_;
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_interrupt($self->{_impl}), $self);
-}
-
-sub outgoing {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_outgoing($self->{_impl});
-}
-
-sub incoming {
-    my ($self) = @_;
-    return cproton_perl::pn_messenger_incoming($self->{_impl});
-}
-
-sub route {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $pattern = $_[1];
-    my $address = $_[2];
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_route($impl, $pattern, $address));
-}
-
-sub rewrite {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $pattern = $_[1];
-    my $address = $_[2];
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_rewrite($impl, $pattern, $address));
-}
-
-sub accept {
-    my ($self) = @_;
-    my $tracker = $_[1];
-    my $flags = 0;
-    if (!defined $tracker) {
-        $tracker = cproton_perl::pn_messenger_incoming_tracker($self->{_impl});
-        $flags = $cproton_perl::PN_CUMULATIVE;
-    } else {
-        $tracker = $tracker->get_impl;
-    }
-
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_accept($self->{_impl}, $tracker, $flags), $self);
-}
-
-sub reject {
-    my ($self) = @_;
-    my $tracker = $_[1];
-    my $flags = 0;
-    if (!defined $tracker) {
-        $tracker = cproton_perl::pn_messenger_incoming_tracker($self->{_impl});
-        $flags = $cproton_perl::PN_CUMULATIVE;
-    }
-    qpid::proton::check_for_error(cproton_perl::pn_messenger_reject($self->{_impl}, $tracker, $flags), $self);
-}
-
-sub status {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $tracker = $_[1];
-
-    if (!defined($tracker)) {
-        $tracker = $self->get_incoming_tracker();
-    }
-
-    return cproton_perl::pn_messenger_status($impl, $tracker->get_impl);
-}
-
-sub settle {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $tracker = $_[1];
-    my $flag = 0;
-
-    if (!defined($tracker)) {
-        $tracker = $self->get_incoming_tracker();
-        $flag = $cproton_perl::PN_CUMULATIVE;
-    }
-
-    cproton_perl::pn_messenger_settle($impl, $tracker->get_impl, $flag);
-}
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/Tracker.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Tracker.pm b/proton-c/bindings/perl/lib/qpid/proton/Tracker.pm
deleted file mode 100644
index 82046e7..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/Tracker.pm
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-package qpid::proton::Tracker;
-
-sub new {
-    my ($class) = @_;
-    my ($self) = {};
-
-    $self->{_impl} = $_[1];
-
-    bless $self, $class;
-
-    return $self;
-}
-
-sub get_impl {
-    my ($self) = @_;
-
-    return $self->{_impl};
-}
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/array_helper.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/array_helper.pm b/proton-c/bindings/perl/lib/qpid/proton/array_helper.pm
deleted file mode 100644
index 40b4b80..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/array_helper.pm
+++ /dev/null
@@ -1,147 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-=pod
-
-=head1 NAME
-
-qpid::proton;
-
-=head1 DESCRIPTION
-
-=cut
-
-package qpid::proton;
-
-=pod
-
-=head1 MOVING DATA OUT OF A DATA OBJECT
-
-=over
-
-=item qpid::proton::put_array_into( [DATA], [TYPE], [ELEMENTS], [DESCRIBED], [DESCRIPTOR] );
-
-Puts the specified elements into the I<qpid::proton::Data> object specified
-using the specified B<type> value. If the array is described (def. undescribed)
-then the supplied B<descriptor> is used.
-
-=item ($described, $type, @elements) = qpid::proton::get_array_from( [DATA] );
-
-=item ($described, $descriptor, $type, @elements) = qpid::proton::get_array_from( [DATA] );
-
-Retrieves the descriptor, size, type and elements for an array from the
-specified instance of I<qpid::proton::Data>.
-
-If the array is B<described> then the I<descriptor> for the array is returned as well.
-
-=item @elements = qpid::proton::get_list_from( [DATA] );
-
-Retrieves the elements for a list from the specified instance of
-I<qpid::proton::Data>.
-
-=back
-
-=cut
-
-sub put_array_into {
-    my $data = $_[0];
-    my $type = $_[1];
-    my ($values) = $_[2];
-    my $described = $_[3] || 0;
-    my $descriptor = $_[4];
-
-    die "data cannot be nil" if !defined($data);
-    die "type cannot be nil" if !defined($type);
-    die "values cannot be nil" if !defined($values);
-    die "descriptor cannot be nil" if $described && !defined($descriptor);
-
-    $data->put_array($described, $type);
-    $data->enter;
-
-    if ($described && defined($descriptor)) {
-        $data->put_symbol($descriptor);
-    }
-
-    foreach $value (@{$values}) {
-        $type->put($data, $value);
-    }
-    $data->exit;
-}
-
-sub get_array_from {
-    my $data = $_[0];
-
-    die "data cannot be nil" if !defined($data);
-
-    # ensure we're actually on an array
-    my $type = $data->get_type;
-
-    die "current node is not an array" if !defined($type) ||
-        !($type == qpid::proton::ARRAY);
-
-    my ($count, $described, $rtype) = $data->get_array;
-    my @elements = ();
-
-    $data->enter;
-
-    if (defined($described) && $described) {
-        $data->next;
-        $descriptor = $data->get_symbol;
-    }
-
-    for ($i = 0; $i < $count; $i++) {
-        $data->next;
-        my $type    = $data->get_type;
-        my $element = $type->get($data);
-        push(@elements, $element);
-    }
-
-    $data->exit;
-
-    if (defined($described) && $described) {
-        return ($described, $descriptor, $rtype, @elements) if $described;
-    } else {
-        return ($described, $rtype, @elements);
-    }
-}
-
-sub get_list_from {
-    my $data = $_[0];
-
-    die "data can not be nil" if !defined($data);
-
-    # ensure we're actually on a list
-    my $type = $data->get_type;
-
-    die "current node is not a list" if !defined($type) ||
-        !($type == qpid::proton::LIST);
-
-    my $count = $data->get_list;
-    $data->enter;
-    for($i = 0; $i < $count; $i++) {
-        $data->next;
-        my $type = $data->get_type;
-        my $element = $type->get($data);
-        push(@elements, $element);
-    }
-
-    return @elements;
-}
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/utils.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/utils.pm b/proton-c/bindings/perl/lib/qpid/proton/utils.pm
deleted file mode 100644
index 0ab4e3e..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/utils.pm
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-package qpid::proton::utils;
-
-sub is_num {
-    my $val = $_[0];
-
-    return 0 if !defined($val);
-    return 0 if $val eq '';
-
-    $_[0] ^ $_[0] ? 0 : 1
-}
-
-sub is_float {
-    my $val = $_[0];
-
-    return 1 if ($val - int($val));
-    return 0;
-}
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid_proton.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid_proton.pm b/proton-c/bindings/perl/lib/qpid_proton.pm
deleted file mode 100644
index 7e43218..0000000
--- a/proton-c/bindings/perl/lib/qpid_proton.pm
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use strict;
-use warnings;
-use cproton_perl;
-
-use qpid::proton;
-
-use qpid::proton::utils;
-use qpid::proton::ExceptionHandling;
-use qpid::proton::Data;
-use qpid::proton::Mapping;
-use qpid::proton::Constants;
-use qpid::proton::Tracker;
-use qpid::proton::Messenger;
-use qpid::proton::Message;
-
-package qpid_proton;
-
-1;
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/perl.i
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/perl.i b/proton-c/bindings/perl/perl.i
deleted file mode 100644
index ebc6915..0000000
--- a/proton-c/bindings/perl/perl.i
+++ /dev/null
@@ -1,216 +0,0 @@
-%module cproton_perl
-
-%{
-#include <proton/engine.h>
-#include <proton/message.h>
-#include <proton/sasl.h>
-#include <proton/messenger.h>
-#include <proton/ssl.h>
-#include <proton/url.h>
-#include <proton/reactor.h>
-#include <proton/handlers.h>
-%}
-
-%include <cstring.i>
-
-%typemap(in) pn_atom_t
-{
-  if(!$input)
-    {
-      $1.type = PN_NULL;
-    }
-  else
-    {
-      if(SvIOK($input)) // an integer value
-        {
-          $1.type = PN_LONG;
-          $1.u.as_long = SvIV($input);
-        }
-      else if(SvNOK($input)) // a floating point value
-        {
-          $1.type = PN_FLOAT;
-          $1.u.as_float = SvNV($input);
-        }
-      else if(SvPOK($input)) // a string type
-        {
-          STRLEN len;
-          char* ptr;
-
-          ptr = SvPV($input, len);
-          $1.type = PN_STRING;
-          $1.u.as_bytes.start = ptr;
-          $1.u.as_bytes.size = strlen(ptr); // len;
-        }
-    }
-}
-
-%typemap(out) pn_atom_t
-{
-  SV* obj = sv_newmortal();
-
-  switch($1.type)
-    {
-    case PN_NULL:
-      sv_setsv(obj, &PL_sv_undef);
-      break;
-
-    case PN_BYTE:
-      sv_setiv(obj, (IV)$1.u.as_byte);
-      break;
-
-    case PN_INT:
-      sv_setiv(obj, (IV)$1.u.as_int);
-      break;
-
-    case PN_LONG:
-      sv_setiv(obj, (IV)$1.u.as_long);
-      break;
-
-    case PN_STRING:
-      {
-        if($1.u.as_bytes.size > 0)
-          {
-            sv_setpvn(obj, $1.u.as_bytes.start, $1.u.as_bytes.size);
-          }
-        else
-          {
-            sv_setsv(obj, &PL_sv_undef);
-          }
-      }
-      break;
-
-    default:
-      break;
-    }
-
-  $result = obj;
-  // increment the hidden stack reference before returning
-  argvi++;
-}
-
-%typemap(in) pn_bytes_t
-{
-  STRLEN len;
-  char* ptr;
-
-  ptr = SvPV($input, len);
-  $1.start = ptr;
-  $1.size = strlen(ptr);
-}
-
-%typemap(out) pn_bytes_t
-{
-  SV* obj = sv_newmortal();
-
-  if($1.start != NULL)
-    {
-      $result = newSVpvn($1.start, $1.size);
-    }
-  else
-    {
-      $result = &PL_sv_undef;
-    }
-
-  argvi++;
-}
-
-%typemap(in) pn_decimal128_t
-{
-  AV *tmpav = (AV*)SvRV($input);
-  int index = 0;
-
-  for(index = 0; index < 16; index++)
-    {
-      $1.bytes[index] = SvIV(*av_fetch(tmpav, index, 0));
-      $1.bytes[index] = $1.bytes[index] & 0xff;
-    }
-}
-
-%typemap(out) pn_decimal128_t
-{
-  $result = newSVpvn($1.bytes, 16);
-  argvi++;
-}
-
-%typemap(in) pn_uuid_t
-{
-  // XXX: I believe there is a typemap or something similar for
-  // typechecking the input. We should probably use it.
-  AV* tmpav = (AV *) SvRV($input);
-  int index = 0;
-
-  for(index = 0; index < 16; index++)
-    {
-      $1.bytes[index] = SvIV(*av_fetch(tmpav, index, 0));
-      $1.bytes[index] = $1.bytes[index] & 0xff;
-    }
-}
-
-%typemap(out) pn_uuid_t
-{
-  $result = newSVpvn($1.bytes, 16);
-  argvi++;
-}
-
-%cstring_output_withsize(char *OUTPUT, size_t *OUTPUT_SIZE)
-%cstring_output_allocate_size(char **ALLOC_OUTPUT, size_t *ALLOC_SIZE, free(*$1));
-
-int pn_message_encode(pn_message_t *msg, char *OUTPUT, size_t *OUTPUT_SIZE);
-%ignore pn_message_encode;
-
-ssize_t pn_link_send(pn_link_t *transport, char *STRING, size_t LENGTH);
-%ignore pn_link_send;
-
-%rename(pn_link_recv) wrap_pn_link_recv;
-%inline %{
-  int wrap_pn_link_recv(pn_link_t *link, char *OUTPUT, size_t *OUTPUT_SIZE) {
-    ssize_t sz = pn_link_recv(link, OUTPUT, *OUTPUT_SIZE);
-    if (sz >= 0) {
-      *OUTPUT_SIZE = sz;
-    } else {
-      *OUTPUT_SIZE = 0;
-    }
-    return sz;
-  }
-%}
-%ignore pn_link_recv;
-
-ssize_t pn_transport_input(pn_transport_t *transport, char *STRING, size_t LENGTH);
-%ignore pn_transport_input;
-
-%rename(pn_transport_output) wrap_pn_transport_output;
-%inline %{
-  int wrap_pn_transport_output(pn_transport_t *transport, char *OUTPUT, size_t *OUTPUT_SIZE) {
-    ssize_t sz = pn_transport_output(transport, OUTPUT, *OUTPUT_SIZE);
-    if (sz >= 0) {
-      *OUTPUT_SIZE = sz;
-    } else {
-      *OUTPUT_SIZE = 0;
-    }
-    return sz;
-  }
-%}
-%ignore pn_transport_output;
-
-%rename(pn_delivery) wrap_pn_delivery;
-%inline %{
-  pn_delivery_t *wrap_pn_delivery(pn_link_t *link, char *STRING, size_t LENGTH) {
-    return pn_delivery(link, pn_dtag(STRING, LENGTH));
-  }
-%}
-%ignore pn_delivery;
-
-// Suppress "Warning(451): Setting a const char * variable may leak memory." on pn_delivery_tag_t
-%warnfilter(451) pn_delivery_tag_t;
-%rename(pn_delivery_tag) wrap_pn_delivery_tag;
-%inline %{
-  void wrap_pn_delivery_tag(pn_delivery_t *delivery, char **ALLOC_OUTPUT, size_t *ALLOC_SIZE) {
-    pn_delivery_tag_t tag = pn_delivery_tag(delivery);
-    *ALLOC_OUTPUT = (char *)malloc(tag.size);
-    *ALLOC_SIZE = tag.size;
-    memcpy(*ALLOC_OUTPUT, tag.start, tag.size);
-  }
-%}
-%ignore pn_delivery_tag;
-
-%include "proton/cproton.i"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/tests/array_helper.t
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/tests/array_helper.t b/proton-c/bindings/perl/tests/array_helper.t
deleted file mode 100644
index 2273085..0000000
--- a/proton-c/bindings/perl/tests/array_helper.t
+++ /dev/null
@@ -1,232 +0,0 @@
-#!/bin/env perl -w
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use Test::More qw(no_plan);
-use Test::Exception;
-
-require 'utils.pm';
-
-BEGIN {use_ok('qpid_proton');}
-require_ok('qpid_proton');
-
-my $data;
-my @values;
-my $result;
-my $length;
-my $descriptor;
-
-#=============================================================================
-# Getting an array from a nil Data instance raises an error.
-#=============================================================================
-$data = qpid::proton::Data->new;
-dies_ok(sub {qpid::proton::get_array_from(undef);},
-        "Raise an exception when getting from a nil Data object");
-
-
-#=============================================================================
-# Getting an array fails if the current node is not an array or a list.
-#=============================================================================
-$data = qpid::proton::Data->new;
-$data->put_string("foo");
-$data->rewind;
-$data->next;
-dies_ok(sub {qpid::proton::proton_get_array_from($data, undef);},
-        "Raise an exception when getting from a non-list and non-array");
-
-
-#=============================================================================
-# Can get an undescribed array.
-#=============================================================================
-$length = int(rand(256) + 64);
-$data = qpid::proton::Data->new;
-@values= random_integers($length);
-$data->put_array(0, qpid::proton::INT);
-$data->enter;
-foreach $value (@values) {
-    $data->put_int($value);
-}
-$data->exit;
-$data->rewind;
-
-{
-    $data->next;
-    my ($described, $type, @results) = qpid::proton::get_array_from($data);
-
-    ok(!$described, "Returned an undescribed array");
-    ok($type == qpid::proton::INT, "Returned the correct array type");
-    ok(scalar(@results) == $length, "Returns the correct number of elements");
-
-    is_deeply([sort @results], [sort @values],
-              "Returned the correct set of values");
-}
-
-
-#=============================================================================
-# Raises an error when putting into a null Data object.
-#=============================================================================
-dies_ok(sub {qpid::proton::put_array_into(undef, qpid::proton::INT,  @values);},
-        "Raises an error when putting into a null Data object");
-
-
-#=============================================================================
-# Raises an error when putting a null type into a Data object.
-#=============================================================================
-$data = qpid::proton::Data->new;
-dies_ok(sub {qpid::proton::put_array_into($data, undef,  @values);},
-        "Raises an error when putting into a null Data object");
-
-
-#=============================================================================
-# Raises an error when putting a null array into a Data object.
-#=============================================================================
-$data = qpid::proton::Data->new;
-dies_ok(sub {qpid::proton::put_array_into($data, qpid::proton::INT);},
-        "Raises an error when putting into a null Data object");
-
-
-#=============================================================================
-# Raises an error when putting a described array with no descriptor.
-#=============================================================================
-$data = qpid::proton::Data->new;
-dies_ok(sub {qpid::proton::put_array_into($data, qpid::proton::INT, \@values, 1);},
-        "Raises an error when putting a described array with no descriptor");
-
-
-#=============================================================================
-# Can put an undescribed array into a Data object.
-#=============================================================================
-$length = int(rand(256) + 64);
-$data = qpid::proton::Data->new;
-@values= random_integers($length);
-qpid::proton::put_array_into($data, qpid::proton::INT, \@values, 0);
-$data->rewind;
-
-{
-    $data->next;
-    my ($described, $type, @results) = qpid::proton::get_array_from($data);
-
-    ok(!$described, "Put an undescribed array");
-    ok($type == qpid::proton::INT, "Put the correct array type");
-    ok(scalar(@results) == $length, "Put the correct number of elements");
-
-    is_deeply([sort @results], [sort @values],
-              "Returned the correct set of values");
-}
-
-
-#=============================================================================
-# Can get an described array.
-#=============================================================================
-$length = int(rand(256) + 64);
-$data = qpid::proton::Data->new;
-@values= random_strings($length);
-$descriptor = random_string(64);
-$data->put_array(1, qpid::proton::STRING);
-$data->enter;
-$data->put_symbol($descriptor);
-foreach $value (@values) {
-    $data->put_string($value);
-}
-
-$data->exit;
-$data->rewind;
-
-{
-    $data->next;
-    my ($described, $dtor, $type, @results) = qpid::proton::get_array_from($data);
-
-    ok($described, "Returned a described array");
-    ok($dtor eq $descriptor, "Returned the correct descriptor");
-    ok($type == qpid::proton::STRING, "Returned the correct array type");
-    ok(scalar(@results) == $length, "Returns the correct number of elements");
-
-    is_deeply([sort @results], [sort @values],
-              "Returned the correct set of values");
-}
-
-
-#=============================================================================
-# Can put a described array into a Data object.
-#=============================================================================
-$length = int(rand(256) + 64);
-$data = qpid::proton::Data->new;
-@values= random_integers($length);
-$descriptor = random_string(128);
-qpid::proton::put_array_into($data, qpid::proton::INT, \@values, 1, $descriptor);
-$data->rewind;
-
-{
-    $data->next;
-    my ($described, $dtor, $type, @results) = qpid::proton::get_array_from($data);
-
-    ok($described, "Put a described array");
-    ok($dtor eq $descriptor, "Put the correct descriptor");
-    ok($type == qpid::proton::INT, "Put the correct array type");
-    ok(scalar(@results) == $length, "Put the correct number of elements");
-
-    is_deeply([sort @results], [sort @values],
-              "Returned the correct set of values");
-}
-
-
-#=============================================================================
-# Raises an error when getting a list from a null Data instance
-#=============================================================================
-$data = qpid::proton::Data->new;
-dies_ok(sub {qpid::proton::get_list_from(undef);},
-        "Raises error when getting list from null Data object");
-
-
-#=============================================================================
-# Raises an error when the current node is not a list.
-#=============================================================================
-$data = qpid::proton::Data->new;
-$data->put_string(random_string(64));
-$data->rewind;
-$data->next;
-
-dies_ok(sub {qpid::proton::get_list_from($data);},
-        "Raises an error when getting a list and it's not currently a list.");
-
-
-#=============================================================================
-# Can get an array
-#=============================================================================
-$length = int(rand(256) + 64);
-$data = qpid::proton::Data->new;
-@values = random_strings($length);
-$data->put_list;
-$data->enter;
-foreach $value (@values) {
-    $data->put_string($value);
-}
-$data->exit;
-$data->rewind;
-
-{
-    my $result = $data->next;
-
-    my @results = qpid::proton::get_list_from($data);
-
-    ok(scalar(@results) == $length, "Returned the correct number of elements");
-
-    is_deeply([sort @results], [sort @values],
-              "Returned the correct list of values");
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/tests/data.t
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/tests/data.t b/proton-c/bindings/perl/tests/data.t
deleted file mode 100644
index 2bfdead..0000000
--- a/proton-c/bindings/perl/tests/data.t
+++ /dev/null
@@ -1,536 +0,0 @@
-#!/bin/env perl -w
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use Test::More qw(no_plan);
-use Test::Number::Delta within => 1e-3;
-use Test::Exception;
-
-require 'utils.pm';
-
-BEGIN {use_ok('qpid_proton');}
-require_ok('qpid_proton');
-
-my $data;
-my $value;
-
-# Create without capacity
-$data = qpid::proton::Data->new();
-isa_ok($data, 'qpid::proton::Data');
-
-# Create with capacity
-$data = qpid::proton::Data->new(24);
-isa_ok($data, 'qpid::proton::Data');
-
-# can put a null
-$data = qpid::proton::Data->new();
-$data->put_null();
-ok($data->is_null(), "Data can put a null");
-
-# raises an error on a null boolean
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_bool;}, "Cannot put a null bool");
-
-# can put a true boolean
-$data = qpid::proton::Data->new();
-$data->put_bool(1);
-ok($data->get_bool(), "Data can put a true bool");
-
-# can put a false boolean
-$data = qpid::proton::Data->new();
-$data->put_bool(0);
-ok(!$data->get_bool(), "Data can put a false bool");
-
-# raises an error on a negative ubyte
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_ubyte(0 - (rand(2**7) + 1));},
-        "Cannot have a negative ubyte");
-
-# raises an error on a null ubyte
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_ubyte;}, "Cannot put a null ubyte");
-
-# can put a zero ubyte
-$data = qpid::proton::Data->new();
-$data->put_ubyte(0);
-ok($data->get_ubyte() == 0, "Can put a zero ubyte");
-
-# will convert a float to an int ubyte
-$data = qpid::proton::Data->new();
-$value = rand(2**7) + 1;
-$data->put_ubyte($value);
-ok ($data->get_ubyte() == int($value), "Can put a float ubyte");
-
-# can put a ubyte
-$data = qpid::proton::Data->new();
-$value = int(rand(2**7) + 1);
-$data->put_ubyte($value);
-ok($data->get_ubyte() == $value, "Can put a ubyte");
-
-# raises an error on a null byte
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_byte;}, "Cannot put a null byte");
-
-# can put a negative byte
-$data = qpid::proton::Data->new();
-$value = int(0 - (1 + rand(2**7)));
-$data->put_byte($value);
-ok($data->get_byte() == $value, "Can put a negative byte");
-
-# can put a zero byte
-$data = qpid::proton::Data->new();
-$data->put_byte(0);
-ok($data->get_byte() == 0, "Can put a zero byte");
-
-# can put a float as a byte
-$data = qpid::proton::Data->new();
-$value = rand(2**7) + 1;
-$data->put_byte($value);
-ok($data->get_byte() == int($value), "Can put a float as a byte");
-
-# can put a byte
-$data = qpid::proton::Data->new();
-$value = int(1 + rand(2**7));
-$data->put_byte($value);
-ok($data->get_byte() == $value, "Can put a byte");
-
-# raise an error on a null ushort
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_ushort;}, "Cannot put a null ushort");
-
-# raises an error on a negative ushort
-$data = qpid::proton::Data->new();
-$value = 0 - (1 + rand((2**15)));
-dies_ok(sub {$data->put_ushort($value);}, "Cannot put a negative ushort");
-
-# can put a zero ushort
-$data = qpid::proton::Data->new();
-$data->put_ushort(0);
-ok($data->get_ushort() == 0, "Can put a zero ushort");
-
-# can handle a float ushort value
-$data = qpid::proton::Data->new();
-$value = 1 + rand((2**15));
-$data->put_ushort($value);
-ok($data->get_ushort() == int($value), "Can put a float ushort");
-
-# can put a ushort
-$data = qpid::proton::Data->new();
-$value = int(1 + rand((2**15)));
-$data->put_ushort($value);
-ok($data->get_ushort() == $value, "Can put a ushort");
-
-# raises an error on a null short
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_short;}, "Cannot put a null short");
-
-# can put a negative short
-$data = qpid::proton::Data->new();
-$value = int(0 - (1 + rand((2**15))));
-$data->put_short($value);
-ok($data->get_short() == $value, "Can put a negative short");
-
-# can put a zero short
-$data = qpid::proton::Data->new();
-$data->put_short(0);
-ok($data->get_short() == 0, "Can put a zero short");
-
-# can put a float as a short
-$data = qpid::proton::Data->new();
-$value = 1 + rand(2**15);
-$data->put_short($value);
-ok($data->get_short() == int($value), "Can put a float as a short");
-
-# can put a short
-$data = qpid::proton::Data->new();
-$value = int(1 + rand(2**15));
-$data->put_short($value);
-ok($data->get_short() == $value, "Can put a short");
-
-# raises an error on a null uint
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_uint;}, "Cannot set a null uint");
-
-# raises an error on a negative uint
-$data = qpid::proton::Data->new();
-$value = 0 - (1 + rand(2**31));
-dies_ok(sub {$data->put_uint($value);}, "Cannot set a negative uint");
-
-# can put a zero uint
-$data = qpid::proton::Data->new();
-$data->put_uint(0);
-ok($data->get_uint() == 0, "Can put a zero uint");
-
-# can put a float as a uint
-$data = qpid::proton::Data->new();
-$value = 1 + rand(2**31);
-$data->put_uint($value);
-ok($data->get_uint() == int($value), "Can put a float as a uint");
-
-# can put a uint
-$data = qpid::proton::Data->new();
-$value = int(1 + rand(2**31));
-$data->put_uint($value);
-ok($data->get_uint() == $value, "Can put a uint");
-
-# raise an error on a null integer
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_int;}, "Cannot put a null int");
-
-# can put a negative integer
-$data = qpid::proton::Data->new();
-$value = int(0 - (1 + rand(2**31)));
-$data->put_int($value);
-ok($data->get_int() == $value, "Can put a negative int");
-
-# can put a zero integer
-$data = qpid::proton::Data->new();
-$data->put_int(0);
-ok($data->get_int() == 0, "Can put a zero int");
-
-# can put a float as an integer
-$data = qpid::proton::Data->new();
-$value = 1 + (rand(2**31));
-$data->put_int($value);
-ok($data->get_int() == int($value), "Can put a float as an int");
-
-# can put an integer
-$data = qpid::proton::Data->new();
-$value = int(1 + rand(2**31));
-$data->put_int($value);
-ok($data->get_int() == $value, "Can put an int");
-
-# raises an error on a null character
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_char;}, "Cannot put a null char");
-
-# can put a float as a char
-$data = qpid::proton::Data->new();
-$value = 1 + rand(255);
-$data->put_char($value);
-ok($data->get_char() == int($value), "Can put a float as a char");
-
-# can put a character
-$data = qpid::proton::Data->new();
-$value = int(1 + rand(255));
-$data->put_char($value);
-ok($data->get_char() == $value, "Can put a char");
-
-# raise an error on a null ulong
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_ulong;}, "Cannot put a null ulong");
-
-# raises an error on a negative ulong
-$data = qpid::proton::Data->new();
-$value = 0 - (1 + rand(2**63));
-dies_ok(sub {$data->put_ulong($value);}, "Cannot put a negative ulong");
-
-# can put a zero ulong
-$data = qpid::proton::Data->new();
-$data->put_ulong(0);
-ok($data->get_ulong() == 0, "Can put a zero ulong");
-
-# can put a float as a ulong
-$data = qpid::proton::Data->new();
-$value = 1 + rand(2**63);
-$data->put_ulong($value);
-ok($data->get_ulong() == int($value), "Can put a float as a ulong");
-
-# can put a ulong
-$data = qpid::proton::Data->new();
-$value = int(1 + rand(2**63));
-$data->put_ulong($value);
-ok($data->get_ulong() == $value, "Can put a ulong");
-
-# raises an error on a null long
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_long;}, "Cannot put a null long");
-
-# can put a negative long
-$data = qpid::proton::Data->new();
-$value = int(0 - (1 + rand(2**63)));
-$data->put_long($value);
-ok($data->get_long() == $value, "Can put a negative long");
-
-# can put a zero long
-$data = qpid::proton::Data->new();
-$data->put_long(0);
-ok($data->get_long() == 0, "Can put a zero long");
-
-# can put a float as a long
-$data = qpid::proton::Data->new();
-$value = 1 + rand(2**63);
-$data->put_long($value);
-ok($data->get_long() == int($value), "Can put a float as a long");
-
-# can put a long
-$data = qpid::proton::Data->new();
-$value = int(1 + rand(2**63));
-$data->put_long($value);
-ok($data->get_long() == $value, "Can put a long value");
-
-# raises an error on a null timestamp
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_timestamp;}, "Cannot put a null timestamp");
-
-# can put a negative timestamp
-$data = qpid::proton::Data->new();
-$value = int(0 - (1 + rand(2**32)));
-$data->put_timestamp($value);
-ok($data->get_timestamp() == $value, "Can put a negative timestamp");
-
-# can put a zero timestamp
-$data = qpid::proton::Data->new();
-$data->put_timestamp(0);
-ok($data->get_timestamp() == 0, "Can put a zero timestamp");
-
-# can put a float as a timestamp
-$data = qpid::proton::Data->new();
-$value = 1 + (rand(2**32));
-$data->put_timestamp($value);
-ok($data->get_timestamp() == int($value), "Can put a float as a timestamp");
-
-# can put a timestamp
-$data = qpid::proton::Data->new();
-$value = int(1 + rand(2**32));
-$data->put_timestamp($value);
-ok($data->get_timestamp() == $value, "Can put a timestamp");
-
-# raises an error on a null float
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_float;}, "Cannot put a null float");
-
-# can put a negative float
-$data = qpid::proton::Data->new();
-$value = 0 - (1 + rand(2**15));
-$data->put_float($value);
-delta_ok($data->get_float(), $value, "Can put a negative float");
-
-# can put a zero float
-$data = qpid::proton::Data->new();
-$data->put_float(0.0);
-delta_ok($data->get_float(), 0.0, "Can put a zero float");
-
-# can put a float
-$data = qpid::proton::Data->new();
-$value = 1.0 + rand(2**15);
-$data->put_float($value);
-delta_ok($data->get_float(), $value, "Can put a float");
-
-# raises an error on a null double
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_double;}, "Cannot set a null double");
-
-# can put a negative double
-$data = qpid::proton::Data->new();
-$value = 0 - (1 + rand(2**31));
-$data->put_double($value);
-delta_ok($data->get_double(), $value, "Can put a double value");
-
-# can put a zero double
-$data = qpid::proton::Data->new();
-$data->put_double(0.0);
-delta_ok($data->get_double(), 0.0, "Can put a zero double");
-
-# can put a double
-$data = qpid::proton::Data->new();
-$value = 1.0 + rand(2**15);
-$data->put_double($value);
-delta_ok($data->get_double(), $value, "Can put a double");
-
-# raises an error on a null decimal32
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_decimal32;}, "Cannot put a null decimal32");
-
-# can put a decimal32
-$data = qpid::proton::Data->new();
-$value = int(rand(2**32));
-$data->put_decimal32($value);
-ok($data->get_decimal32() == $value, "Can put a decimal32 value");
-
-# raises an error on a null decimal64
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_decimal64();}, "Cannot put a null decimal64");
-
-# can put a decimal64
-$data = qpid::proton::Data->new();
-$value = int(rand(2**64));
-$data->put_decimal64($value);
-ok($data->get_decimal64() == $value, "Can put a decimal64 value");
-
-# raises an error on a null decimal128
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_decimal128;}, "Cannot put a null decimal128");
-
-# can put a decimal128
-$data = qpid::proton::Data->new();
-$value = int(rand(2**31));
-$data->put_decimal128($value);
-ok($data->get_decimal128() == $value, "Can put a decimal128 value");
-
-# raises an error on a null UUID
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_uuid;}, "Cannot put a null UUID");
-
-# raises an error on a malformed UUID
-$data = qpid::proton::Data->new();
-$value = random_string(36);
-dies_ok(sub {$data->put_uuid($value);}, "Cannot put a malformed UUID");
-
-# can put a UUID
-$data = qpid::proton::Data->new();
-$data->put_uuid("fd0289a5-8eec-4a08-9283-81d02c9d2fff");
-ok($data->get_uuid() eq "fd0289a5-8eec-4a08-9283-81d02c9d2fff",
-   "Can store a string UUID");
-
-# cannot put a null binary
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_binary;}, "Cannot put a null binary");
-
-# can put an empty binary string
-$data = qpid::proton::Data->new();
-$data->put_binary("");
-ok($data->get_binary() eq "", "Can put an empty binary");
-
-# can put a binary
-$data = qpid::proton::Data->new();
-$value = random_string(128);
-$data->put_binary($value);
-ok($data->get_binary() eq $value, "Can put a binary value");
-
-# cannot put a null string
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_string;}, "Cannot put a null string");
-
-# can put an empty string
-$data = qpid::proton::Data->new();
-$data->put_string("");
-ok($data->get_string() eq "", "Can put an empty string");
-
-# can put a string
-$data = qpid::proton::Data->new();
-$value = random_string(128);
-$data->put_string($value);
-ok($data->get_string() eq $value, "Can put an arbitrary string");
-
-# cannot put a null symbol
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_symbol;}, "Cannot put a null symbol");
-
-# can put a symbol
-$data = qpid::proton::Data->new();
-$value = random_string(64);
-$data->put_symbol($value);
-ok($data->get_symbol eq $value, "Can put a symbol");
-
-# can hold a described value
-$data = qpid::proton::Data->new();
-$data->put_described;
-ok($data->is_described, "Can hold a described value");
-
-# can put an array with undef as described flag
-$data = qpid::proton::Data->new();
-my @values = map { rand } (1..100, );
-lives_ok(sub {$data->put_array(undef, qpid::proton::INT);},
-         "Array can have null for described flag");
-
-# arrays must have a specified type
-$data = qpid::proton::Data->new();
-dies_ok(sub {$data->put_array;},
-        "Array type cannot be null");
-
-# can put an array
-$data = qpid::proton::Data->new();
-@values = random_integers(100);
-$data->put_array(0, qpid::proton::INT);
-$data->enter;
-foreach $value (@values) {
-    $data->put_int($value);
-}
-$data->exit;
-
-@result = ();
-$data->enter;
-foreach $value (@values) {
-    $data->next;
-    push @result, $data->get_int;
-}
-$data->exit;
-is_deeply((\@result, \@values), "Array was populated correctly");
-
-# can put a described array
-$data = qpid::proton::Data->new();
-@values = random_integers(100);
-$data->put_array(1, qpid::proton::INT);
-$data->enter;
-foreach $value (@values) {
-    $data->put_int($value);
-}
-$data->exit;
-
-@result = ();
-$data->enter;
-foreach $value (@values) {
-    $data->next;
-    push @result, $data->get_int;
-}
-is_deeply((\@result, \@values), "Array was populated correctly");
-
-# can put a list
-$data = qpid::proton::Data->new();
-@values = random_integers(100);
-$data->put_list;
-$data->enter;
-foreach $value (@values) {
-    $data->put_int($value);
-}
-$data->exit;
-
-@result = ();
-$data->enter;
-foreach $value (@values) {
-    $data->next;
-    push @result, $data->get_int;
-}
-$data->exit;
-is_deeply((\@result, \@values), "List was populated correctly");
-
-
-# can put a map
-$data = qpid::proton::Data->new();
-my $map = random_hash(100);
-$data->put_map;
-$data->enter;
-foreach my $key (keys %{$map}) {
-    $data->put_string($key);
-    $data->put_string($map->{$key});
-}
-$data->exit;
-
-my $result = {};
-$data->enter;
-foreach my $key (keys %{$map}) {
-    $data->next;
-    my $rkey = $data->get_string;
-    $data->next;
-    my $rval = $data->get_string;
-    $result{$rkey} = $rval;
-}
-$data->exit;
-ok(eq_hash(\%result, \%{$map}), "Map was populated correctly");

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/tests/hash_helper.t
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/tests/hash_helper.t b/proton-c/bindings/perl/tests/hash_helper.t
deleted file mode 100644
index 45277a6..0000000
--- a/proton-c/bindings/perl/tests/hash_helper.t
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/env perl -w
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use Test::More qw(no_plan);
-use Test::Exception;
-
-require 'utils.pm';
-
-BEGIN {use_ok('qpid_proton');}
-require_ok('qpid_proton');
-
-my $data;
-my $hash;
-my $result;
-
-#=============================================================================
-# raises an error when getting a hash from a null data object
-#=============================================================================
-dies_ok(sub {qpid::proton::get_map_from(undef);},
-        "Raises an error when getting a hash from a null data object");
-
-
-#=============================================================================
-# raises an error if the current node is not a map
-#=============================================================================
-$data = qpid::proton::Data->new;
-$data->put_string(random_string(16));
-$data->rewind;
-$data->next;
-
-dies_ok(sub {qpid::proton::get_map_from($data);},
-        "Raises an error if the current node is not a map");
-
-
-#=============================================================================
-# returns a hash from a Data object
-#=============================================================================
-$data = qpid::proton::Data->new;
-$hash = random_hash(rand(128) + 64);
-$data->put_map;
-$data->enter;
-foreach my $key (keys \%{$hash}) {
-    $data->put_string($key);
-    $data->put_string($hash->{$key});
-}
-$data->exit;
-$data->rewind;
-$data->next;
-
-{
-    $result = qpid::proton::get_map_from($data);
-
-    ok(defined($result), "Getting a hash returns a value");
-    ok(scalar(keys %{$result}) == scalar(keys %{$hash}),
-       "Returned the same number of keys");
-    is_deeply(\%{$result}, \%{$hash}, "Returned the same hash values");
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/tests/message.t
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/tests/message.t b/proton-c/bindings/perl/tests/message.t
deleted file mode 100644
index d907207..0000000
--- a/proton-c/bindings/perl/tests/message.t
+++ /dev/null
@@ -1,254 +0,0 @@
-#!/usr/bin/env perl -w
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use Test::More qw(no_plan);
-use Test::Exception;
-
-require 'utils.pm';
-
-BEGIN {use_ok('qpid_proton');}
-require_ok('qpid_proton');
-
-# Create a new message.
-my $message = qpid::proton::Message->new();
-isa_ok($message, 'qpid::proton::Message');
-
-# Verify the message mutators.
-
-# durable
-$message->set_durable(1);
-ok($message->get_durable(), 'Durable can be set');
-$message->set_durable(0);
-ok(!$message->get_durable(), 'Durable can be unset');
-
-# priority
-my $priority = int(rand(256) + 1);
-
-dies_ok(sub {$message->set_priority('abc')}, 'Priority must be numeric');
-dies_ok(sub {$message->set_priority(0 - $priority)}, 'Priority cannot be negative');
-
-$message->set_priority(0);
-ok($message->get_priority() == 0, 'Priority can be zero');
-$message->set_priority($priority);
-ok($message->get_priority() == $priority, 'Priority can be positive');
-
-# Time to live
-my $ttl = int(rand(65535) + 1);
-
-dies_ok(sub {$message->set_ttl('def')}, 'TTL must be numeric');
-dies_ok(sub {$message->set_ttl(0 - $ttl)}, 'TTL cannot be negative');
-
-$message->set_ttl(0);
-ok($message->get_ttl() == 0, 'TTL can be zero');
-$message->set_ttl($ttl);
-ok($message->get_ttl() == $ttl, 'TTL can be positive');
-
-# first acquirer
-$message->set_first_acquirer(1);
-ok($message->get_first_acquirer(), 'First acquirer can be set');
-$message->set_first_acquirer(0);
-ok(!$message->get_first_acquirer(), 'First acquirer can be unset');
-
-# delivery count
-my $delivery_count = int(rand(65535) + 1);
-
-dies_ok(sub {$message->set_delivery_count("abc");},
-         'Messages cannot have non-numeric delivery counts');
-dies_ok(sub {$message->set_delivery_count(0 - $delivery_count)},
-         'Messages cannot have negative delivery counts');
-$message->set_delivery_count(0);
-ok($message->get_delivery_count() == 0, 'Delivery count can be zero');
-$message->set_delivery_count($delivery_count);
-ok ($message->get_delivery_count() == $delivery_count, 'Delivery count can be positive');
-
-# message id
-my $message_id = random_string(16);
-
-dies_ok (sub {$message->set_id(undef);},
-         'Message id cannot be null');
-$message->set_id($message_id);
-ok($message->get_id(), 'Message id was set');
-ok($message->get_id() eq $message_id, 'Message id was set correctly');
-
-# user id
-my $user_id = random_string(16);
-
-dies_ok (sub {$message->set_user_id(undef);},
-         'User id cannot be null');
-$message->set_user_id($user_id);
-ok($message->get_user_id(), 'User id was set');
-ok($message->get_user_id() eq $user_id, 'User id was set correctly');
-
-# address
-my $address = "amqp://0.0.0.0";
-
-$message->set_address(undef);
-ok(!$message->get_address(), 'Address can be null');
-
-$message->set_address($address);
-ok($message->get_address() eq $address, 'Address is set correctly');
-
-# subject
-my $subject = random_string(25);
-
-$message->set_subject(undef);
-ok(!$message->get_subject(), 'Subject can be null');
-
-$message->set_subject($subject);
-ok($message->get_subject() eq $subject, 'Subject was set correctly');
-
-# reply to
-$reply_to = "amqp://0.0.0.0";
-
-$message->set_reply_to(undef);
-ok(!$message->get_reply_to(), "Reply to can be null");
-
-$message->set_reply_to($reply_to);
-ok($message->get_reply_to() eq $reply_to, 'Reply to was set correctly');
-
-# correlation id
-my $correlation_id = random_string(16);
-
-$message->set_correlation_id(undef);
-ok(!$message->get_correlation_id(), 'Correlation id can be null');
-
-$message->set_correlation_id($correlation_id);
-ok($message->get_correlation_id() eq $correlation_id,
-   'Correlation id was set correctly');
-
-# content type
-my $content_type = "text/" . random_string(12);
-
-$message->set_content_type(undef);
-ok(!$message->get_content_type(), 'Content type can be null');
-
-$message->set_content_type($content_type);
-ok($message->get_content_type() eq $content_type,
-   'Content type was set correctly');
-
-# content encoding
-my $content_encoding = random_string(16);
-
-$message->set_content_encoding(undef);
-ok(!$message->get_content_encoding(), 'Content encoding can be null');
-
-$message->set_content_encoding($content_encoding);
-ok($message->get_content_encoding() eq $content_encoding,
-   'Content encoding was set correctly');
-
-# expiry time
-my $expiry_time = random_timestamp();
-
-dies_ok(sub {$message->set_expiry_time(undef);},
-        'Expiry cannot be null');
-
-dies_ok(sub {$message->set_expiry_time(0 - $expiry_time);},
-        'Expiry cannot be negative');
-
-$message->set_expiry_time(0);
-ok($message->get_expiry_time() == 0,
-   'Expiry time can be zero');
-
-$message->set_expiry_time($expiry_time);
-ok($message->get_expiry_time() == int($expiry_time),
-   'Expiry time was set correctly');
-
-# creation time
-my $creation_time = random_timestamp();
-
-dies_ok(sub {$message->set_creation_time(undef);},
-        'Creation time cannot be null');
-
-dies_ok(sub {$message->set_creation_time(0 - $creation_time);},
-        'Creation time cannot be negative');
-
-$message->set_creation_time($creation_time);
-ok($message->get_creation_time() == $creation_time,
-   'Creation time was set correctly');
-
-# group id
-my $group_id = random_string(16);
-
-$message->set_group_id(undef);
-ok(!$message->get_group_id(), 'Group id can be null');
-
-$message->set_group_id($group_id);
-ok($message->get_group_id() eq $group_id,
-   'Group id was set correctly');
-
-# group sequence
-my $group_sequence = rand(2**31) + 1;
-
-dies_ok(sub {$message->set_group_sequence(undef);},
-        'Sequence id cannot be null');
-
-$message->set_group_sequence(0 - $group_sequence);
-ok($message->get_group_sequence() == int(0 - $group_sequence),
-   'Group sequence can be negative');
-
-$message->set_group_sequence(0);
-ok($message->get_group_sequence() == 0,
-   'Group sequence can be zero');
-
-$message->set_group_sequence($group_sequence);
-ok($message->get_group_sequence() == int($group_sequence),
-   'Group sequence can be positive');
-
-# reply to group id
-my $reply_to_group_id = random_string(16);
-
-$message->set_reply_to_group_id(undef);
-ok(!$message->get_reply_to_group_id(), 'Reply-to group id can be null');
-
-$message->set_reply_to_group_id($reply_to_group_id);
-ok($message->get_reply_to_group_id() eq $reply_to_group_id,
-   'Reply-to group id was set correctly');
-
-# format
-my @formats = ($qpid::proton::Message::DATA_FORMAT,
-               $qpid::proton::Message::TEXT_FORMAT,
-               $qpid::proton::Message::AMQP_FORMAT,
-               $qpid::proton::Message::JSON_FORMAT);
-
-dies_ok(sub {$message->set_format(undef);}, 'Format cannot be null');
-
-foreach (@formats)
-{
-    my $format = $_;
-
-    $message->set_format($format);
-    ok($message->get_format() == $format,
-       'Format was set correctly');
-}
-
-# reset the format
-$message->set_format($qpid::proton::Message::TEXT_FORMAT);
-
-# content
-my $content_size = rand(512);
-my $content = random_string($content_size);
-
-$message->set_content(undef);
-ok(!$message->get_content(), 'Content can be null');
-
-$message->set_content($content);
-ok($message->get_content() eq $content,
-   'Content was saved correctly');
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/tests/messenger.t
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/tests/messenger.t b/proton-c/bindings/perl/tests/messenger.t
deleted file mode 100644
index 7c3ca21..0000000
--- a/proton-c/bindings/perl/tests/messenger.t
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env perl -w
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use Test::More qw(no_plan);
-use Test::Exception;
-
-require 'utils.pm';
-
-BEGIN {use_ok('qpid_proton');}
-require_ok('qpid_proton');
-
-# Create a new message.
-my $messenger = qpid::proton::Messenger->new();
-isa_ok($messenger, 'qpid::proton::Messenger');
-
-# name
-ok($messenger->get_name(), 'Messenger has a default name');
-
-{
-    my $name = random_string(16);
-    my $messenger1 = qpid::proton::Messenger->new($name);
-
-    ok($messenger1->get_name() eq $name, 'Messenger saves name correctly');
-}
-
-# certificate
-my $certificate = random_string(255);
-
-$messenger->set_certificate(undef);
-ok(!$messenger->get_certificate(), 'Certificate can be null');
-
-$messenger->set_certificate($certificate);
-ok($messenger->get_certificate() eq $certificate,
-   'Certificate was set correctly');
-
-# private key
-my $key = random_string(255);
-
-$messenger->set_private_key(undef);
-ok(!$messenger->get_private_key(), 'Private key can be null');
-
-$messenger->set_private_key($key);
-ok($messenger->get_private_key() eq $key, 'Private key was set correctly');
-
-# password
-my $password = random_string(64);
-
-$messenger->set_password(undef);
-ok(!$messenger->get_password(), 'Password can be null');
-
-$messenger->set_password($password);
-ok($messenger->get_password() eq $password, 'Password set correctly');
-
-# trusted certificates
-my $trusted_certificate = random_string(255);
-
-$messenger->set_trusted_certificates(undef);
-ok(!$messenger->get_trusted_certificates(), 'Trusted certificates can be null');
-
-$messenger->set_trusted_certificates($trusted_certificate);
-ok($messenger->get_trusted_certificates() eq $trusted_certificate,
-   'Trusted certificates was set correctly');
-
-# timeout
-my $timeout = rand(2**31) + 1;
-
-$messenger->set_timeout(undef);
-ok($messenger->get_timeout() == 0, 'Null timeout is treated as 0');
-
-$messenger->set_timeout(0 - $timeout);
-ok($messenger->get_timeout() == int(0 - $timeout), 'Timeout can be negative');
-
-$messenger->set_timeout(0);
-ok($messenger->get_timeout() == 0, 'Timeout can be zero');
-
-$messenger->set_timeout($timeout);
-ok($messenger->get_timeout() == int($timeout), 'Timeout can be positive');
-
-# outgoing window
-my $outgoing_window = rand(2**9);
-
-$messenger->set_outgoing_window(undef);
-ok($messenger->get_outgoing_window() == 0, 'Null outgoing window is treated as zero');
-
-$messenger->set_outgoing_window(0);
-ok($messenger->get_outgoing_window() == 0, 'Outgoing window can be zero');
-
-$messenger->set_outgoing_window(0 - $outgoing_window);
-ok($messenger->get_outgoing_window() == int(0 - $outgoing_window),
-   'Outgoing window can be negative');
-
-$messenger->set_outgoing_window($outgoing_window);
-ok($messenger->get_outgoing_window() == int($outgoing_window),
-   'Outgoing window can be positive');
-
-# incoming window
-my $incoming_window = rand(2**9);
-
-$messenger->set_incoming_window(undef);
-ok($messenger->get_incoming_window() == 0, 'Null incoming window is treated as zero');
-
-$messenger->set_incoming_window(0);
-ok($messenger->get_incoming_window() == 0, 'Incoming window can be zero');
-
-$messenger->set_incoming_window(0 - $incoming_window);
-ok($messenger->get_incoming_window() == int(0 - $incoming_window),
-   'Incoming window can be negative');
-
-$messenger->set_incoming_window($incoming_window);
-ok($messenger->get_incoming_window() == int($incoming_window),
-   'Incoming window can be positive');
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/tests/utils.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/tests/utils.pm b/proton-c/bindings/perl/tests/utils.pm
deleted file mode 100644
index 3f36126..0000000
--- a/proton-c/bindings/perl/tests/utils.pm
+++ /dev/null
@@ -1,60 +0,0 @@
-sub random_integers
-{
-    my $len = shift;
-    my @result;
-
-    foreach (1..$len) {
-        my $value = int(rand(100));
-        push @result, $value;
-    }
-
-    return @result;
-}
-
-sub random_hash
-{
-    my $len = shift;
-    my %result;
-
-    foreach (1..$len) {
-        my $key = random_string(32);
-        my $val = random_string(128);
-        $result{$key} = $val;
-    }
-
-    return \%result;
-}
-
-sub random_string
-{
-    my $len=$_[0];
-
-    my @chars=('a'..'z','A'..'Z','0'..'9','_');
-    my $result;
-    foreach (1..$len) {
-        $result .= $chars[rand @chars];
-    }
-    return $result;
-}
-
-sub random_strings
-{
-    my $len = $_[0];
-    my @result = ();
-
-    foreach (1..$len) {
-        my $strlen = rand(64) + 32;
-        push(@result, random_string($strlen));
-    }
-
-    return @result;
-}
-
-sub random_timestamp
-{
-    my $result = rand(2**63) + 1;
-
-    return $result;
-}
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/.gitignore
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/.gitignore b/proton-c/bindings/php/.gitignore
deleted file mode 100644
index 59854a6..0000000
--- a/proton-c/bindings/php/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/php.ini

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/CMakeLists.txt b/proton-c/bindings/php/CMakeLists.txt
deleted file mode 100644
index 696dc38..0000000
--- a/proton-c/bindings/php/CMakeLists.txt
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-##------------------------------------------------------
-## Use Swig to generate a PHP binding to the Proton API
-##------------------------------------------------------
-
-# Uses the php-config command line tool from PHP to extract the location of the PHP header
-# files
-execute_process(COMMAND ${PHP_CONFIG_EXE} --includes
-                OUTPUT_VARIABLE PHP_INCLUDES
-                RESULT_VARIABLE retval
-                ERROR_VARIABLE  errmsg
-                OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/php.i PROPERTIES SWIG_FLAGS "-I${PROJECT_SOURCE_DIR}/include")
-list(APPEND SWIG_MODULE_cproton_EXTRA_DEPS
-    ${CMAKE_SOURCE_DIR}/proton-c/include/proton/cproton.i
-    ${PROTON_HEADERS}
-)
-swig_add_library(cproton LANGUAGE php SOURCES php.i)
-set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${PHP_INCLUDES}")
-swig_link_libraries(cproton ${BINDING_DEPS})
-# PHP modules must be linked with unresolved symbols as they are presumably satisfied only when loaded by php itself
-set_target_properties(cproton
-    PROPERTIES
-    PREFIX ""
-    LINK_FLAGS "${ALLOW_UNDEFINED}")
-
-if (CHECK_SYSINSTALL_PHP)
-  execute_process(COMMAND ${PHP_CONFIG_EXE} --extension-dir
-    OUTPUT_VARIABLE PHP_EXT_DIR_DEFAULT
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(COMMAND ${PHP_CONFIG_EXE} --prefix
-    OUTPUT_VARIABLE QPHP_PREFIX
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(COMMAND ${PHP_CONFIG_EXE} --config-options
-    OUTPUT_VARIABLE PHP_OPTS
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-  set(GET_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/get_include_dir.php)
-  execute_process(COMMAND ${PHP_EXE} -n ${GET_INCLUDE_DIR} ${QPHP_PREFIX}
-    OUTPUT_VARIABLE PHP_INCLUDE_DIR_DEFAULT
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-  if ("${PHP_INCLUDE_DIR_DEFAULT}" STREQUAL "")
-    set(PHP_INCLUDE_DIR_DEFAULT "/usr/share/php")
-  endif()
-
-  string(REGEX MATCH "--with-config-file-scan-dir=([^ ]*)" PHP_OPT_MATCH ${PHP_OPTS})
-  set (PHP_INI_DIR_DEFAULT ${CMAKE_MATCH_1})
-
-  if ("${PHP_INI_DIR_DEFAULT}" STREQUAL "")
-    set(PHP_INI_DIR_DEFAULT "/etc/php.d")
-  endif()
-else (CHECK_SYSINSTALL_PHP)
-  set (PHP_EXT_DIR_DEFAULT ${BINDINGS_DIR}/php)
-  set (PHP_INI_DIR_DEFAULT ${BINDINGS_DIR}/php)
-  set (PHP_INCLUDE_DIR_DEFAULT ${BINDINGS_DIR}/php)
-endif (CHECK_SYSINSTALL_PHP)
-
-# PHP extensions directory
-if (NOT PHP_EXT_DIR)
-  set (PHP_EXT_DIR ${PHP_EXT_DIR_DEFAULT})
-endif()
-# PHP ini directory
-if (NOT PHP_INI_DIR)
-  set (PHP_INI_DIR ${PHP_INI_DIR_DEFAULT})
-endif()
-# PHP include directory
-if (NOT PHP_INCLUDE_DIR)
-  set (PHP_INCLUDE_DIR ${PHP_INCLUDE_DIR_DEFAULT})
-endif()
-
-if (CHECK_SYSINSTALL_PHP)
-  set (PROTON_INI "extension=cproton.so")
-else ()
-  pn_absolute_install_dir(PHP_INCLUDE_PATH ${PHP_INCLUDE_DIR} ${CMAKE_INSTALL_PREFIX})
-  pn_absolute_install_dir(PHP_EXTENSION_LIB ${PHP_EXT_DIR}/cproton.so ${CMAKE_INSTALL_PREFIX})
-  set (PROTON_INI "include_path=${PHP_INCLUDE_PATH}\nextension=${PHP_EXTENSION_LIB}")
-endif()
-
-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/proton.ini.in
-                ${CMAKE_CURRENT_BINARY_DIR}/proton.ini
-                @ONLY)
-
-install(TARGETS cproton
-        DESTINATION ${PHP_EXT_DIR}
-        COMPONENT PHP)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.php
-        DESTINATION ${PHP_INCLUDE_DIR}
-        COMPONENT PHP)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/proton.php
-        DESTINATION ${PHP_INCLUDE_DIR}
-        COMPONENT PHP)
-
-if (NOT ${PHP_INI_DIR} STREQUAL "")
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/proton.ini
-    DESTINATION ${PHP_INI_DIR}
-    COMPONENT PHP)
-endif ()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/compat.swg
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/compat.swg b/proton-c/bindings/php/compat.swg
deleted file mode 100644
index d7ffce0..0000000
--- a/proton-c/bindings/php/compat.swg
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-%define CONVERT_LONG_LONG_IN(lvar,t,invar)
-  switch ((*(invar))->type) {
-      case IS_DOUBLE:
-          lvar = (t) (*(invar))->value.dval;
-          break;
-      case IS_STRING: {
-          char * endptr;
-          errno = 0;
-          lvar = (t) strtoll((*(invar))->value.str.val, &endptr, 10);
-          if (*endptr && !errno) break;
-          /* FALL THRU */
-      }
-      default:
-          convert_to_long_ex(invar);
-          lvar = (t) (*(invar))->value.lval;
-  }
-%enddef
-
-%pass_by_val(long long, CONVERT_LONG_LONG_IN);
-
-%typemap(out) long long
-%{
-  if ((long long)LONG_MIN <= $1 && $1 <= (long long)LONG_MAX) {
-    return_value->value.lval = (long)($1);
-    return_value->type = IS_LONG;
-  } else {
-    char temp[256];
-    sprintf(temp, "%lld", (long long)$1);
-    ZVAL_STRING(return_value, temp, 1);
-  }
-%}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/cproton.ini
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/cproton.ini b/proton-c/bindings/php/cproton.ini
deleted file mode 100644
index dab3941..0000000
--- a/proton-c/bindings/php/cproton.ini
+++ /dev/null
@@ -1,21 +0,0 @@
-;;
-; Licensed to the Apache Software Foundation (ASF) under one
-; or more contributor license agreements.  See the NOTICE file
-; distributed with this work for additional information
-; regarding copyright ownership.  The ASF licenses this file
-; to you under the Apache License, Version 2.0 (the
-; "License"); you may not use this file except in compliance
-; with the License.  You may obtain a copy of the License at
-;
-;   http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing,
-; software distributed under the License is distributed on an
-; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-; KIND, either express or implied.  See the License for the
-; specific language governing permissions and limitations
-; under the License.
-;;
-
-; Enable cproton extension module
-extension=cproton.so


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[6/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Posted by jr...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/message.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/message.js b/proton-c/bindings/javascript/message.js
deleted file mode 100644
index 3ca9598..0000000
--- a/proton-c/bindings/javascript/message.js
+++ /dev/null
@@ -1,840 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                                  Message                                  */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Constructs a proton.Message instance.
- * @classdesc This class is a mutable holder of message content that may be used
- * to generate and encode or decode and access AMQP formatted message data.
- * @constructor proton.Message
- * @property {object} instructions delivery instructions for the message.
- * @property {object} annotations infrastructure defined message annotations.
- * @property {object} properties application defined message properties.
- * @property {object} body message body as a native JavaScript Object.
- * @property {object} data message body as a proton.Data Object.
- */
-Module['Message'] = function() { // Message Constructor.
-    this._message = _pn_message();
-    this._id = new Data(_pn_message_id(this._message));
-    this._correlationId = new Data(_pn_message_correlation_id(this._message));
-
-    // ************************* Public properties ****************************
-
-    // Initialize with an empty Object so we can set properties in a natural way.
-    // message.properties.prop1 = "foo";
-    // message.properties.prop2 = "bar";
-    this['properties'] = {};
-
-    /**
-    // The properties may be used, but are initially undefined.
-    this['instructions'];
-    this['annotations'];
-    this['body'];
-    this['data'];
-     */
-};
-
-// Expose constructor as package scope variable to make internal calls less verbose.
-var Message = Module['Message'];
-
-// Expose prototype as a variable to make method declarations less verbose.
-var _Message_ = Message.prototype;
-
-// ************************** Class properties ********************************
-
-Message['DEFAULT_PRIORITY'] = 4; /** Default priority for messages.*/
-
-// ************************* Protected methods ********************************
-
-// We use the dot notation rather than associative array form for protected
-// methods so they are visible to this "package", but the Closure compiler will
-// minify and obfuscate names, effectively making a de facto "protected" method.
-
-/**
- * This helper method checks the supplied error code, converts it into an
- * exception and throws the exception. This method will try to use the message
- * populated in pn_message_error(), if present, but if not it will fall
- * back to using the basic error code rendering from pn_code().
- * @param code the error code to check.
- */
-_Message_._check = function(code) {
-    if (code < 0) {
-        var errno = this['getErrno']();
-        var message = errno ? this['getError']() : Pointer_stringify(_pn_code(code));
-
-        throw new Module['MessageError'](message);
-    } else {
-        return code;
-    }
-};
-
-/**
- * Encode the Message prior to sending on the wire.
- */
-_Message_._preEncode = function() {
-    // A Message Object may be reused so we create new Data instances and clear
-    // the state for them each time put() gets called.
-    var inst = new Data(_pn_message_instructions(this._message));
-    var ann = new Data(_pn_message_annotations(this._message));
-    var props = new Data(_pn_message_properties(this._message));
-    var body = new Data(_pn_message_body(this._message));
-
-    inst.clear();
-    if (this['instructions'] !== undefined) {
-        inst['putObject'](this['instructions']);
-    }
-
-    ann.clear();
-    if (this['annotations'] !== undefined) {
-        ann['putObject'](this['annotations']);
-    }
-
-    props.clear();
-    if (this['properties'] !== undefined) {
-        props['putObject'](this['properties']);
-    }
-
-    body.clear();
-    if (this['body'] !== undefined) {
-        var contentType = this['getContentType']();
-        if (contentType) {
-            var value = this['body'];
-            if (contentType === 'application/json' && JSON) { // Optionally encode body as JSON.
-                var json = JSON.stringify(value);
-                value = new Data['Binary'](json);
-            } else if (!(value instanceof Data['Binary'])) { // Construct a Binary from the body
-                value = new Data['Binary'](value);
-            }
-            // As content-type is set we send as an opaque AMQP data section.
-            this['setInferred'](true);
-            body['putBINARY'](value);
-        } else { // By default encode body using the native AMQP type system.
-            this['setInferred'](false);
-            body['putObject'](this['body']);
-        }
-    }
-};
-
-/**
- * Decode the Message after receiving off the wire.
- * @param {boolean} decodeBinaryAsString if set decode any AMQP Binary payload
- *        objects as strings. This can be useful as the data in Binary objects
- *        will be overwritten with subsequent calls to get, so they must be
- *        explicitly copied. Needless to say it is only safe to set this flag if
- *        you know that the data you are dealing with is actually a string, for
- *        example C/C++ applications often seem to encode strings as AMQP binary,
- *        a common cause of interoperability problems.
- */
-_Message_._postDecode = function(decodeBinaryAsString) {
-    var inst = new Data(_pn_message_instructions(this._message));
-    var ann = new Data(_pn_message_annotations(this._message));
-    var props = new Data(_pn_message_properties(this._message));
-    var body = new Data(_pn_message_body(this._message), decodeBinaryAsString);
-
-    if (inst.next()) {
-        this['instructions'] = inst['getObject']();
-    } else {
-        delete this['instructions'];
-    }
-
-    if (ann.next()) {
-        this['annotations'] = ann['getObject']();
-    } else {
-        delete this['annotations'];
-    }
-
-    if (props.next()) {
-        this['properties'] = props['getObject']();
-    } else {
-        this['properties'] = {};
-    }
-
-    if (body.next()) {
-        this['data'] = body;
-        this['body'] = body['getObject']();
-        var contentType = this['getContentType']();
-        if (contentType) {
-            if (contentType === 'application/json' && JSON) {
-                var json = this['body'].toString(); // Convert Binary to String.
-                this['body'] = JSON.parse(json);
-            } else if (contentType.indexOf('text/') === 0) { // It's a text/* MIME type
-                this['body'] = this['body'].toString(); // Convert Binary to String.
-            }
-        }
-    } else {
-        // If no body is present ensure that the properties are undefined.
-        delete this['data'];
-        delete this['body'];
-    }
-};
-
-// *************************** Public methods *********************************
-
-/**
- * Free the Message.
- * <p>
- * N.B. This method has to be called explicitly in JavaScript as we can't
- * intercept finalizers, so we need to remember to free before removing refs.
- * @method free
- * @memberof! proton.Message#
- */
-_Message_['free'] = function() {
-    _pn_message_free(this._message);
-};
-
-/**
- * @method getErrno
- * @memberof! proton.Message#
- * @returns {number the most recent error message code.
- */
-_Message_['getErrno'] = function() {
-    return _pn_message_errno(this._message);
-};
-
-/**
- * @method getError
- * @memberof! proton.Message#
- * @returns {string} the most recent error message as a String.
- */
-_Message_['getError'] = function() {
-    return Pointer_stringify(_pn_error_text(_pn_message_error(this._message)));
-};
-
-/**
- * Clears the contents of the Message. All fields will be reset to their default values.
- * @method clear
- * @memberof! proton.Message#
- */
-_Message_['clear'] = function() {
-    _pn_message_clear(this._message);
-    this['properties'] = {};
-    delete this['instructions'];
-    delete this['annotations'];
-    delete this['body'];
-    delete this['data'];
-};
-
-/**
- * Get the inferred flag for a message.
- * <p>
- * The inferred flag for a message indicates how the message content
- * is encoded into AMQP sections. If inferred is true then binary and
- * list values in the body of the message will be encoded as AMQP DATA
- * and AMQP SEQUENCE sections, respectively. If inferred is false,
- * then all values in the body of the message will be encoded as AMQP
- * VALUE sections regardless of their type. Use
- * {@link proton.Message.setInferred} to set the value.
- * @method isInferred
- * @memberof! proton.Message#
- * @returns {boolean} true iff the inferred flag for the message is set.
- */
-_Message_['isInferred'] = function() {
-    return (_pn_message_is_inferred(this._message) > 0);
-};
-
-/**
- * Set the inferred flag for a message. See {@link proton.Message.isInferred} 
- * for a description of what the inferred flag is.
- * @method setInferred
- * @memberof! proton.Message#
- * @param {boolean} inferred the new value of the inferred flag.
- */
-_Message_['setInferred'] = function(inferred) {
-    this._check(_pn_message_set_inferred(this._message, inferred));
-};
-
-/**
- * Get the durable flag for a message.
- * <p>
- * The durable flag indicates that any parties taking responsibility
- * for the message must durably store the content. Use
- * {@link proton.Message.setDurable} to set the value.
- * @method isDurable
- * @memberof! proton.Message#
- * @returns {boolean} true iff the durable flag for the message is set.
- */
-_Message_['isDurable'] = function() {
-    return (_pn_message_is_durable(this._message) > 0);
-};
-
-/**
- * Set the durable flag for a message. See {@link proton.Message.isDurable} 
- * for a description of what the durable flag is.
- * @method setDurable
- * @memberof! proton.Message#
- * @param {boolean} durable the new value of the durable flag.
- */
-_Message_['setDurable'] = function(durable) {
-    this._check(_pn_message_set_durable(this._message, durable));
-};
-
-/**
- * Get the priority for a message.
- * <p>
- * The priority of a message impacts ordering guarantees. Within a
- * given ordered context, higher priority messages may jump ahead of
- * lower priority messages. Priority range is 0..255
- * @method getPriority
- * @memberof! proton.Message#
- * @returns {number} the priority of the Message.
- */
-_Message_['getPriority'] = function() {
-    return _pn_message_get_priority(this._message) & 0xFF; // & 0xFF converts to unsigned.
-};
-
-/**
- * Set the priority of the Message. See {@link proton.Message.getPriority}
- * for details on message priority.
- * @method setPriority
- * @memberof! proton.Message#
- * @param {number} priority the address we want to send the Message to.
- */
-_Message_['setPriority'] = function(priority) {
-    this._check(_pn_message_set_priority(this._message, priority));
-};
-
-/**
- * Get the ttl for a message.
- * <p>
- * The ttl for a message determines how long a message is considered
- * live. When a message is held for retransmit, the ttl is
- * decremented. Once the ttl reaches zero, the message is considered
- * dead. Once a message is considered dead it may be dropped. Use
- * {@link proton.Message.setTTL} to set the ttl for a message.
- * @method getTTL
- * @memberof! proton.Message#
- * @returns {number} the ttl in milliseconds.
- */
-_Message_['getTTL'] = function() {
-    return _pn_message_get_ttl(this._message);
-};
-
-/**
- * Set the ttl for a message. See {@link proton.Message.getTTL}
- * for a detailed description of message ttl.
- * @method setTTL
- * @memberof! proton.Message#
- * @param {number} ttl the new value for the message ttl in milliseconds.
- */
-_Message_['setTTL'] = function(ttl) {
-    this._check(_pn_message_set_ttl(this._message, ttl));
-};
-
-/**
- * Get the first acquirer flag for a message.
- * <p>
- * When set to true, the first acquirer flag for a message indicates
- * that the recipient of the message is the first recipient to acquire
- * the message, i.e. there have been no failed delivery attempts to
- * other acquirers. Note that this does not mean the message has not
- * been delivered to, but not acquired, by other recipients.
- * @method isFirstAcquirer
- * @memberof! proton.Message#
- * @returns {boolean} true iff the first acquirer flag for the message is set.
- */
-_Message_['isFirstAcquirer'] = function() {
-    return (_pn_message_is_first_acquirer(this._message) > 0);
-};
-
-/**
- * Set the first acquirer flag for a message. See {@link proton.Message.isFirstAcquirer} 
- * for details on the first acquirer flag.
- * @method setFirstAcquirer
- * @memberof! proton.Message#
- * @param {boolean} first the new value of the first acquirer flag.
- */
-_Message_['setFirstAcquirer'] = function(first) {
-    this._check(_pn_message_set_first_acquirer(this._message, first));
-};
-
-/**
- * Get the delivery count for a message.
- * <p>
- * The delivery count field tracks how many attempts have been made to
- * deliver a message. Use {@link proton.Message.setDeliveryCount} to set
- * the delivery count for a message.
- * @method getDeliveryCount
- * @memberof! proton.Message#
- * @returns {number} the delivery count for the message.
- */
-_Message_['getDeliveryCount'] = function() {
-    return _pn_message_get_delivery_count(this._message);
-};
-
-/**
- * Set the delivery count for a message. See {@link proton.Message.getDeliveryCount}
- * for details on what the delivery count means.
- * @method setDeliveryCount
- * @memberof! proton.Message#
- * @param {number} count the new delivery count.
- */
-_Message_['setDeliveryCount'] = function(count) {
-    this._check(_pn_message_set_delivery_count(this._message, count));
-};
-
-/**
- * Get the id for a message.
- * <p>
- * The message id provides a globally unique identifier for a message.
- * A message id can be an a string, an unsigned long, a uuid or a binary value.
- * @method getID
- * @memberof! proton.Message#
- * @returns {(number|string|proton.Data.Long|proton.Data.Uuid|proton.Data.Binary)} the message id.
- */
-_Message_['getID'] = function() {
-    return this._id['getObject']();
-};
-
-/**
- * Set the id for a message. See {@link proton.Message.getID}
- * for more details on the meaning of the message id. Note that only string,
- * unsigned long, uuid, or binary values are permitted.
- * @method setID
- * @memberof! proton.Message#
- * @param {(number|string|proton.Data.Long|proton.Data.Uuid|proton.Data.Binary)} id the
- *        new value of the message id.
- */
-_Message_['setID'] = function(id) {
-    this._id['rewind']();
-    if (Data.isNumber(id)) {
-        this._id['putULONG'](id);
-    } else {
-        this._id['putObject'](id);
-    }
-};
-
-/**
- * Get the user id of the message creator.
- * <p>
- * The underlying raw data of the returned {@link proton.Data.Binary} will be
- * valid until any one of the following operations occur:
- * <pre>
- *  - {@link proton.Message.free}
- *  - {@link proton.Message.clear}
- *  - {@link proton.Message.setUserID}
- * </pre>
- * @method getUserID
- * @memberof! proton.Message#
- * @returns {proton.Data.Binary} the message's user id.
- */
-_Message_['getUserID'] = function() {
-    var sp = Runtime.stackSave();
-    // The implementation here is a bit "quirky" due to some low-level details
-    // of the interaction between emscripten and LLVM and the use of pn_bytes.
-    // The JavaScript code below is basically a binding to:
-    //
-    // pn_bytes_t bytes = pn_message_get_user_id(message);
-
-    // Here's the quirky bit, pn_message_get_user_id actually returns pn_bytes_t 
-    // *by value* but the low-level code handles this *by pointer* so we first
-    // need to allocate 8 bytes storage for {size, start} on the emscripten stack
-    // and then we pass the pointer to that storage as the first parameter to the
-    // compiled pn_message_get_user_id.
-    var bytes = allocate(8, 'i8', ALLOC_STACK);
-    _pn_message_get_user_id(bytes, this._message);
-
-    // The bytes variable is really of type pn_bytes_t* so we use emscripten's
-    // getValue() call to retrieve the size and then the start pointer.
-    var size  = getValue(bytes, 'i32');
-    var start = getValue(bytes + 4, '*');
-
-    // Create a proton.Data.Binary from the pn_bytes_t information.
-    var binary = new Data['Binary'](size, start);
-
-    // Tidy up the memory that we allocated on emscripten's stack.
-    Runtime.stackRestore(sp);
-
-    return binary;
-};
-
-/**
- * Set the user id for a message. This method takes a {@link proton.Data.Binary}
- * consuming the underlying raw data in the process. For convenience this method
- * also accepts a {@link proton.Data.Uuid}, number or string, converting them to a
- * Binary internally. N.B. getUserID always returns a {@link proton.Data.Binary}
- * even if a string or {@link proton.Data.Uuid} has been passed to setUserID.
- * @method setUserID
- * @memberof! proton.Message#
- * @param {(string|proton.Data.Uuid)} id the new user id for the message.
- */
-_Message_['setUserID'] = function(id) {
-    // If the id parameter is a proton.Data.Binary use it otherwise create a Binary
-    // using the string form of the parameter that was passed.
-    id = (id instanceof Data['Binary']) ? id : new Data['Binary']('' + id);
-
-    var sp = Runtime.stackSave();
-    // The implementation here is a bit "quirky" due to some low-level details
-    // of the interaction between emscripten and LLVM and the use of pn_bytes.
-    // The JavaScript code below is basically a binding to:
-    //
-    // pn_message_set_user_id(message, pn_bytes(id.size, id.start));
-
-    // Here's the quirky bit, pn_bytes actually returns pn_bytes_t *by value* but
-    // the low-level code handles this *by pointer* so we first need to allocate
-    // 8 bytes storage for {size, start} on the emscripten stack and then we
-    // pass the pointer to that storage as the first parameter to the pn_bytes.
-    var bytes = allocate(8, 'i8', ALLOC_STACK);
-    _pn_bytes(bytes, id.size, id.start);
-
-    // The compiled pn_message_set_user_id takes the pn_bytes_t by reference not value.
-    this._check(_pn_message_set_user_id(this._message, bytes));
-
-    // After calling _pn_message_set_user_id the underlying Message object "owns" the
-    // binary data, so we can call free on the proton.Data.Binary instance to
-    // release any storage it has acquired back to the emscripten heap.
-    id['free']();
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Get the address for a message.
- * @method getAddress
- * @memberof! proton.Message#
- * @returns {string} the address of the Message.
- */
-_Message_['getAddress'] = function() {
-    return Pointer_stringify(_pn_message_get_address(this._message));
-};
-
-/**
- * Set the address of the Message.
- * @method setAddress
- * @memberof! proton.Message#
- * @param {string} address the address we want to send the Message to.
- */
-_Message_['setAddress'] = function(address) {
-    var sp = Runtime.stackSave();
-    this._check(_pn_message_set_address(this._message, allocate(intArrayFromString(address), 'i8', ALLOC_STACK)));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Get the subject for a message.
- * @method getSubject
- * @memberof! proton.Message#
- * @returns {string} the subject of the Message.
- */
-_Message_['getSubject'] = function() {
-    return Pointer_stringify(_pn_message_get_subject(this._message));
-};
-
-/**
- * Set the subject of the Message.
- * @method setSubject
- * @memberof! proton.Message#
- * @param {string} subject the subject we want to set for the Message.
- */
-_Message_['setSubject'] = function(subject) {
-    var sp = Runtime.stackSave();
-    this._check(_pn_message_set_subject(this._message, allocate(intArrayFromString(subject), 'i8', ALLOC_STACK)));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Get the reply to for a message.
- * @method getReplyTo
- * @memberof! proton.Message#
- * @returns {string} the reply to of the Message.
- */
-_Message_['getReplyTo'] = function() {
-    return Pointer_stringify(_pn_message_get_reply_to(this._message));
-};
-
-/**
- * Set the reply to for a message.
- * @method setReplyTo
- * @memberof! proton.Message#
- * @param {string} reply the reply to we want to set for the Message.
- */
-_Message_['setReplyTo'] = function(reply) {
-    var sp = Runtime.stackSave();
-    this._check(_pn_message_set_reply_to(this._message, allocate(intArrayFromString(reply), 'i8', ALLOC_STACK)));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Get the correlation id for a message.
- * <p>
- * A correlation id can be an a string, an unsigned long, a uuid or a binary value.
- * @method getCorrelationID
- * @memberof! proton.Message#
- * @returns {(number|string|proton.Data.Long|proton.Data.Uuid|proton.Data.Binary)} the message id.
- */
-_Message_['getCorrelationID'] = function() {
-    return this._correlationId['getObject']();
-};
-
-/**
- * Set the correlation id for a message. See {@link proton.Message.getCorrelationID}
- * for more details on the meaning of the correlation id. Note that only string,
- * unsigned long, uuid, or binary values are permitted.
- * @method setCorrelationID
- * @memberof! proton.Message#
- * @param {(number|string|proton.Data.Long|proton.Data.Uuid|proton.Data.Binary)} id the
- *        new value of the correlation id.
- */
-_Message_['setCorrelationID'] = function(id) {
-    this._correlationId['rewind']();
-    if (Data.isNumber(id)) {
-        this._correlationId['putULONG'](id);
-    } else {
-        this._correlationId['putObject'](id);
-    }
-};
-
-/**
- * Get the content type for a message.
- * @method getContentType
- * @memberof! proton.Message#
- * @returns {string} the content type of the Message.
- */
-_Message_['getContentType'] = function() {
-    return Pointer_stringify(_pn_message_get_content_type(this._message));
-};
-
-/**
- * Set the content type for a message.
- * @method setContentType
- * @memberof! proton.Message#
- * @param {string} type the content type we want to set for the Message.
- */
-_Message_['setContentType'] = function(type) {
-    var sp = Runtime.stackSave();
-    this._check(_pn_message_set_content_type(this._message, allocate(intArrayFromString(type), 'i8', ALLOC_STACK)));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Get the content encoding for a message.
- * @method getContentEncoding
- * @memberof! proton.Message#
- * @returns {string} the content encoding of the Message.
- */
-_Message_['getContentEncoding'] = function() {
-    return Pointer_stringify(_pn_message_get_content_encoding(this._message));
-};
-
-/**
- * Set the content encoding for a message.
- * @method setContentEncoding
- * @memberof! proton.Message#
- * @param {string} encoding the content encoding we want to set for the Message.
- */
-_Message_['setContentEncoding'] = function(encoding) {
-    var sp = Runtime.stackSave();
-    this._check(_pn_message_set_content_encoding(this._message, allocate(intArrayFromString(encoding), 'i8', ALLOC_STACK)));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Get the expiry time for a message.
- * A zero value for the expiry time indicates that the message will
- * never expire. This is the default value.
- * @method getExpiryTime
- * @memberof! proton.Message#
- * @returns {Date} the expiry time for the message.
- */
-_Message_['getExpiryTime'] = function() {
-    // Getting the timestamp is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to hold
-    // the 64 bit number and Data.Long.toNumber() to convert it back into a
-    // JavaScript number.
-    var low =  _pn_message_get_expiry_time(this._message);
-    var high = Runtime.getTempRet0();
-    var long = new Data.Long(low, high);
-    long = long.toNumber();
-    return new Date(long);
-};
-
-/**
- * Set the expiry time for a message.
- * @method setExpiryTime
- * @memberof! proton.Message#
- * @param {(number|Date)} time the new expiry time for the message.
- */
-_Message_['setExpiryTime'] = function(time) {
-    // Note that a timestamp is a 64 bit number so we have to use a proton.Data.Long.
-    var timestamp = Data.Long.fromNumber(time.valueOf());
-    this._check(_pn_message_set_expiry_time(this._message, timestamp.getLowBitsUnsigned(), timestamp.getHighBits()));
-};
-
-/**
- * Get the creation time for a message.
- * A zero value for the creation time indicates that the creation time
- * has not been set. This is the default value.
- * @method getCreationTime
- * @memberof! proton.Message#
- * @returns {Date} the creation time for the message.
- */
-_Message_['getCreationTime'] = function() {
-    // Getting the timestamp is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to hold
-    // the 64 bit number and Data.Long.toNumber() to convert it back into a
-    // JavaScript number.
-    var low =  _pn_message_get_creation_time(this._message);
-    var high = Runtime.getTempRet0();
-    var long = new Data.Long(low, high);
-    long = long.toNumber();
-    return new Date(long);
-};
-
-/**
- * Set the creation time for a message.
- * @method setCreationTime
- * @memberof! proton.Message#
- * @param {(number|Date)} time the new creation time for the message.
- */
-_Message_['setCreationTime'] = function(time) {
-    // Note that a timestamp is a 64 bit number so we have to use a proton.Data.Long.
-    var timestamp = Data.Long.fromNumber(time.valueOf());
-    this._check(_pn_message_set_creation_time(this._message, timestamp.getLowBitsUnsigned(), timestamp.getHighBits()));
-};
-
-/**
- * Get the group id for a message.
- * @method getGroupID
- * @memberof! proton.Message#
- * @returns {string} the group id of the Message.
- */
-_Message_['getGroupID'] = function() {
-    return Pointer_stringify(_pn_message_get_group_id(this._message));
-};
-
-/**
- * Set the group id for a message.
- * @method setGroupID
- * @memberof! proton.Message#
- * @param {string} id the group id we want to set for the Message.
- */
-_Message_['setGroupID'] = function(id) {
-    var sp = Runtime.stackSave();
-    this._check(_pn_message_set_group_id(this._message, allocate(intArrayFromString(id), 'i8', ALLOC_STACK)));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Get the group sequence for a message.
- * <p>
- * The group sequence of a message identifies the relative ordering of
- * messages within a group. The default value for the group sequence
- * of a message is zero.
- * @method getGroupSequence
- * @memberof! proton.Message#
- * @returns {number} the group sequence for the message.
- */
-_Message_['getGroupSequence'] = function() {
-    return _pn_message_get_group_sequence(this._message);
-};
-
-/**
- * Set the group sequence for a message. See {@link proton.Message.getGroupSequence}
- * for details on what the group sequence means.
- * @method setGroupSequence
- * @memberof! proton.Message#
- * @param {number} n the new group sequence for the message.
- */
-_Message_['setGroupSequence'] = function(n) {
-    this._check(_pn_message_set_group_sequence(this._message, n));
-};
-
-/**
- * Get the reply to group id for a message.
- * @method getReplyToGroupID
- * @memberof! proton.Message#
- * @returns {string} the reply to group id of the Message.
- */
-_Message_['getReplyToGroupID'] = function() {
-    return Pointer_stringify(_pn_message_get_reply_to_group_id(this._message));
-};
-
-/**
- * Set the reply to group id for a message.
- * @method setReplyToGroupID
- * @memberof! proton.Message#
- * @param {string} id the reply to group id we want to set for the Message.
- */
-_Message_['setReplyToGroupID'] = function(id) {
-    var sp = Runtime.stackSave();
-    this._check(_pn_message_set_reply_to_group_id(this._message, allocate(intArrayFromString(id), 'i8', ALLOC_STACK)));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Return a Binary representation of the message encoded in AMQP format. N.B. the
- * returned {@link proton.Data.Binary} "owns" the underlying raw data and is thus
- * responsible for freeing it or passing it to a method that consumes a Binary
- * such as {@link proton.Message.decode}.
- * @method encode
- * @memberof! proton.Message#
- * @returns {proton.Data.Binary} a representation of the message encoded in AMQP format.
- */
-_Message_['encode'] = function() {
-    this._preEncode();
-    var sp = Runtime.stackSave();
-    var sizeptr = allocate(4, 'i32', ALLOC_STACK);
-    var size = 1024;
-    while (true) {
-        setValue(sizeptr, size, 'i32'); // Set pass by reference variable.
-        var bytes = _malloc(size);   // Allocate storage from emscripten heap.
-        var err = _pn_message_encode(this._message, bytes, sizeptr);
-        var size = getValue(sizeptr, 'i32'); // Dereference the real size value;
-
-        if (err === Module['Error']['OVERFLOW']) {
-            _free(bytes);
-            size *= 2;
-        } else if (err >= 0) {
-            // Tidy up the memory that we allocated on emscripten's stack.
-            Runtime.stackRestore(sp);
-            return new Data['Binary'](size, bytes);
-        } else {
-            // Tidy up the memory that we allocated on emscripten's stack.
-            Runtime.stackRestore(sp);
-            _free(bytes);
-            this._check(err);
-            return;
-        }
-    }
-};
-
-/**
- * Decodes and loads the message content from supplied Binary AMQP data  N.B. 
- * this method "consumes" data from a {@link proton.Data.Binary} in other words
- * it takes responsibility for the underlying data and frees the raw data from
- * the Binary.
- * @method decode
- * @memberof! proton.Message#
- * @param {proton.Data.Binary} encoded the AMQP encoded binary message.
- */
-_Message_['decode'] = function(encoded) {
-    var err = _pn_message_decode(this._message, encoded.start, encoded.size);
-    encoded['free'](); // Free the original Binary.
-    if (err >= 0) {
-        this._postDecode();
-    }
-    this._check(err);
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/messenger.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/messenger.js b/proton-c/bindings/javascript/messenger.js
deleted file mode 100644
index 5f1df2e..0000000
--- a/proton-c/bindings/javascript/messenger.js
+++ /dev/null
@@ -1,822 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                                 Messenger                                 */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Constructs a proton.Messenger instance giving it an (optional) name. If name
- * is supplied that will be used as the name of the Messenger, otherwise a UUID
- * will be used. The Messenger is initialised to non-blocking mode as it makes
- * little sense to have blocking behaviour in a JavaScript implementation.
- * @classdesc The {@link proton.Messenger} class defines a high level interface for sending
- * and receiving {@link proton.Message}. Every {@link proton.Messenger} contains a
- * single logical queue of incoming messages and a single logical queue
- * of outgoing messages. These messages in these queues may be destined
- * for, or originate from, a variety of addresses.
- * <p>
- * The messenger interface is single-threaded.
- * <pre>
- * Address Syntax
- * ==============
- * </pre>
- * An address has the following form:
- * <pre>
- *   [ amqp[s]:// ] [user[:password]@] domain [/[name]]
- * </pre>
- * Where domain can be one of:
- * <pre>
- *   host | host:port | ip | ip:port | name
- * </pre>
- * The following are valid examples of addresses:
- * <pre>
- *  - example.org
- *  - example.org:1234
- *  - amqp://example.org
- *  - amqps://example.org
- *  - example.org/incoming
- *  - amqps://example.org/outgoing
- *  - amqps://fred:trustno1@example.org
- *  - 127.0.0.1:1234
- *  - amqps://127.0.0.1:1234
- *
- * Sending & Receiving Messages
- * ============================
- * </pre>
- * The {@link proton.Messenger} class works in conjunction with the {@link proton.Message} class.
- * The {@link proton.Message} class is a mutable holder of message content.
- * <p>
- * The put method copies its Message to the outgoing queue, and may
- * send queued messages if it can do so without blocking.  
- * <pre>
- *   var message = new proton.Message();
- *   for (var i = 0; i < 3; i++) {
- *      message.setAddress("amqp://host/queue");
- *      message.setSubject = ("Hello World " + i);
- *      messenger.put(message);
- *   }
- * </pre>
- * Similarly, the recv method receives messages into the incoming
- * queue. It may receive fewer than the requested number. The get method pops the
- * eldest Message off the incoming queue and copies it into the Message
- * object that you supply.
- * <pre>
- *   var message = new proton.Message();
- *   messenger.recv(10);
- *   while (messenger.incoming() > 0) {
- *      messenger.get(message);
- *      console.log(message.getSubject());
- *   }
- *   Hello World 0
- *   Hello World 1
- *   Hello World 2
- * </pre>
- *
- * @constructor proton.Messenger
- * @param {string} name the name of this Messenger instance.
- */
-Module['Messenger'] = function(name) { // Messenger Constructor.
-    /**
-     * The emscripten idiom below is used in a number of places in the JavaScript
-     * bindings to map JavaScript Strings to C style strings. ALLOC_STACK will
-     * increase the stack and place the item there. When the stack is next restored
-     * (by calling Runtime.stackRestore()), that memory will be automatically
-     * freed. In C code compiled by emscripten saving and restoring of the stack
-     * is automatic, but if we want to us ALLOC_STACK from native JavaScript we
-     * need to explicitly save and restore the stack using Runtime.stackSave()
-     * and Runtime.stackRestore() or we will leak emscripten heap memory.
-     * See https://github.com/kripken/emscripten/wiki/Interacting-with-code
-     * The _pn_messenger constructor copies the char* passed to it.
-     */
-    var sp = Runtime.stackSave();
-    this._messenger = _pn_messenger(name ? allocate(intArrayFromString(name), 'i8', ALLOC_STACK) : 0);
-    Runtime.stackRestore(sp);
-
-    /**
-     * Initiate Messenger non-blocking mode. For JavaScript we make this the
-     * default behaviour and don't export this method because JavaScript is
-     * fundamentally an asynchronous non-blocking execution environment.
-     */
-    _pn_messenger_set_blocking(this._messenger, false);
-
-    // Set the Messenger "passive" as we are supplying our own event loop here.
-    _pn_messenger_set_passive(this._messenger, true);
-
-    // Subscriptions that haven't yet completed, used for managing subscribe events.
-    this._pendingSubscriptions = [];
-
-    // Used in the Event registration mechanism (in the 'on' and 'emit' methods).
-    this._callbacks = {};
-
-    // This call ensures that the emscripten network callback functions are initialised.
-    Module.EventDispatch.registerMessenger(this);
-};
-
-Module['Messenger'].PN_CUMULATIVE = 0x1; // Protected Class attribute.
-
-// Expose prototype as a variable to make method declarations less verbose.
-var _Messenger_ = Module['Messenger'].prototype;
-
-// ************************* Protected methods ********************************
-
-// We use the dot notation rather than associative array form for protected
-// methods so they are visible to this "package", but the Closure compiler will
-// minify and obfuscate names, effectively making a de facto "protected" method.
-
-/**
- * This helper method checks the supplied error code, converts it into an
- * exception and throws the exception. This method will try to use the message
- * populated in pn_messenger_error(), if present, but if not it will fall
- * back to using the basic error code rendering from pn_code().
- * @param {number} code the error code to check.
- */
-_Messenger_._check = function(code) {
-    if (code < 0 && code !== Module['Error']['INPROGRESS']) {
-        var errno = this['getErrno']();
-        var message = errno ? this['getError']() : Pointer_stringify(_pn_code(code));
-        if (message !== 'PN_TIMEOUT') {
-            if (this._callbacks['error']) {
-console.log("emitting " + message);
-                this._emit('error', new Module['MessengerError'](message));
-            } else {
-console.log("throwing " + message);
-                throw new Module['MessengerError'](message);
-            }
-        }
-    }
-
-    return code;
-};
-
-/**
- * Invokes the callbacks registered for a specified event.
- * @method _emit
- * @memberof! proton.Messenger#
- * @param event {string} the event we want to emit.
- * @param param {object} the parameter we'd like to pass to the event callback.
- */
-_Messenger_._emit = function(event, param) {
-    var callbacks = this._callbacks[event];
-    if (callbacks) {
-        for (var i = 0; i < callbacks.length; i++) {
-            var callback = callbacks[i];
-            if ('function' === typeof callback) {
-                callback.call(this, param);
-            }
-        }
-    }
-};
-
-/**
- * Checks any pending subscriptions and when a source address becomes available
- * emit a subscription event passing the Subscription that triggered the event.
- * Note that this doesn't seem to work for listen/bind style subscriptions,
- * that is to say subscriptions of the form amqp://~0.0.0.0, don't know why?
- * As a workaround the subscribe call emits a subscription event immediately for
- * peer subscriptions to the local Messenger, this *should* be OK.
- */
-_Messenger_._checkSubscriptions = function() {
-    // Check for completed subscriptions, and emit subscribe event.
-    var subscriptions = this._pendingSubscriptions;
-    if (subscriptions.length) {
-        var pending = []; // Array of any subscriptions that remain pending.
-        for (var j = 0; j < subscriptions.length; j++) {
-            subscription = subscriptions[j];
-            if (subscription['getAddress']()) {
-                this._emit('subscription', subscription);
-            } else {
-                pending.push(subscription);
-            }
-        }
-        this._pendingSubscriptions = pending;
-    }
-};
-
-
-// *************************** Public methods *****************************
-
-/**
- * N.B. The following methods are not exported by the JavaScript Messenger
- * binding for reasons described below.
- *
- * For these methods it is expected that security would be implemented via
- * a secure WebSocket. TODO what happens if we decide to implement TCP sockets
- * via Node.js net library. If we do that we may want to compile OpenSSL
- * using emscripten and include these methods.
- * pn_messenger_set_certificate()
- * pn_messenger_get_certificate()
- * pn_messenger_set_private_key()
- * pn_messenger_get_private_key()
- * pn_messenger_set_password()
- * pn_messenger_get_password()
- * pn_messenger_set_trusted_certificates()
- * pn_messenger_get_trusted_certificates()
- *
- * For these methods the implementation is fairly meaningless because JavaScript
- * is a fundamentally asynchronous non-blocking environment.
- * pn_messenger_set_timeout()
- * pn_messenger_set_blocking()
- * pn_messenger_interrupt()
- * pn_messenger_work() - omitted because we have our own JavaScript Event loop.
- */
-
-/**
- * Registers a listener callback for a specified event.
- * @method on
- * @memberof! proton.Messenger#
- * @param {string} event the event we want to listen for.
- * @param {function} callback the callback function to be registered for the specified event.
- */
-_Messenger_['on'] = function(event, callback) {
-    if ('function' === typeof callback) {
-        if (!this._callbacks[event]) {
-            this._callbacks[event] = [];
-        }
-
-        this._callbacks[event].push(callback);
-    }
-};
-
-/**
- * Removes a listener callback for a specified event.
- * @method removeListener
- * @memberof! proton.Messenger#
- * @param {string} event the event we want to detach from.
- * @param {function} callback the callback function to be removed for the specified event.
- *        if no callback is specified all callbacks are removed for the event.
- */
-_Messenger_['removeListener'] = function(event, callback) {
-    if (callback) {
-        var callbacks = this._callbacks[event];
-        if ('function' === typeof callback && callbacks) {
-            // Search for the specified callback.
-            for (var i = 0; i < callbacks.length; i++) {
-                if (callback === callbacks[i]) {
-                    // If we find the specified callback, delete it and return.
-                    callbacks.splice(i, 1);
-                    return;
-                }
-            }
-        }
-    } else {
-        // If we call remove with no callback specified we remove all callbacks.
-        delete this._callbacks[event];
-    }
-};
-
-/**
- * Retrieves the name of a Messenger.
- * @method getName
- * @memberof! proton.Messenger#
- * @returns {string} the name of the messenger.
- */
-_Messenger_['getName'] = function() {
-    return Pointer_stringify(_pn_messenger_name(this._messenger));
-};
-
-/**
- * Retrieves the timeout for a Messenger.
- * @method getTimeout
- * @memberof! proton.Messenger#
- * @returns {number} zero because JavaScript is fundamentally non-blocking.
- */
-_Messenger_['getTimeout'] = function() {
-    return 0;
-};
-
-/**
- * Accessor for messenger blocking mode.
- * @method isBlocking
- * @memberof! proton.Messenger#
- * @returns {boolean} false because JavaScript is fundamentally non-blocking.
- */
-_Messenger_['isBlocking'] = function() {
-    return false;
-};
-
-/**
- * Free the Messenger. This will close all connections that are managed
- * by the Messenger. Call the stop method before destroying the Messenger.
- * <p>
- * N.B. This method has to be called explicitly in JavaScript as we can't
- * intercept finalizers, so we need to remember to free before removing refs.
- * @method free
- * @memberof! proton.Messenger#
- */
-_Messenger_['free'] = function() {
-    // This call ensures that the emscripten network callback functions are removed.
-    Module.EventDispatch.unregisterMessenger(this);
-    _pn_messenger_free(this._messenger);
-};
-
-/**
- * @method getErrno
- * @memberof! proton.Messenger#
- * @returns {number} the most recent error message code.
- */
-_Messenger_['getErrno'] = function() {
-    return _pn_messenger_errno(this._messenger);
-};
-
-/**
- * @method getError
- * @memberof! proton.Messenger#
- * @returns {string} the most recent error message as a String.
- */
-_Messenger_['getError'] = function() {
-    return Pointer_stringify(_pn_error_text(_pn_messenger_error(this._messenger)));
-};
-
-/**
- * Returns the size of the outgoing window that was set with setOutgoingWindow.
- * The default is 0.
- * @method getOutgoingWindow
- * @memberof! proton.Messenger#
- * @returns {number} the outgoing window size.
- */
-_Messenger_['getOutgoingWindow'] = function() {
-    return _pn_messenger_get_outgoing_window(this._messenger);
-};
-
-/**
- * Sets the outgoing tracking window for the Messenger. The Messenger will
- * track the remote status of this many outgoing deliveries after calling
- * send. Defaults to zero.
- * <p>
- * A Message enters this window when you call put() with the Message.
- * If your outgoing window size is n, and you call put() n+1 times, status
- * information will no longer be available for the first Message.
- * @method setOutgoingWindow
- * @memberof! proton.Messenger#
- * @param {number} window the size of the tracking window in messages.
- */
-_Messenger_['setOutgoingWindow'] = function(window) {
-    _pn_messenger_set_outgoing_window(this._messenger, window);
-};
-
-/**
- * Returns the size of the incoming window that was set with setIncomingWindow.
- * The default is 0.
- * @method getIncomingWindow
- * @memberof! proton.Messenger#
- * @returns {number} the incoming window size.
- */
-_Messenger_['getIncomingWindow'] = function() {
-    return _pn_messenger_get_incoming_window(this._messenger);
-};
-
-/**
- * Sets the incoming tracking window for the Messenger. The Messenger will
- * track the remote status of this many incoming deliveries after calling
- * send. Defaults to zero.
- * <p>
- * Messages enter this window only when you take them into your application
- * using get(). If your incoming window size is n, and you get() n+1 messages
- * without explicitly accepting or rejecting the oldest message, then the
- * Message that passes beyond the edge of the incoming window will be assigned
- * the default disposition of its link.
- * @method setIncomingWindow
- * @memberof! proton.Messenger#
- * @param {number} window the size of the tracking window in messages.
- */
-_Messenger_['setIncomingWindow'] = function(window) {
-    _pn_messenger_set_incoming_window(this._messenger, window);
-};
-
-/**
- * Currently a no-op placeholder. For future compatibility, do not send or
- * recv messages before starting the Messenger.
- * @method start
- * @memberof! proton.Messenger#
- */
-_Messenger_['start'] = function() {
-    this._check(_pn_messenger_start(this._messenger));
-};
-
-/**
- * Transitions the Messenger to an inactive state. An inactive Messenger
- * will not send or receive messages from its internal queues. A Messenger
- * should be stopped before being discarded to ensure a clean shutdown
- * handshake occurs on any internally managed connections.
- * <p>
- * The Messenger may require some time to stop if it is busy, so it is
- * necessary to call isStopped to see if it has fully stopped.
- * @method stop
- * @memberof! proton.Messenger#
- */
-_Messenger_['stop'] = function() {
-    _pn_messenger_stop(this._messenger);
-
-    // When we call stop it's quite likely that it will be busy. We call
-    // Module.EventDispatch.pump to flush the Messenger Event loop, but we
-    // wrap the call in a setTimeout to make sure that any Events generated
-    // by the flush occur on the next "tick" of the JavaScript Event loop.
-    setTimeout(Module.EventDispatch.pump, 0);
-};
-
-/**
- * Returns true iff a Messenger is in the stopped state.
- * @method isStopped
- * @memberof! proton.Messenger#
- * @returns {boolean} true iff a Messenger is in the stopped state.
- */
-_Messenger_['isStopped'] = function() {
-    return (_pn_messenger_stopped(this._messenger) > 0);
-};
-
-/**
- * Subscribes the Messenger to messages originating from the
- * specified source. The source is an address as specified in the
- * Messenger introduction with the following addition. If the
- * domain portion of the address begins with the '~' character, the
- * Messenger will interpret the domain as host/port, bind to it,
- * and listen for incoming messages. For example "~0.0.0.0",
- * "amqp://~0.0.0.0", and "amqps://~0.0.0.0" will all bind to any
- * local interface and listen for incoming messages with the last
- * variant only permitting incoming SSL connections.
- * @method subscribe
- * @memberof! proton.Messenger#
- * @param {string} source the source address we're subscribing to.
- * @returns {Subscription} a subscription.
- */
-_Messenger_['subscribe'] = function(source) {
-    if (!source) {
-        this._emit('error', new Module['SubscriptionError'](source, 'CONNECTION ERROR: Address not specified'));
-    } else {
-        return Module.EventDispatch.subscribe(this, source);
-    }
-};
-
-/**
- * Places the content contained in the message onto the outgoing queue
- * of the Messenger. This method will never block, however it will send any
- * unblocked Messages in the outgoing queue immediately and leave any blocked
- * Messages remaining in the outgoing queue. The outgoing property may be
- * used to check the depth of the outgoing queue.
- * <p>
- * When the content in a given Message object is copied to the outgoing
- * message queue, you may then modify or discard the Message object
- * without having any impact on the content in the outgoing queue.
- * <p>
- * This method returns an outgoing tracker for the Message.  The tracker
- * can be used to determine the delivery status of the Message.
- * @method put
- * @memberof! proton.Messenger#
- * @param {proton.Message} message a Message to send.
- * @returns {proton.Data.Long} a tracker.
- */
-_Messenger_['put'] = function(message) {
-    message._preEncode();
-    this._check(_pn_messenger_put(this._messenger, message._message));
-
-    // Getting the tracker is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to pass the
-    // low/high pair around to methods that require a tracker.
-    var low = _pn_messenger_outgoing_tracker(this._messenger);
-    var high = Runtime.getTempRet0();
-    return new Data.Long(low, high);
-};
-
-/**
- * Send messages from a Messenger's outgoing queue. This method forces the Event
- * loop to pump data for as long as the underlying socket remains writeable.
- * Note that after calling send() applications should yield control to the JavaScript
- * Event loop by calling setTimeout() or process.nextTick() so that the underlying
- * network processing can actually take place.
- * @method send
- * @memberof! proton.Messenger#
- */
-_Messenger_['send'] = function(number) {
-    Module.EventDispatch.pump();
-};
-
-/**
- * Gets the aggregate bufferedAmount values from all of the underlying WebSockets.
- * This value represents the amount of data buffered but not yet sent over the
- * network. If it grows too high it is a sign that the application is sending too
- * much data and should be throttled by yielding control to the JavaScript Event loop.
- * @method getBufferedAmount
- * @memberof! proton.Messenger#
- * @returns {number} the total amount of data buffered by the Messenger's sockets.
- */
-_Messenger_['getBufferedAmount'] = function() {
-    return Module.EventDispatch.getBufferedAmount(this);
-};
-
-/**
- * Gets the last known remote state of the delivery associated with the given tracker.
- * @method status
- * @memberof! proton.Messenger#
- * @param {proton.Data.Long} tracker the tracker whose status is to be retrieved.
- * @returns {proton.Status} one of None, PENDING, REJECTED, or ACCEPTED.
- */
-_Messenger_['status'] = function(tracker) {
-    if (tracker == null) { // Use == not === to check for both null and undefined.
-        var low = _pn_messenger_outgoing_tracker(this._messenger);
-        var high = Runtime.getTempRet0();
-        tracker = new Data.Long(low, high);
-    }
-
-    return _pn_messenger_status(this._messenger, tracker.getLowBitsUnsigned(), tracker.getHighBits());
-};
-
-/**
- * Checks if the delivery associated with the given tracker is still waiting to be sent.
- * @method isBuffered
- * @memberof! proton.Messenger#
- * @param {proton.Data.Long} tracker the tracker identifying the delivery.
- * @returns {boolean} true if delivery is still buffered.
- */
-_Messenger_['isBuffered'] = function(tracker) {
-    if (tracker == null) { // Use == not === to check for both null and undefined.
-        var low = _pn_messenger_outgoing_tracker(this._messenger);
-        var high = Runtime.getTempRet0();
-        tracker = new Data.Long(low, high);
-    }
-
-    return (_pn_messenger_buffered(this._messenger, tracker.getLowBitsUnsigned(), tracker.getHighBits()) > 0);
-};
-
-/**
- * Frees a Messenger from tracking the status associated with a given tracker.
- * If you don't supply a tracker, all outgoing messages up to the most recent
- * will be settled.
- * @method settle
- * @memberof! proton.Messenger#
- * @param {proton.Data.Long} tracker the tracker identifying the delivery.
- */
-_Messenger_['settle'] = function(tracker) {
-    // Getting the tracker is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to pass the
-    // low/high pair around to methods that require a tracker.
-    var flags = 0;
-    if (tracker == null) { // Use == not === to check for both null and undefined.
-        var low = _pn_messenger_outgoing_tracker(this._messenger);
-        var high = Runtime.getTempRet0();
-        tracker = new Data.Long(low, high);
-        flags = Module['Messenger'].PN_CUMULATIVE;
-    }
-
-    _pn_messenger_settle(this._messenger, tracker.getLowBitsUnsigned(), tracker.getHighBits(), flags);
-};
-
-/**
- * Receives up to limit messages into the incoming queue.  If no value for limit
- * is supplied, this call will receive as many messages as it can buffer internally.
- * @method recv
- * @memberof! proton.Messenger#
- * @param {number} limit the maximum number of messages to receive. If unspecified
- *        receive as many messages as it can buffer internally.
- */
-_Messenger_['recv'] = function(limit) {
-    _pn_messenger_recv(this._messenger, (limit ? limit : -1));
-};
-
-/**
- * Returns the capacity of the incoming message queue of messenger. Note this
- * count does not include those messages already available on the incoming queue.
- * @method receiving
- * @memberof! proton.Messenger#
- * @returns {number} the message queue capacity.
- */
-_Messenger_['receiving'] = function() {
-    return _pn_messenger_receiving(this._messenger);
-};
-
-/**
- * Moves the message from the head of the incoming message queue into the
- * supplied message object. Any content in the message will be overwritten.
- * <p>
- * A tracker for the incoming Message is returned. The tracker can later be
- * used to communicate your acceptance or rejection of the Message.
- * @method get
- * @memberof! proton.Messenger#
- * @param {proton.Message} message the destination message object. If no Message
- *        object is supplied, the Message popped from the head of the queue is discarded.
- * @param {boolean} decodeBinaryAsString if set decode any AMQP Binary payload
- *        objects as strings. This can be useful as the data in Binary objects
- *        will be overwritten with subsequent calls to get, so they must be
- *        explicitly copied. Needless to say it is only safe to set this flag if
- *        you know that the data you are dealing with is actually a string, for
- *        example C/C++ applications often seem to encode strings as AMQP binary,
- *        a common cause of interoperability problems.
- * @returns {proton.Data.Long} a tracker for the incoming Message.
- */
-_Messenger_['get'] = function(message, decodeBinaryAsString) {
-    var impl = null;
-    if (message) {
-        impl = message._message;
-    }
-
-    _pn_messenger_get(this._messenger, impl);
-
-    if (message) {
-        message._postDecode(decodeBinaryAsString);
-    }
-
-    // Getting the tracker is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to pass the
-    // low/high pair around to methods that require a tracker.
-    var low = _pn_messenger_incoming_tracker(this._messenger);
-    var high = Runtime.getTempRet0();
-    return new Data.Long(low, high);
-};
-
-/**
- * Returns the Subscription of the Message returned by the most recent call
- * to get, or null if pn_messenger_get has not yet been called.
- * @method incomingSubscription
- * @memberof! proton.Messenger#
- * @returns {Subscription} a Subscription or null if get has never been called
- *          for this Messenger.
- */
-_Messenger_['incomingSubscription'] = function() {
-    var subscription = _pn_messenger_incoming_subscription(this._messenger);
-    if (subscription) {
-        return new Subscription(subscription);
-    } else {
-        return null;
-    }
-};
-
-/**
- * Signal the sender that you have acted on the Message pointed to by the tracker.
- * If no tracker is supplied, then all messages that have been returned by the
- * get method are accepted, except those that have already been auto-settled
- * by passing beyond your incoming window size.
- * @method accept
- * @memberof! proton.Messenger#
- * @param {proton.Data.Long} tracker the tracker identifying the delivery.
- */
-_Messenger_['accept'] = function(tracker) {
-    // Getting the tracker is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to pass the
-    // low/high pair around to methods that require a tracker.
-    var flags = 0;
-    if (tracker == null) { // Use == not === to check for both null and undefined.
-        var low = _pn_messenger_incoming_tracker(this._messenger);
-        var high = Runtime.getTempRet0();
-        tracker = new Data.Long(low, high);
-        flags = Module['Messenger'].PN_CUMULATIVE;
-    }
-
-    this._check(_pn_messenger_accept(this._messenger, tracker.getLowBitsUnsigned(), tracker.getHighBits(), flags));
-};
-
-/**
- * Rejects the Message indicated by the tracker.  If no tracker is supplied,
- * all messages that have been returned by the get method are rejected, except
- * those already auto-settled by passing beyond your outgoing window size.
- * @method reject
- * @memberof! proton.Messenger#
- * @param {proton.Data.Long} tracker the tracker identifying the delivery.
- */
-_Messenger_['reject'] = function(tracker) {
-    // Getting the tracker is a little tricky as it is a 64 bit number. The way
-    // emscripten handles this is to return the low 32 bits directly and pass
-    // the high 32 bits via the tempRet0 variable. We use Data.Long to pass the
-    // low/high pair around to methods that require a tracker.
-    var flags = 0;
-    if (tracker == null) { // Use == not === to check for both null and undefined.
-        var low = _pn_messenger_incoming_tracker(this._messenger);
-        var high = Runtime.getTempRet0();
-        tracker = new Data.Long(low, high);
-        flags = Module['Messenger'].PN_CUMULATIVE;
-    }
-
-    this._check(_pn_messenger_reject(this._messenger, tracker.getLowBitsUnsigned(), tracker.getHighBits(), flags));
-};
-
-/**
- * Returns the number of messages in the outgoing message queue of a messenger.
- * @method outgoing
- * @memberof! proton.Messenger#
- * @returns {number} the outgoing queue depth.
- */
-_Messenger_['outgoing'] = function() {
-    return _pn_messenger_outgoing(this._messenger);
-};
-
-/**
- * Returns the number of messages in the incoming message queue of a messenger.
- * @method incoming
- * @memberof! proton.Messenger#
- * @returns {number} the incoming queue depth.
- */
-_Messenger_['incoming'] = function() {
-    return _pn_messenger_incoming(this._messenger);
-};
-
-/**
- * Adds a routing rule to a Messenger's internal routing table.
- * <p>
- * The route method may be used to influence how a messenger will internally treat
- * a given address or class of addresses. Every call to the route method will
- * result in messenger appending a routing rule to its internal routing table.
- * <p>
- * Whenever a message is presented to a messenger for delivery, it will match the
- * address of this message against the set of routing rules in order. The first
- * rule to match will be triggered, and instead of routing based on the address
- * presented in the message, the messenger will route based on the address supplied
- * in the rule.
- * <p>
- * The pattern matching syntax supports two types of matches, a '' will match any
- * character except a '/', and a '*' will match any character including a '/'.
- * <p>
- * A routing address is specified as a normal AMQP address, however it may
- * additionally use substitution variables from the pattern match that triggered
- * the rule.
- * <p>
- * Any message sent to "foo" will be routed to "amqp://foo.com":
- * <pre>
- * route("foo", "amqp://foo.com");
- * </pre>
- * Any message sent to "foobar" will be routed to "amqp://foo.com/bar":
- * <pre>
- * route("foobar", "amqp://foo.com/bar");
- * </pre>
- * Any message sent to bar/<path> will be routed to the corresponding path within
- * the amqp://bar.com domain:
- * <pre>
- * route("bar/*", "amqp://bar.com/$1");
- * </pre>
- * Supply credentials for foo.com:
- * <pre>
- * route("amqp://foo.com/*", "amqp://user:password@foo.com/$1");
- * </pre>
- * Supply credentials for all domains:
- * <pre>
- * route("amqp://*", "amqp://user:password@$1");
- * </pre>
- * Route all addresses through a single proxy while preserving the original destination:
- * <pre>
- * route("amqp://%/*", "amqp://user:password@proxy/$1/$2");
- * </pre>
- * Route any address through a single broker:
- * <pre>
- * route("*", "amqp://user:password@broker/$1");
- * </pre>
- * @method route
- * @memberof! proton.Messenger#
- * @param {string} pattern a glob pattern to select messages.
- * @param {string} address an address indicating outgoing address rewrite.
- */
-_Messenger_['route'] = function(pattern, address) {
-    var sp = Runtime.stackSave();
-    _pn_messenger_route(this._messenger,
-                        allocate(intArrayFromString(pattern), 'i8', ALLOC_STACK),
-                        allocate(intArrayFromString(address), 'i8', ALLOC_STACK));
-    Runtime.stackRestore(sp);
-};
-
-/**
- * Rewrite message addresses prior to transmission.
- * <p>
- * Similar to route(), except that the destination of the Message is determined
- * before the message address is rewritten.
- * <p>
- * The outgoing address is only rewritten after routing has been finalized. If
- * a message has an outgoing address of "amqp://0.0.0.0:5678", and a rewriting
- * rule that changes its outgoing address to "foo", it will still arrive at the
- * peer that is listening on "amqp://0.0.0.0:5678", but when it arrives there,
- * the receiver will see its outgoing address as "foo".
- * <p>
- * The default rewrite rule removes username and password from addresses
- * before they are transmitted.
- * @method rewrite
- * @memberof! proton.Messenger#
- * @param {string} pattern a glob pattern to select messages.
- * @param {string} address an address indicating outgoing address rewrite.
- */
-_Messenger_['rewrite'] = function(pattern, address) {
-    var sp = Runtime.stackSave();
-    _pn_messenger_rewrite(this._messenger,
-                          allocate(intArrayFromString(pattern), 'i8', ALLOC_STACK),
-                          allocate(intArrayFromString(address), 'i8', ALLOC_STACK));
-    Runtime.stackRestore(sp);
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/module.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/module.js b/proton-c/bindings/javascript/module.js
deleted file mode 100644
index 1eac6cc..0000000
--- a/proton-c/bindings/javascript/module.js
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/**
- * This file defines the Module Object which provides a namespace around the Proton
- * Messenger API. The Module object is used extensively by the emscripten runtime,
- * however for convenience it is exported with the name "proton" and not "Module".
- * <p>
- * The emscripten compiled proton-c code and the JavaScript binding code will be 
- * minified by the Closure compiler, so all comments will be stripped from the
- * actual library.
- * <p>
- * This JavaScript wrapper provides a somewhat more idiomatic object oriented
- * interface which abstracts the low-level emscripten based implementation details
- * from client code. Any similarities to the Proton Python binding are deliberate.
- * @file
- */
-
-/**
- * The Module Object is exported by emscripten for all execution platforms, we
- * use it as a namespace to allow us to selectively export only what we wish to
- * be publicly visible from this package/module, which is wrapped in a closure.
- * <p>
- * Internally the binding code uses the associative array form for declaring
- * exported properties to prevent the Closure compiler from minifying e.g.
- * <pre>Module['Messenger'] = ...</pre>
- * Exported Objects can however be used in client code using a more convenient
- * and obvious proton namespace, e.g.:
- * <pre>
- * var proton = require('qpid-proton');
- * var messenger = new proton.Messenger();
- * var message = new proton.Message();
- * ...
- * </pre>
- * The core part of this library is actually proton-c compiled into JavaScript.
- * In order to provide C style memory management (malloc/free) emscripten uses
- * a "virtual heap", which is actually a pre-allocated ArrayBuffer. The size of
- * this virtual heap is set as part of the runtime initialisation and cannot be
- * changed subsequently (the default size is 16*1024*1024 = 16777216).
- * <p>
- * Applications can specify the size of virtual heap that they require via the
- * global variable PROTON_TOTAL_MEMORY, this must be set <b>before</b> the library is
- * loaded e.g. in Node.js an application would do:
- * <pre>
- * PROTON_TOTAL_MEMORY = 50000000; // Note no var - it needs to be global.
- * var proton = require('qpid-proton');
- * ...
- * </pre>
- * A browser based application would do:
- * <pre>
- * &lt;script type="text/javascript"&gt;PROTON_TOTAL_MEMORY = 50000000;&lt;/script&gt;
- * &lt;script type="text/javascript" src="proton.js">&lt;/script&gt;
- * </pre>
- * If the global variable PROTON_TOTAL_MEMORY has been set by the application this
- * will result in the emscripten heap getting set to the next multiple of
- * 16777216 above PROTON_TOTAL_MEMORY.
- * <p>
- * The global variable PROTON_TOTAL_STACK may be used in a similar way to increase
- * the stack size from its default of 5*1024*1024 = 5242880. It is worth noting
- * that Strings are allocated on the stack, so you may need this if you end up
- * wanting to send very large strings.
- * @namespace proton
- */
-var Module = {};
-
-if (typeof global === 'object') { // If Node.js
-    if (global['PROTON_TOTAL_MEMORY']) {
-        Module['TOTAL_MEMORY'] = global['PROTON_TOTAL_MEMORY'];
-    }
-    if (global['PROTON_TOTAL_STACK']) {
-        Module['TOTAL_STACK'] = global['PROTON_TOTAL_STACK'];
-    }
-} else if (typeof window === 'object') { // If Browser
-    if (window['PROTON_TOTAL_MEMORY']) {
-        Module['TOTAL_MEMORY'] = window['PROTON_TOTAL_MEMORY'];
-    }
-    if (window['PROTON_TOTAL_STACK']) {
-        Module['TOTAL_STACK'] = window['PROTON_TOTAL_STACK'];
-    }
-}
-
-/*****************************************************************************/
-/*                                                                           */
-/*                               EventDispatch                               */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * EventDispatch is a Singleton class that allows callbacks to be registered,
- * which will get triggered by the emscripten WebSocket network callbacks.
- * Clients of Messenger will register callbacks by calling:
- * <pre>
- * messenger.on('error', &lt;callback function&gt;);
- * messenger.on('work', &lt;callback function&gt;);
- * messenger.on('subscription', &lt;callback function&gt;);
- * </pre>
- * EventDispatch supports callback registration from multiple Messenger instances.
- * The client callbacks will actually be called when a given messenger has work
- * available or a WebSocket close has been occurred.
- * <p>
- * The approach implemented here allows the registered callbacks to follow a
- * similar pattern to _process_incoming and _process_outgoing in async.py
- * @constructor proton.EventDispatch
- */
-Module.EventDispatch = new function() { // Note the use of new to create a Singleton.
-    var POLLIN  = 0x001;
-    var POLLOUT = 0x004;
-    var _error = null;
-    var _messengers = {};  // Keyed by name.
-    var _selectables = {}; // Keyed by file descriptor.
-
-    var _initialise = function() {
-        /**
-         * Initialises the emscripten network callback functions. This needs
-         * to be done the first time we call registerMessenger rather than
-         * when we create the Singleton because emscripten's socket filesystem
-         * has to be mounted before can listen for any of these events.
-         */
-        Module['websocket']['on']('open', _pump);
-        Module['websocket']['on']('message', _pump);
-        Module['websocket']['on']('connection', _connectionHandler);
-        Module['websocket']['on']('close', _closeHandler);
-        Module['websocket']['on']('error', _errorHandler);
-
-        /**
-         * For Node.js the network code uses the ws WebSocket library, see
-         * https://github.com/einaros/ws. The following is a "Monkey Patch"
-         * that fixes a problem with Receiver.js where it wasn't checking if
-         * an Object was null before accessing its properties, so it was
-         * possible to see errors like:
-         * TypeError: Cannot read property 'fragmentedOperation' of null
-         * at Receiver.endPacket (.....node_modules/ws/lib/Receiver.js:224:18)
-         * This problem is generally seen in Server code after messenger.stop()
-         * I *think* that the underlying issue is actually because ws calls
-         * cleanup directly rather than pushing it onto the event loop so the
-         * this.state stuff gets cleared before the endPacket method is called.
-         * This fix simply interposes a check to avoid calling endPacket if
-         * the state has been cleared (i.e. the WebSocket has been closed).
-         */
-        if (ENVIRONMENT_IS_NODE) {
-            try {
-                var ws = require('ws');
-                // Array notation to stop Closure compiler minifying properties we need.
-                ws['Receiver'].prototype['originalEndPacket'] = ws['Receiver'].prototype['endPacket'];
-                ws['Receiver'].prototype['endPacket'] = function() {
-                    if (this['state']) {
-                        this['originalEndPacket']();
-                    }
-                };
-            } catch (e) {
-                console.error("Failed to apply Monkey Patch to ws WebSocket library");
-            }
-        }
-
-        _initialise = function() {}; // After first call replace with null function.
-    };
-
-    /**
-     * Messenger error handling can be a bit inconsistent and in several places
-     * rather than returning an error code or setting an error it simply writes
-     * to fprintf. This is something of a Monkey Patch that replaces the emscripten
-     * library fprintf call with one that checks the message and sets a variable
-     * if the message is an ERROR. TODO At some point hopefully Dominic Evans'
-     * patch on Jira PROTON-571 will render this code redundant.
-     */
-    _fprintf = function(stream, format, varargs) {
-        var array = __formatString(format, varargs);
-        array.pop(); // Remove the trailing \n
-        var string = intArrayToString(array); // Convert to native JavaScript string.
-        if (string.indexOf('ERROR') === -1) { // If not an ERROR just log the message.
-            console.log(string);
-        } else {
-            _error = string;
-        }
-    };
-
-    /**
-     * This method uses some low-level emscripten internals (stream = FS.getStream(fd),
-     * sock = stream.node.sock, peer = SOCKFS.websocket_sock_ops.getPeer) to find
-     * the underlying WebSocket associated with a given file descriptor value.
-     */
-    var _getWebSocket = function(fd) {
-        var stream = FS.getStream(fd);
-        if (stream) {
-            var sock = stream.node.sock;
-            if (sock.server) {
-                return sock.server;
-            }
-            var peer = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport);
-            if (peer) {
-                return peer.socket;
-            }
-        }
-        return null;
-    };
-
-    /**
-     * This method iterates through all registered Messengers and retrieves any
-     * pending selectables, which are stored in a _selectables map keyed by fd.
-     */
-    var _updateSelectables = function() {
-        var sel = 0;
-        var fd = -1;
-        for (var name in _messengers) {
-            var messenger = _messengers[name];
-            while ((sel = _pn_messenger_selectable(messenger._messenger))) {
-                fd = _pn_selectable_get_fd(sel);
-                // Only register valid selectables, otherwise free them.
-                if (fd === -1) {
-                    _pn_selectable_free(sel);
-                } else {
-                    _selectables[fd] = {messenger: messenger, selectable: sel, socket: _getWebSocket(fd)};
-                }
-            }
-        }
-        return fd; // Return the most recently added selector's file descriptor.
-    };
-
-    /**
-     * Continually pump data while there's still work to do.
-     */
-    var _pump = function(fd) {
-        while (_pumpOnce(fd));
-    };
-
-    /**
-     * This method more or less follows the pattern of the pump_once method from
-     * class Pump in tests/python/proton_tests/messenger.py. It looks a little
-     * different because the select/poll implemented here uses some low-level
-     * emscripten internals (stream = FS.getStream(fd), sock = stream.node.sock,
-     * mask = sock.sock_ops.poll(sock)). We use the internals so we don't have
-     * to massage from file descriptors into the C style poll interface.
-     */
-    var _pumpOnce = function(fdin) {
-        _updateSelectables();
-
-        var work = false;
-        for (var fd in _selectables) {
-            var selectable = _selectables[fd];
-            if (selectable.socket) {
-                var messenger = selectable.messenger;
-                var sel = selectable.selectable;
-                var terminal = _pn_selectable_is_terminal(sel);
-                if (terminal) {
-//console.log(fd + " is terminal");
-                    _closeHandler(fd);
-                } else if (!fdin || (fd == fdin)) {
-                    var stream = FS.getStream(fd);
-                    if (stream) {
-                        var sock = stream.node.sock;
-                        if (sock.sock_ops.poll) {
-                            var mask = sock.sock_ops.poll(sock); // Low-level poll call.
-                            if (mask) {
-                                var capacity = _pn_selectable_is_reading(sel);
-                                var pending = _pn_selectable_is_writing(sel);
-
-                                if ((mask & POLLIN) && capacity) {
-//console.log("- readable fd = " + fd + ", capacity = " + _pn_selectable_capacity(sel));
-                                    _error = null; // May get set by _pn_selectable_readable.
-                                    _pn_selectable_readable(sel);
-                                    work = true;
-                                }
-                                if ((mask & POLLOUT) && pending) {
-//console.log("- writable fd = " + fd + ", pending = " + _pn_selectable_pending(sel));
-                                    _pn_selectable_writable(sel);
-                                    work = true;
-                                }
-
-                                var errno = messenger['getErrno']();
-                                _error = errno ? messenger['getError']() : _error;
-                                if (_error) {
-                                    _errorHandler([fd, 0, _error]);
-                                } else {
-                                    // Don't send work Event if it's a listen socket.
-                                    if (work && !sock.server) {
-                                        messenger._checkSubscriptions();
-                                        messenger._emit('work');
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return work;
-    };
-
-    /**
-     * Handler for the emscripten socket connection event.
-     * The causes _pump to be called with no fd, forcing all fds to be checked.
-     */
-    var _connectionHandler = function(fd) {
-        _pump();
-    };
-
-    /**
-     * Handler for the emscripten socket close event.
-     */
-    var _closeHandler = function(fd) {
-        _updateSelectables();
-
-        var selectable = _selectables[fd];
-        if (selectable && selectable.socket) {
-            selectable.socket = null;
-//console.log("_closeHandler fd = " + fd);
-
-            /**
-             * We use the timeout to ensure that execution of the function to
-             * actually free and remove the selectable is deferred until next
-             * time round the (internal JavaScript) event loop. This turned out
-             * to be necessary because in some cases the ws WebSocket library
-             * calls the on_close callback (concurrently!!) before the on_message
-             * callback exits, which could result in _pn_selectable_free being
-             * called whilst _pn_selectable_writable is executing, which is bad!!
-             */
-            setTimeout(function() {
-//console.log("deferred _closeHandler fd = " + fd);
-                // Close and remove the selectable.
-                var sel = selectable.selectable;
-                _pn_selectable_free(sel); // This closes the underlying socket too.
-                delete _selectables[fd];
-
-                var messenger = selectable.messenger;
-                messenger._emit('work');
-            }, 0);
-        }
-    };
-
-    /**
-     * Handler for the emscripten socket error event.
-     */
-    var _errorHandler = function(error) {
-        var fd = error[0];
-        var message = error[2];
-
-        _updateSelectables();
-
-        var selectable = _selectables[fd];
-        if (selectable) {
-            // Close and remove the selectable.
-            var sel = selectable.selectable;
-            _pn_selectable_free(sel); // This closes the underlying socket too.
-            delete _selectables[fd];
-
-            var messenger = selectable.messenger;
-
-            // Remove any pending Subscriptions whose fd matches the error fd.
-            var subscriptions = messenger._pendingSubscriptions;
-            for (var i = 0; i < subscriptions.length; i++) {
-                subscription = subscriptions[i];
-                // Use == not === as fd is a number and subscription.fd is a string.
-                if (subscription.fd == fd) {
-                    messenger._pendingSubscriptions.splice(i, 1);
-                    if (message.indexOf('EHOSTUNREACH:') === 0) {
-                        message = 'CONNECTION ERROR (' + subscription.source + '): bind: Address already in use';
-                    }
-                    messenger._emit('error', new Module['SubscriptionError'](subscription.source, message));
-                    return;
-                }
-            }
-
-            messenger._emit('error', new Module['MessengerError'](message));
-        }
-    };
-
-    /**
-     * Flush any data that has been written by the Messenger put() method.
-     * @method pump
-     * @memberof! proton.EventDispatch#
-     */
-    this.pump = function() {
-        _pump();
-    };
-
-    /**
-     * For a given Messenger instance retrieve the bufferedAmount property from
-     * any connected WebSockets and return the aggregate total sum.
-     * @method getBufferedAmount
-     * @memberof! proton.EventDispatch#
-     * @param {proton.Messenger} messenger the Messenger instance that we want
-     *        to find the total buffered amount for.
-     * @returns {number} the total sum of the bufferedAmount property across all
-     *          connected WebSockets.
-     */
-    this.getBufferedAmount = function(messenger) {
-        var total = 0;
-        for (var fd in _selectables) {
-            var selectable = _selectables[fd];
-            if (selectable.messenger === messenger && selectable.socket) {
-                total += selectable.socket.bufferedAmount | 0; 
-            }
-        }
-        return total;
-    };
-
-    /**
-     * Subscribe to a specified source address.
-     * <p>
-     * This method is delegated to by the subscribe method of {@link proton.Messenger}.
-     * We delegate to EventDispatch because we create Subscription objects that
-     * contain some additional information (such as file descriptors) which are
-     * only available to EventDispatch and we don't really want to expose to the
-     * wider API. This low-level information is mainly used for error handling
-     * which is itself encapsulated in EventDispatch.
-     * @method subscribe
-     * @memberof! proton.EventDispatch#
-     * @param {proton.Messenger} messenger the Messenger instance that this
-     *        subscription relates to.
-     * @param {string} source the address that we'd like to subscribe to.
-     */
-    this.subscribe = function(messenger, source) {
-        // First update selectables before subscribing so we can work out the
-        // Subscription fd (which will be the listen file descriptor).
-        _updateSelectables();
-        var sp = Runtime.stackSave();
-        var subscription = _pn_messenger_subscribe(messenger._messenger,
-                                                   allocate(intArrayFromString(source), 'i8', ALLOC_STACK));
-        Runtime.stackRestore(sp);
-        var fd = _updateSelectables();
-
-        subscription = new Subscription(subscription, source, fd);
-        messenger._pendingSubscriptions.push(subscription);
-
-        // For passive subscriptions emit a subscription event (almost) immediately,
-        // otherwise defer until the address has been resolved remotely.
-        if (subscription.passive) {
-            // We briefly delay the call to checkSubscriptions because it is possible
-            // for passive subscriptions to fail if another process is bound to the
-            // port specified in the subscription.
-            var check = function() {messenger._checkSubscriptions();};
-            setTimeout(check, 10);
-        }
-
-        return subscription;
-    };
-
-    /**
-     * Register the specified Messenger as being interested in network events.
-     * @method registerMessenger
-     * @memberof! proton.EventDispatch#
-     * @param {proton.Messenger} messenger the Messenger instance we want to
-     *        register to receive network events.
-     */
-    this.registerMessenger = function(messenger) {
-        _initialise();
-
-        var name = messenger['getName']();
-        _messengers[name] = messenger;
-    };
-
-    /**
-     * Unregister the specified Messenger from interest in network events.
-     * @method unregisterMessenger
-     * @memberof! proton.EventDispatch#
-     * @param {proton.Messenger} messenger the Messenger instance we want to
-     *        unregister from receiving network events.
-     */
-    this.unregisterMessenger = function(messenger) {
-        var name = messenger['getName']();
-        delete _messengers[name];
-    };
-};
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[5/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Posted by jr...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/qpid-proton-messenger/LICENSE
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/qpid-proton-messenger/LICENSE b/proton-c/bindings/javascript/qpid-proton-messenger/LICENSE
deleted file mode 100644
index 6b0b127..0000000
--- a/proton-c/bindings/javascript/qpid-proton-messenger/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/qpid-proton-messenger/README.md
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/qpid-proton-messenger/README.md b/proton-c/bindings/javascript/qpid-proton-messenger/README.md
deleted file mode 100644
index 35d1917..0000000
--- a/proton-c/bindings/javascript/qpid-proton-messenger/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-**qpid-proton-messenger**
----------------------
-Apache qpid proton messenger AMQP 1.0 library
-http://qpid.apache.org/proton/
-https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git
-
-This library provides JavaScript bindings for Apache qpid proton messenger giving AMQP 1.0 support to Node.js and browsers.
-
-**Important Note - Modern Browser Needed**
-The JavaScript binding requires ArrayBuffer/TypedArray and WebSocket support. Both of these are available in most "modern" browser versions. The author has only tried running on FireFox and Chrome, though recent Safari, Opera and IE10+ *should* work too - YMMV. It might be possible to polyfill for older browsers but the author hasn't tried this.
-
-**Important Note - WebSocket Transport!!!**
-Before going any further it is really important to realise that the JavaScript bindings to Proton are somewhat different to the bindings for other languages because of the restrictions of the execution environment. 
-
-In particular it is very important to note that the JavaScript bindings by default use a WebSocket transport and not a TCP transport, so whilst it's possible to create Server style applications that clients can connect to (e.g. recv.js and send.js) note that:
-JavaScript clients cannot *directly* talk to "normal" AMQP applications such as qpidd or (by default) the Java Broker because they use a standard TCP transport.
-
-This is a slightly irksome issue, but there's no getting away from it because it's a security restriction imposed by the browser environment.
-
-**Full README**
-https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=blob;f=proton-c/bindings/javascript/README;h=8bfde56632a22bffce4afe791321f4900c5d38d2;hb=HEAD
-
-**Examples**
-The examples in the main Proton repository are the best starting point:
-https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=tree;f=examples/messenger/javascript;h=37964f32a6b3d63e802000b0a2a974ed017e4688;hb=HEAD
-
-In practice the examples follow a fairly similar pattern to the Python bindings the most important thing to bear in mind though is that JavaScript is completely asynchronous/non-blocking, which can catch the unwary.
-
-An application follows the following (rough) steps:
-
-(optional) Set the heap size.
-It's important to realise that most of the library code is compiled C code and the runtime uses a "virtual heap" to support the underlying malloc/free. This is implemented internally as an ArrayBuffer with a default size of 16777216.
-
-To allocate a larger heap an application must set the PROTON_TOTAL_MEMORY global. In Node.js this would look like (see send.js):
-
-    PROTON_TOTAL_MEMORY = 50000000; // Note no var - it needs to be global.
-
-In a browser it would look like (see send.html):
-
-    <script type="text/javascript">PROTON_TOTAL_MEMORY = 50000000</script>
-
-Load the library and create a message and messenger.
-In Node.js this would look like (see send.js):
-
-    var proton = require("qpid-proton-messenger");
-    var message = new proton.Message();
-    var messenger = new proton.Messenger();
-
-In a browser it would look like (see send.html):
-
-    <script type="text/javascript" src="../../../node_modules/qpid-proton-messenger/lib/proton-messenger.js"></script>
-    <script type="text/javascript" >
-    var message = new proton.Message();
-    var messenger = new proton.Messenger();
-
-Set up event handlers as necessary.
-
-    messenger.on('error', <error callback>);
-    messenger.on('work', <work callback>);
-    messenger.on('subscription', <subscription callback>);
-
-The work callback is triggered on WebSocket events, so in general you would use this to send and receive messages, for example in recv.js we have:
-
-    var pumpData = function() {
-        while (messenger.incoming()) {
-            var t = messenger.get(message);
-    
-        console.log("Address: " + message.getAddress());
-        console.log("Subject: " + message.getSubject());
-    
-        // body is the body as a native JavaScript Object, useful for most real cases.
-        //console.log("Content: " + message.body);
-    
-        // data is the body as a proton.Data Object, used in this case because
-        // format() returns exactly the same representation as recv.c
-        console.log("Content: " + message.data.format());
-    
-        messenger.accept(t);
-       }
-    };
-    messenger.on('work', pumpData);
-
-
-The subscription callback is triggered when the address provided in a call to
-
-    messenger.subscribe(<address>);
-
-Gets resolved. An example of its usage can be found in qpid-config.js which is
-a fully functioning and complete port of the python qpid-config tool. It also
-illustrates how to do asynchronous request/response based applications.
-
-Aside from the asynchronous aspects the rest of the API is essentially the same
-as the Python binding aside from minor things such as camel casing method names etc.
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/qpid-proton-messenger/lib/.gitignore
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/qpid-proton-messenger/lib/.gitignore b/proton-c/bindings/javascript/qpid-proton-messenger/lib/.gitignore
deleted file mode 100644
index 2b1f291..0000000
--- a/proton-c/bindings/javascript/qpid-proton-messenger/lib/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Currently empty .gitignore
-# Used to ensure git creates the otherwise empty directory

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/qpid-proton-messenger/package.json
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/qpid-proton-messenger/package.json b/proton-c/bindings/javascript/qpid-proton-messenger/package.json
deleted file mode 100644
index 0544e28..0000000
--- a/proton-c/bindings/javascript/qpid-proton-messenger/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "name" : "qpid-proton-messenger",
-    "version": "0.9.0",
-    "description": "apache qpid proton messenger AMQP 1.0 library",
-    "homepage": "http://qpid.apache.org/proton",
-    "license": "Apache-2.0",
-    "repository": {
-        "type": "git",
-        "url": "https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git"
-    },
-    "main" : "./lib/proton-messenger.js",
-    "dependencies": {
-        "ws": "0.5.0",
-        "crypto": "latest",
-        "fs": "latest",
-        "path": "latest"
-    }
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/subscription.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/subscription.js b/proton-c/bindings/javascript/subscription.js
deleted file mode 100644
index 89fd1a3..0000000
--- a/proton-c/bindings/javascript/subscription.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                               Subscription                                */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Constructs a Subscription instance.
- * @classdesc This class is a wrapper for Messenger's subscriptions.
- * Subscriptions should never be *directly* instantiated by client code only via
- * Messenger.subscribe() or Messenger.incomingSubscription(), so we declare the
- * constructor in the scope of the package and don't export it via Module.
- * @constructor Subscription
- * @param {number} subscription a pointer to the underlying subscription object.
- * @param {string} source the address that we want to subscribe to.
- * @param {number} fd the file descriptor associated with the subscription. This
- *                 is used internally to tidy up during error handling.
- */
-var Subscription = function(subscription, source, fd) { // Subscription Constructor.
-    this._subscription = subscription;
-    this.source = source;
-    this.fd = fd;
-    if (source.indexOf('~') !== -1) {
-        this.passive = true;
-    } else {
-        this.passive = false;
-    }
-};
-
-/**
- * TODO Not sure exactly what pn_subscription_get_context does.
- * @method getContext
- * @memberof! Subscription#
- * @returns the Subscription's Context.
- */
-Subscription.prototype['getContext'] = function() {
-    return _pn_subscription_get_context(this._subscription);
-};
-
-/**
- * TODO Not sure exactly what pn_subscription_set_context does.
- * @method setContext
- * @memberof! Subscription#
- * @param context the Subscription's new Context.
- */
-Subscription.prototype['setContext'] = function(context) {
-    _pn_subscription_set_context(this._subscription, context);
-};
-
-/**
- * @method getAddress
- * @memberof! Subscription#
- * @returns the Subscription's Address.
- */
-Subscription.prototype['getAddress'] = function() {
-    if (this.passive) {
-        return this.source;
-    }
-    return Pointer_stringify(_pn_subscription_address(this._subscription));
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/node/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/node/CMakeLists.txt b/proton-c/bindings/node/CMakeLists.txt
deleted file mode 100644
index d70ab1f..0000000
--- a/proton-c/bindings/node/CMakeLists.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-cmake_minimum_required(VERSION 2.8.12)
-
-if (NOT BUILD_WITH_CXX)
-  message(FATAL_ERROR "ERROR: node bindings require CXX build to be enabled.\n"
-    "Please set BUILD_WITH_CXX before rebuilding.")
-endif()
-
-find_package(SWIG REQUIRED)
-include(${SWIG_USE_FILE})
-
-# NB: *may* require cmake 3.1 or newer to successfully detect swig3.0 binary
-#     ahead of swig2.0 binary (see commit 7400695 in kitware/cmake)
-if (${SWIG_VERSION} VERSION_LESS 3.0)
-  message(FATAL_ERROR "ERROR: swig-${SWIG_VERSION} does not support generation"
-    " of Node.js bindings.\nPlease upgrade to swig-3.0 or newer to build these"
-  )
-endif()
-
-configure_file (
-  "${CMAKE_CURRENT_SOURCE_DIR}/../../include/proton/version.h.in"
-  "${CMAKE_CURRENT_BINARY_DIR}/../../include/proton/version.h"
-)
-configure_file (
-  "${CMAKE_CURRENT_SOURCE_DIR}/binding.gyp.in"
-  "${CMAKE_CURRENT_BINARY_DIR}/binding.gyp"
-)
-
-include_directories("${CMAKE_CURRENT_BINARY_DIR}/../../src")
-include_directories("${CMAKE_CURRENT_BINARY_DIR}/../../include")
-include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../src")
-include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../include")
-
-find_path (NODE_ROOT_DIR "node/node.h" "src/node.h" HINTS /usr/include/nodejs)
-# message("NODE_ROOT_DIR=${NODE_ROOT_DIR}")
-include_directories("${NODE_ROOT_DIR}/src")
-include_directories("${NODE_ROOT_DIR}/deps/v8/include")
-include_directories("${NODE_ROOT_DIR}/deps/uv/include")
-
-set(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
-set(CMAKE_SWIG_FLAGS "-node;-I${CMAKE_CURRENT_SOURCE_DIR}/../../include")
-set_source_files_properties(javascript.i PROPERTIES CPLUSPLUS ON)
-swig_add_library(cproton LANGUAGE javascript SOURCES javascript.i)
-set_target_properties (cproton PROPERTIES LINKER_LANGUAGE CXX)
-list(APPEND SWIG_MODULE_cproton_javascript_EXTRA_DEPS
-  ${CMAKE_CURRENT_SOURCE_DIR}/../../proton-c/include/proton/cproton.i
-  ${PROTON_HEADERS}
-)
-set_target_properties (cproton PROPERTIES
-  COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -DBUILDING_NODE_EXTENSION"
-  PREFIX ""
-  SUFFIX ".node"
-)
-swig_link_libraries(cproton qpid-proton)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/node/binding.gyp.in
----------------------------------------------------------------------
diff --git a/proton-c/bindings/node/binding.gyp.in b/proton-c/bindings/node/binding.gyp.in
deleted file mode 100644
index c93cde4..0000000
--- a/proton-c/bindings/node/binding.gyp.in
+++ /dev/null
@@ -1,31 +0,0 @@
-{
-    "targets": [{
-        "target_name": "cproton",
-        "type": "loadable_module",
-        "sources": ["javascriptJAVASCRIPT_wrap.cxx"],
-        "conditions": [
-            ["OS=='win'", {
-                "cflags_cc+": ["/W3", "/Zi"],
-                'msvs_settings': {
-                  'VCCLCompilerTool': {
-                    'AdditionalOptions': [ '/EHsc' ],
-                    'ShowIncludes': 'false',
-                    'PreprocessorDefinitions': [ '_WIN32_WINNT=0x0600', 'PN_NODEFINE_SSIZE_T' ]
-                  }
-                },
-                "include_dirs+": [".", "@Proton_SOURCE_DIR@/proton-c/include"],
-                "libraries": ["qpid-proton"],
-            }],
-            ["OS=='linux'", {
-                "cflags_cc+": ["-Wall", "-Wno-comment", "-g"],
-                "include_dirs+": [".", "@Proton_SOURCE_DIR@/proton-c/include"],
-                "libraries": ["-lqpid-proton", "-L@Proton_BINARY_DIR@/proton-c", "-Wl,-rpath=\'$$ORIGIN\'"],
-            }],
-            ["OS=='mac'", {
-                "cflags_cc+": ["-Wall", "-Wno-comment", "-g"],
-                "include_dirs+": [".", "@Proton_SOURCE_DIR@/proton-c/include"],
-                "libraries": ["-lqpid-proton", "@Proton_BINARY_DIR@/proton-c", "-Wl,-install_name,@rpath/proton.node", "-Wl,-rpath,@loader_path/", "-Wl,-headerpad_max_install_names"],
-            }],
-        ]
-    }]
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/node/javascript.i
----------------------------------------------------------------------
diff --git a/proton-c/bindings/node/javascript.i b/proton-c/bindings/node/javascript.i
deleted file mode 100644
index d812475..0000000
--- a/proton-c/bindings/node/javascript.i
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-%module cproton
-
-// provided by SWIG development libraries
-%include javascript.swg
-
-%header %{
-/* Include the headers needed by the code in this wrapper file */
-#include <proton/types.h>
-#include <proton/connection.h>
-#include <proton/condition.h>
-#include <proton/delivery.h>
-#include <proton/driver.h>
-#include <proton/driver_extras.h>
-#include <proton/event.h>
-#include <proton/handlers.h>
-#include <proton/message.h>
-#include <proton/messenger.h>
-#include <proton/reactor.h>
-#include <proton/session.h>
-#include <proton/url.h>
-%}
-
-%include "proton/cproton.i"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/CMakeLists.txt b/proton-c/bindings/perl/CMakeLists.txt
deleted file mode 100644
index 28f07bf..0000000
--- a/proton-c/bindings/perl/CMakeLists.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Always need to treat SWIG files as C
-set_source_files_properties(cproton.i perl.i PROPERTIES CPLUSPLUS NO)
-
-# Need to pass in the same compiler flags used to build Perl itself
-execute_process(COMMAND perl -MConfig -e "print \$Config{ccflags}"
-  OUTPUT_VARIABLE PERLCFLAGS)
-
-# Disable harmlesss warnings from the generted perlPERL_wrap.c
-set(PERLCFLAGS "${PERLCFLAGS} -w")
-
-include_directories("${PERL_INCLUDE_PATH}")
-
-if (CHECK_SYSINSTALL_PERL)
-  execute_process(COMMAND perl -V:installvendorarch
-    OUTPUT_VARIABLE PERL_VENDORARCH_OUTPUT_VARIABLE
-    RESULT_VARIABLE PERL_VENDORARCH_RESULT_VARIABLE)
-
-  if (NOT PERL_VENDORARCH_RESULT_VARIABLE)
-    string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORARCH ${PERL_VENDORARCH_OUTPUT_VARIABLE})
-    file(TO_CMAKE_PATH "${PERL_VENDORARCH}" PERL_VENDORARCH_DIR_DEFAULT)
-  else ()
-    set (PERL_VENDORARCH_DIR_DEFAULT ${PERL_VENDORARCH_RESULT_VARIABLE})
-  endif ()
-else (CHECK_SYSINSTALL_PERL)
-  set (PERL_VENDORARCH_DIR_DEFAULT ${BINDINGS_DIR}/perl)
-endif (CHECK_SYSINSTALL_PERL)
-
-if (NOT PERL_VENDORARCH_DIR)
-  set (PERL_VENDORARCH_DIR ${PERL_VENDORARCH_DIR_DEFAULT})
-endif()
-
-set (CMAKE_C_FLAGS ${PERLCFLAGS})
-list(APPEND SWIG_MODULE_cproton_perl_EXTRA_DEPS
-    ${CMAKE_SOURCE_DIR}/proton-c/include/proton/cproton.i
-    ${PROTON_HEADERS}
-)
-swig_add_library(cproton_perl LANGUAGE perl SOURCES perl.i)
-set_target_properties(cproton_perl PROPERTIES PREFIX "")
-swig_link_libraries(cproton_perl ${BINDING_DEPS} ${PERL_LIBRARY})
-
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.so
-        DESTINATION ${PERL_VENDORARCH_DIR}/auto/cproton_perl
-        COMPONENT Perl)
-
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.pm
-        DESTINATION ${PERL_VENDORARCH_DIR}
-        COMPONENT Perl)
-
-install(FILES lib/qpid_proton.pm
-        DESTINATION ${PERL_VENDORARCH_DIR}
-        COMPONENT Perl)
-
-INSTALL(DIRECTORY lib/qpid
-        DESTINATION ${PERL_VENDORARCH_DIR}
-        COMPONENT Perl)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/LICENSE
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/LICENSE b/proton-c/bindings/perl/LICENSE
deleted file mode 100644
index 6b0b127..0000000
--- a/proton-c/bindings/perl/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/MANIFEST
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/MANIFEST b/proton-c/bindings/perl/MANIFEST
deleted file mode 100644
index a1e191c..0000000
--- a/proton-c/bindings/perl/MANIFEST
+++ /dev/null
@@ -1,10 +0,0 @@
-CMakeLists.txt
-lib/qpid/proton/Message.pm
-lib/qpid/proton/Messenger.pm
-lib/qpid_proton.pm
-LICENSE
-Makefile.PL
-MANIFEST
-perl.i
-README
-TODO

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/Makefile.PL
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/Makefile.PL b/proton-c/bindings/perl/Makefile.PL
deleted file mode 100644
index e06ccd5..0000000
--- a/proton-c/bindings/perl/Makefile.PL
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/perl -w
-
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
-    NAME         => 'cproton_perl',
-    DISTNAME     => 'perl-qpid_proton',
-    VERSION      => '0.3',
-    PREREQ_PM    => {},
-    LIBS         => ["-lqpid-proton"],
-    C            => ['cproton_perl.c'],
-);

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/README
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/README b/proton-c/bindings/perl/README
deleted file mode 100644
index 7dda9a4..0000000
--- a/proton-c/bindings/perl/README
+++ /dev/null
@@ -1,17 +0,0 @@
-Qpid Proton Perl Language Bindings
-==================================
-
-KNOWN ISSUES
-============
-
-
-SUPPORT
-=======
-
-To report bugs in the bindings, or to request an enhancement, please file
-a tracker request:
-
-    https://issues.apache.org/jira/browse/PROTON
-
-You can also directly interact with the development team and other users
-in the #qpid channel on irc.freenode.net.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/TODO
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/TODO b/proton-c/bindings/perl/TODO
deleted file mode 100644
index c007a5b..0000000
--- a/proton-c/bindings/perl/TODO
+++ /dev/null
@@ -1,2 +0,0 @@
-Qpid Proton Perl Language Bindings TODO List
-============================================

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton.pm b/proton-c/bindings/perl/lib/qpid/proton.pm
deleted file mode 100644
index b50092b..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton.pm
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-=pod
-
-=head1 NAME
-
-qpid::proton;
-
-=head1 DESCRIPTION
-
-=cut
-
-package qpid::proton;
-
-
-=pod
-
-=head2 MAPS
-
-Moving values from a map within a B<qpid::proton::Data> object into a
-Perl B<Hash> object is done using the following:
-
-=over
-
-=item %hash = qpid::proton::get_map_from( [DATA] );
-
-=back
-
-=cut
-
-sub get_map_from {
-    my $data = $_[0];
-
-    die "data cannot be nil" unless defined($data);
-
-    my $type = $data->get_type;
-
-    die "current node is not a map" if !($type == qpid::proton::MAP);
-
-    my $result;
-    my $count = $data->get_map;
-
-    $data->enter;
-    for($i = 0; $i < $count/2; $i++) {
-        $data->next;
-        my $type = $data->get_type;
-        my $key = $type->get($data);
-        $data->next;
-        $type = $data->get_type;
-        my $value = $type->get($data);
-        $result{$key} = $value;
-    }
-    $data->exit;
-
-    return $result;
-}
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/Constants.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Constants.pm b/proton-c/bindings/perl/lib/qpid/proton/Constants.pm
deleted file mode 100644
index 2cb93e7..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/Constants.pm
+++ /dev/null
@@ -1,172 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-package qpid::proton;
-
-use constant {
-    VERSION_MAJOR => $cproton_perl::PN_VERSION_MAJOR,
-    VERSION_MINOR => $cproton_perl::PN_VERSION_MINOR,
-
-    NULL       => $cproton_perl::PN_NULL,
-    BOOL       => qpid::proton::Mapping->new(
-        "bool",
-        $cproton_perl::PN_BOOL,
-        "put_bool",
-        "get_bool"),
-    UBYTE      => qpid::proton::Mapping->new(
-        "ubyte",
-        $cproton_perl::PN_UBYTE,
-        "put_ubyte",
-        "get_ubyte"),
-    BYTE       => qpid::proton::Mapping->new(
-        "byte",
-        $cproton_perl::PN_BYTE,
-        "put_byte",
-        "get_byte"),
-    USHORT     => qpid::proton::Mapping->new(
-        "ushort",
-        $cproton_perl::PN_USHORT,
-        "put_ushort",
-        "get_ushort"),
-    SHORT      => qpid::proton::Mapping->new(
-        "short",
-        $cproton_perl::PN_SHORT,
-        "put_short",
-        "get_short"),
-    UINT       => qpid::proton::Mapping->new(
-        "uint",
-        $cproton_perl::PN_UINT,
-        "put_uint",
-        "get_uint"),
-    INT        => qpid::proton::Mapping->new(
-        "int",
-        $cproton_perl::PN_INT,
-        "put_int",
-        "get_int"),
-    CHAR       => qpid::proton::Mapping->new(
-        "char",
-        $cproton_perl::PN_CHAR,
-        "put_char",
-        "get_char"),
-    ULONG      => qpid::proton::Mapping->new(
-        "ulong",
-        $cproton_perl::PN_ULONG,
-        "put_ulong",
-        "get_ulong"),
-    LONG       => qpid::proton::Mapping->new(
-        "long",
-        $cproton_perl::PN_LONG,
-        "put_long",
-        "get_long"),
-    TIMESTAMP  => qpid::proton::Mapping->new(
-        "timestamp",
-        $cproton_perl::PN_TIMESTAMP,
-        "put_timestamp",
-        "get_timestamp"),
-    FLOAT      => qpid::proton::Mapping->new(
-        "float",
-        $cproton_perl::PN_FLOAT,
-        "put_float",
-        "get_float"),
-    DOUBLE     => qpid::proton::Mapping->new(
-        "double",
-        $cproton_perl::PN_DOUBLE,
-        "put_double",
-        "get_double"),
-    DECIMAL32  => qpid::proton::Mapping->new(
-        "decimal32",
-        $cproton_perl::PN_DECIMAL32,
-        "put_decimal32",
-        "get_decimal32"),
-    DECIMAL64  => qpid::proton::Mapping->new(
-        "decimal64",
-        $cproton_perl::PN_DECIMAL64,
-        "put_decimal64",
-        "get_decimal64"),
-    DECIMAL128 => qpid::proton::Mapping->new(
-        "decimal128",
-        $cproton_perl::PN_DECIMAL128,
-        "put_decimal128",
-        "get_decimal128"),
-    UUID       => qpid::proton::Mapping->new(
-        "uuid",
-        $cproton_perl::PN_UUID,
-        "put_uuid",
-        "get_uuid"),
-    BINARY     => qpid::proton::Mapping->new(
-        "binary",
-        $cproton_perl::PN_BINARY,
-        "put_binary",
-        "get_binary"),
-    STRING     => qpid::proton::Mapping->new(
-        "string",
-        $cproton_perl::PN_STRING,
-        "put_string",
-        "get_string"),
-    SYMBOL     => qpid::proton::Mapping->new(
-        "symbol",
-        $cproton_perl::PN_SYMBOL,
-        "put_symbol",
-        "get_symbol"),
-    ARRAY     => qpid::proton::Mapping->new(
-        "array",
-        $cproton_perl::PN_ARRAY,
-        "put_array",
-        "get_array"),
-    LIST      => qpid::proton::Mapping->new(
-        "list",
-        $cproton_perl::PN_LIST,
-        "put_list_helper",
-        "get_list_helper"),
-    MAP      => qpid::proton::Mapping->new(
-        "map",
-        $cproton_perl::PN_MAP,
-        "put_map_helper",
-        "get_map_helper"),
-};
-
-package qpid::proton::Errors;
-
-use constant {
-    NONE => 0,
-    EOS => $cproton_perl::PN_EOS,
-    ERROR => $cproton_perl::PN_ERR,
-    OVERFLOW => $cproton_perl::PN_OVERFLOW,
-    UNDERFLOW => $cproton_perl::PN_UNDERFLOW,
-    STATE => $cproton_perl::PN_STATE_ERR,
-    ARGUMENT => $cproton_perl::PN_ARG_ERR,
-    TIMEOUT => $cproton_perl::PN_TIMEOUT,
-    INTERRUPTED => $cproton_perl::PN_INTR,
-    INPROGRESS => $cproton_perl::PN_INPROGRESS,
-};
-
-package qpid::proton::Tracker;
-
-use constant {
-    ABORTED => $cproton_perl::PN_STATUS_ABORTED,
-    ACCEPTED => $cproton_perl::PN_STATUS_ACCEPTED,
-    REJECTED => $cproton_perl::PN_STATUS_REJECTED,
-    PENDING => $cproton_perl::PN_STATUS_PENDING,
-    SETTLED => $cproton_perl::PN_STATUS_SETTLED,
-    UNKNOWN => undef,
-};
-
-package qpid::proton::Constants;
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/Data.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Data.pm b/proton-c/bindings/perl/lib/qpid/proton/Data.pm
deleted file mode 100644
index dccf2fc..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/Data.pm
+++ /dev/null
@@ -1,1276 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use Scalar::Util qw(reftype looks_like_number);
-
-=pod
-
-=head1 NAME
-
-qpid::proton::Data
-
-=head1 DESCRIPTION
-
-The B<Data> class provides an interface for decoding, extract, creating and
-encoding arbitrary AMQP data. A B<Data> object contains a tree of AMQP values.
-Leaf nodes in this tree correspond to scalars in the AMQP type system such as
-B<INT> or B<STRING>. Interior nodes in this tree correspond to compound values
-in the AMQP type system such as B<LIST>, B<MAP>, B<ARRAY> or B<DESCRIBED>. The
-root node of the tree is the B<Data> object itself and can have an arbitrary
-number of children.
-
-A B<Data> object maintains the notion of the current sibling node and a current
-parent node. Siblings are ordered within their parent. Values are accessed
-and/or added by using the B<next>, B<prev>, B<enter> and B<exit> methods to
-navigate to the desired location in the tree and using the supplied variety of
-mutator and accessor methods to access or add a value of the desired type.
-
-The mutator methods will always add a value I<after> the current node in the
-tree. If the current node has a next sibling the mutator method will overwrite
-the value on this node. If there is no current node or the current node has no
-next sibling then one will be added. The accessor methods always set the
-add/modified node to the current node. The accessor methods read the value of
-the current node and do not change which node is current.
-
-=cut
-
-package qpid::proton::Data;
-
-=pod
-
-=head1 CONSTRUCTOR
-
-Creates a new instance with the specified capacity.
-
-=over
-
-=item my $data = qpid::proton::Data->new( CAPACITY );
-
-=back
-
-=cut
-
-sub new {
-    my ($class) = @_;
-    my ($self) = {};
-    my $capacity = $_[1] || 16;
-    my $impl = $capacity;
-    $self->{_free} = 0;
-
-    if($capacity) {
-        if (::looks_like_number($capacity)) {
-            $impl = cproton_perl::pn_data($capacity);
-            $self->{_free} = 1;
-        }
-    }
-
-    $self->{_impl} = $impl;
-
-    bless $self, $class;
-    return $self;
-}
-
-sub DESTROY {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_free($impl) if $self->{_free};
-}
-
-=pod
-
-=head1 ACTIONS
-
-Clear all content for the data object.
-
-=over
-
-=item my $data->clear();
-
-=back
-
-=cut
-
-sub clear {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_clear($impl);
-}
-
-
-=pod
-
-=head1 NAVIGATION
-
-The following methods allow for navigating through the nodes in the tree.
-
-=cut
-
-
-=pod
-
-=over
-
-=item $doc->enter;
-
-=item if ($doc->enter()) { do_something_with_children; }
-
-Sets the parent node to the current node and clears the current node.
-
-Clearing the current node sets it I<before> the first child.
-
-=item $doc->exit;
-
-=item if ($doc->exit()) { do_something_with_parent; }
-
-Sets the current node to the parent node, and the parent node to its own parent.
-
-=item $doc->next;
-
-=item $doc->prev;
-
-Moves to the next/previous sibling and returns its type. If there is no next or
-previous sibling then the current node remains unchanged.
-
-=item $doc->rewind;
-
-Clears the current node and sets the parent to the root node.
-
-=back
-
-=cut
-
-sub enter {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_enter($impl);
-}
-
-sub exit {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_exit($impl);
-}
-
-sub rewind {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_rewind($impl);
-}
-
-
-=pod
-
-=over
-
-=item $doc->next;
-
-=item if ($doc->next()) { do_something; }
-
-Advances the current node to its next sibling and returns its type.
-
-If there is no next sibling then the current node remains unchanged and
-B<undef> is returned.
-
-=item $doc->prev;
-
-=item if ($doc->prev()) { do_something; }
-
-Advances the current node to its previous sibling and returns its type.
-
-If there is no previous sibling then the current node remains unchanged and
-undef is returned.
-
-=back
-
-=cut
-
-sub next {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    return cproton_perl::pn_data_next($impl);
-}
-
-sub prev {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    return cproton_perl::pn_data_prev($impl);
-}
-
-
-=pod
-
-=head1 SUPPORTED TYPES
-
-The following methods allow for inserting the various node types into the
-tree.
-
-=head2 NODE TYPE
-
-You can retrieve the type of the current node.
-
-=over
-
-=item $type = $doc->get_type;
-
-=back
-
-=cut
-
-
-sub get_type {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $type = cproton_perl::pn_data_type($impl);
-
-    return qpid::proton::Mapping->find_by_type_value($type);
-}
-
-
-=pod
-
-=head2 SCALAR TYPES
-
-=cut
-
-=pod
-
-=head3 NULL
-
-=over
-
-=item $doc->put_null;
-
-Inserts a null node.
-
-=item $doc->is_null;
-
-Returns true if the current node is null.
-
-=back
-
-=cut
-
-sub put_null() {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_put_null($impl);
-}
-
-sub is_null {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_is_null($impl);
-}
-
-sub check {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $err = $_[1];
-
-    # if we got a null then just exit
-    return $err if !defined($err);
-
-    if($err < 0) {
-        die DataException->new("[$err]: " . cproton_perl::pn_data_error($impl));
-    } else {
-        return $err;
-    }
-}
-
-=pod
-
-=head3 BOOL
-
-Handles a boolean (B<true>/B<false>) node.
-
-=over
-
-=item $doc->put_bool( VALUE );
-
-=item $doc->get_bool;
-
-=back
-
-=cut
-
-sub put_bool {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1] || 0;
-
-    cproton_perl::pn_data_put_bool($impl, $value);
-}
-
-sub get_bool {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_bool($impl);
-}
-
-=pod
-
-=head3 UBYTE
-
-Handles an unsigned byte node.
-
-=over
-
-=item $data->put_ubyte( VALUE );
-
-=item $data->get_ubyte;
-
-=back
-
-=cut
-
-sub put_ubyte {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value  = $_[1];
-
-    die "ubyte must be defined" if !defined($value);
-    die "ubyte must be non-negative" if $value < 0;
-
-    check(cproton_perl::pn_data_put_ubyte($impl, int($value)));
-}
-
-sub get_ubyte {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_ubyte($impl);
-}
-
-=pod
-
-=head3 BYTE
-
-Handles a signed byte node.
-
-=over
-
-=item $data->put_byte( VALUE );
-
-=item $data->get_byte;
-
-=back
-
-=cut
-
-sub put_byte {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "byte must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_byte($impl, int($value)));
-}
-
-sub get_byte {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_byte($impl);
-}
-
-=pod
-
-=head3 USHORT
-
-Handles an unsigned short node.
-
-=over
-
-=item $data->put_ushort( VALUE );
-
-=item $data->get_ushort;
-
-=back
-
-=cut
-
-sub put_ushort {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "ushort must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_ushort($impl, int($value)));
-}
-
-sub get_ushort {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_ushort($impl);
-}
-
-=pod
-
-=head3 SHORT
-
-Handles a signed short node.
-
-=over
-
-=item $data->put_short( VALUE );
-
-=item $data->get_short;
-
-=back
-
-=cut
-
-sub put_short {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "short must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_short($impl, int($value)));
-}
-
-sub get_short {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_short($impl);
-}
-
-=pod
-
-=head3 UINT
-
-Handles an unsigned integer node.
-
-=over
-
-=item $data->put_uint( VALUE );
-
-=item $data->get_uint;
-
-=back
-
-=cut
-
-sub put_uint {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "uint must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_uint($impl, int($value)));
-}
-
-sub get_uint {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_uint($impl);
-}
-
-=pod
-
-=head3 INT
-
-Handles an integer node.
-
-=over
-
-=item $data->put_int( VALUE );
-
-=item $data->get_int;
-
-=back
-
-=cut
-
-sub put_int {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "int must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_int($impl, int($value)));
-}
-
-sub get_int {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_int($impl);
-}
-
-=pod
-
-=head3 CHAR
-
-Handles a character node.
-
-=over
-
-=item $data->put_char( VALUE );
-
-=item $data->get_char;
-
-=back
-
-=cut
-
-sub put_char {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "char must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_char($impl, int($value)));
-}
-
-sub get_char {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_char($impl);
-}
-
-=pod
-
-=head3 ULONG
-
-Handles an unsigned long node.
-
-=over
-
-=item $data->set_ulong( VALUE );
-
-=item $data->get_ulong;
-
-=back
-
-=cut
-
-sub put_ulong {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "ulong must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_ulong($impl, $value));
-}
-
-sub get_ulong {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_ulong($impl);
-}
-
-=pod
-
-=head3 LONG
-
-Handles a signed long node.
-
-=over
-
-=item $data->put_long( VALUE );
-
-=item $data->get_long;
-
-=back
-
-=cut
-
-sub put_long {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "long must be defined" if !defined($value);
-
-    cproton_perl::pn_data_put_long($impl, int($value));
-}
-
-sub get_long {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_long($impl);
-}
-
-=pod
-
-=head3 TIMESTAMP
-
-Handles a timestamp node.
-
-=over
-
-=item $data->put_timestamp( VALUE );
-
-=item $data->get_timestamp;
-
-=back
-
-=cut
-
-sub put_timestamp {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "timestamp must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_timestamp($impl, int($value)));
-}
-
-sub get_timestamp {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_timestamp($impl);
-}
-
-=pod
-
-=head3 FLOAT
-
-Handles a floating point node.
-
-=over
-
-=item $data->put_float( VALUE );
-
-=item $data->get_float;
-
-=back
-
-=cut
-
-sub put_float {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "float must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_float($impl, $value));
-}
-
-sub get_float {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    my $value = cproton_perl::pn_data_get_float($impl);
-
-    cproton_perl::pn_data_get_float($impl);
-}
-
-=pod
-
-=head3 DOUBLE
-
-Handles a double node.
-
-=over
-
-=item $data->put_double( VALUE );
-
-=item $data->get_double;
-
-=back
-
-=cut
-
-sub put_double {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "double must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_double($impl, $value));
-}
-
-sub get_double {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_double($impl);
-}
-
-=pod
-
-=head3 DECIMAL32
-
-Handles a decimal32 node.
-
-=over
-
-=item $data->put_decimal32( VALUE );
-
-=item $data->get_decimal32;
-
-=back
-
-=cut
-
-sub put_decimal32 {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "decimal32 must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_decimal32($impl, $value));
-}
-
-sub get_decimal32 {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_decimal32($impl);
-}
-
-=pod
-
-=head3 DECIMAL64
-
-Handles a decimal64 node.
-
-=over
-
-=item $data->put_decimal64( VALUE );
-
-=item $data->get_decimal64;
-
-=back
-
-=cut
-
-sub put_decimal64 {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "decimal64 must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_decimal64($impl, $value));
-}
-
-sub get_decimal64 {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_decimal64($impl);
-}
-
-=pod
-
-=head3 DECIMAL128
-
-Handles a decimal128 node.
-
-=over
-
-=item $data->put_decimal128( VALUE );
-
-=item $data->get_decimal128;
-
-=back
-
-=cut
-
-sub put_decimal128 {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "decimal128 must be defined" if !defined($value);
-
-    my @binary = split //, pack("H[32]", sprintf("%032x", $value));
-    my @bytes = ();
-
-    foreach $char (@binary) {
-        push(@bytes, ord($char));
-    }
-    check(cproton_perl::pn_data_put_decimal128($impl, \@bytes));
-}
-
-sub get_decimal128 {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    my $bytes = cproton_perl::pn_data_get_decimal128($impl);
-    my $value = hex(unpack("H[32]", $bytes));
-
-    return $value;
-}
-
-=pod
-
-=head3 UUID
-
-Handles setting a UUID value. UUID values can be set using a 128-bit integer
-value or else a well-formed string.
-
-=over
-
-=item $data->put_uuid( VALUE );
-
-=item $data->get_uuid;
-
-=back
-
-=cut
-
-use Data::Dumper;
-
-sub put_uuid {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "uuid must be defined" if !defined($value);
-
-    if($value =~ /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/) {
-        $value =~ s/-//g;
-        my @binary = split //, pack("H[32]", $value);
-        my @bytes = ();
-
-        foreach $char (@binary) {
-            push(@bytes, ord($char));
-         }
-
-        check(cproton_perl::pn_data_put_uuid($impl, \@bytes));
-    } else {
-        die "uuid is malformed: $value";
-    }
-}
-
-sub get_uuid {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    my $bytes = cproton_perl::pn_data_get_uuid($impl);
-
-    my $value = unpack("H[32]", $bytes);
-    $value = substr($value, 0, 8) . "-" .
-        substr($value, 8, 4) . "-" .
-        substr($value, 12, 4) . "-" .
-        substr($value, 16, 4) . "-" .
-        substr($value, 20);
-
-    return $value;
-}
-
-=pod
-
-=head3 BINARY
-
-Handles a binary data node.
-
-=over
-
-=item $data->put_binary( VALUE );
-
-=item $data->get_binary;
-
-=back
-
-=cut
-
-sub put_binary {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "binary must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_binary($impl, $value)) if defined($value);
-}
-
-sub get_binary {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_binary($impl);
-}
-
-=pod
-
-=head3 STRING
-
-Handles a string node.
-
-=over
-
-=item $data->put_string( VALUE );
-
-=item $data->get_string;
-
-=back
-
-=cut
-
-sub put_string {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "string must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_string($impl, $value));
-}
-
-sub get_string {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_string($impl);
-}
-
-=pod
-
-=head3 SYMBOL
-
-Handles a symbol value.
-
-=over
-
-=item $data->put_symbol( VALUE );
-
-=item $data->get_symbol;
-
-=back
-
-=cut
-
-sub put_symbol {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $value = $_[1];
-
-    die "symbol must be defined" if !defined($value);
-
-    check(cproton_perl::pn_data_put_symbol($impl, $value));
-}
-
-sub get_symbol {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_symbol($impl);
-}
-
-=pod
-
-=head3 DESCRIBED VALUE
-
-A described node has two children: the descriptor and the value.
-
-These are specified by entering the node and putting the
-described values.
-
-=over
-
-=item $data->put_described;
-
-=item $data->is_described;
-
-=back
-
-=cut
-
-sub put_described {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_put_described($impl);
-}
-
-sub is_described {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_is_described($impl);
-}
-
-=pod
-
-=head3 ARRAYS
-
-Puts an array value.
-
-Elements may be filled by entering the array node and putting the element values.
-The values must all be of the specified array element type.
-
-If an array is B<described> then the first child value of the array is the
-descriptor and may be of any type.
-
-=over
-
-B<DESCRIBED> specifies whether the array is described or not.
-
-B<TYPE> specifies the type of elements in the array.
-
-=back
-
-=over
-
-=item $data->put_array( DESCRIBED, TYPE )
-
-=item my ($count, $described, $array_type) = item $data->get_array
-
-=back
-
-=cut
-
-sub put_array {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-    my $described = $_[1] || 0;
-    my $array_type = $_[2];
-
-    die "array type must be defined" if !defined($array_type);
-
-    check(cproton_perl::pn_data_put_array($impl,
-                                          $described,
-                                          $array_type->get_type_value));
-}
-
-sub get_array {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    my $count = cproton_perl::pn_data_get_array($impl);
-    my $described = cproton_perl::pn_data_is_array_described($impl);
-    my $type_value = cproton_perl::pn_data_get_array_type($impl);
-
-    $type_value = qpid::proton::Mapping->find_by_type_value($type_value);
-
-    return ($count, $described, $type_value);
-}
-
-sub get_array_type {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_array_type($impl);
-}
-
-=pod
-
-=head3 LIST
-
-Puts a list value.
-
-Elements may be filled in by entering the list and putting element values.
-
-=over
-
-=item $data->put_list;
-
-=item my $count = $data->get_list
-
-=back
-
-=cut
-
-sub put_list {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    check(cproton_perl::pn_data_put_list($impl));
-}
-
-sub get_list {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_list($impl);
-}
-
-=pod
-
-head3 MAP
-
-Puts a map value.
-
-Elements may be filled by entering the map node and putting alternating
-key/value pairs.
-
-=over
-
-=item $data->put_map;
-
-=item my $count = $data->get_map;
-
-=back
-
-=cut
-
-sub put_map {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    check(cproton_perl::pn_data_put_map($impl));
-}
-
-sub get_map {
-    my ($self) = @_;
-    my $impl = $self->{_impl};
-
-    cproton_perl::pn_data_get_map($impl);
-}
-
-sub put_list_helper {
-    my ($self) = @_;
-    my ($array) = $_[1];
-
-    $self->put_list;
-    $self->enter;
-
-    for my $value (@{$array}) {
-        if (qpid::proton::utils::is_num($value)) {
-            if (qpid::proton::utils::is_float($value)) {
-                $self->put_float($value);
-            } else {
-                $self->put_int($value);
-            }
-        } elsif (!defined($value)) {
-            $self->put_null;
-        } elsif ($value eq '') {
-            $self->put_string($value);
-        } elsif (ref($value) eq 'HASH') {
-            $self->put_map_helper($value);
-        } elsif (ref($value) eq 'ARRAY') {
-            $self->put_list_helper($value);
-        } else {
-            $self->put_string($value);
-        }
-    }
-
-    $self->exit;
-}
-
-sub get_list_helper {
-    my ($self) = @_;
-    my $result = [];
-    my $type = $self->get_type;
-
-    if ($cproton_perl::PN_LIST == $type->get_type_value) {
-        my $size = $self->get_list;
-
-        $self->enter;
-
-        for(my $count = 0; $count < $size; $count++) {
-            if ($self->next) {
-                my $value_type = $self->get_type;
-                my $value = $value_type->get($self);
-
-                push(@{$result}, $value);
-            }
-        }
-
-        $self->exit;
-    }
-
-    return $result;
-}
-
-sub put_map_helper {
-    my ($self) = @_;
-    my $hash = $_[1];
-
-    $self->put_map;
-    $self->enter;
-
-    foreach(keys %{$hash}) {
-        my $key = $_;
-        my $value = $hash->{$key};
-
-        my $keytype = ::reftype($key);
-        my $valtype = ::reftype($value);
-
-        if ($keytype eq ARRAY) {
-            $self->put_list_helper($key);
-        } elsif ($keytype eq "HASH") {
-            $self->put_map_helper($key);
-        } else {
-            $self->put_string("$key");
-        }
-
-        if (::reftype($value) eq HASH) {
-            $self->put_map_helper($value);
-        } elsif (::reftype($value) eq ARRAY) {
-            $self->put_list_helper($value);
-        } else {
-            $self->put_string("$value");
-        }
-    }
-
-    $self->exit;
-}
-
-sub get_map_helper {
-    my ($self) = @_;
-    my $result = {};
-    my $type = $self->get_type;
-
-    if ($cproton_perl::PN_MAP == $type->get_type_value) {
-        my $size = $self->get_map;
-
-        $self->enter;
-
-        for($count = 0; $count < $size; $count++) {
-            if($self->next) {
-                my $key = $self->get_type->get($self);
-                if($self->next) {
-                    my $value = $self->get_type->get($self);
-                    $result->{$key} = $value;
-                }
-            }
-        }
-
-        $self->exit;
-
-    }
-
-    return $result;
-}
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/Errors.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Errors.pm b/proton-c/bindings/perl/lib/qpid/proton/Errors.pm
deleted file mode 100644
index 29f334b..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/Errors.pm
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use strict;
-use warnings;
-use cproton_perl;
-
-package qpid::proton::Errors;
-
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/ExceptionHandling.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/ExceptionHandling.pm b/proton-c/bindings/perl/lib/qpid/proton/ExceptionHandling.pm
deleted file mode 100644
index 00cdab1..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/ExceptionHandling.pm
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use strict;
-use warnings;
-use cproton_perl;
-use Switch;
-
-use feature qw(switch);
-
-package qpid::proton;
-
-sub check_for_error {
-    my $rc = $_[0];
-
-    switch($rc) {
-            case 'qpid::proton::Errors::NONE' {next;}
-            case 'qpid::proton::Errors::EOS' {next;}
-            case 'qpid::proton::Errors::ERROR' {next;}
-            case 'qpid::proton::Errors::OVERFLOW' {next;}
-            case 'qpid::proton::Errors::UNDERFLOW' {next;}
-            case 'qpid::proton::Errors::STATE' {next;}
-            case 'qpid::proton::Errors::ARGUMENT' {next;}
-            case 'qpid::proton::Errors::TIMEOUT' {next;}
-            case 'qpid::proton::Errors::INTERRUPTED' {
-                my $source = $_[1];
-                my $trace = Devel::StackTrace->new;
-
-                print $trace->as_string;
-                die "ERROR[$rc]" . $source->get_error() . "\n";
-            }
-    }
-}
-
-package qpid::proton::ExceptionHandling;
-
-1;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/perl/lib/qpid/proton/Mapping.pm
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Mapping.pm b/proton-c/bindings/perl/lib/qpid/proton/Mapping.pm
deleted file mode 100644
index 924774e..0000000
--- a/proton-c/bindings/perl/lib/qpid/proton/Mapping.pm
+++ /dev/null
@@ -1,121 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-use qpid_proton;
-
-package qpid::proton::Mapping;
-
-our %by_type_value = ();
-
-sub new {
-    my ($class) = @_;
-    my ($self) = {};
-
-    my $name       = $_[1];
-    my $type_value = $_[2];
-    my $set_method = $_[3];
-    my $get_method = $_[4];
-
-    $self->{_name}       = $name;
-    $self->{_type_value} = $type_value;
-    $self->{_set_method} = $set_method;
-    $self->{_get_method} = $get_method;
-
-    bless $self, $class;
-
-    $qpid::proton::Mapping::by_type_value{$type_value} = $self;
-
-    return $self;
-}
-
-use overload (
-    '""' => \& stringify,
-    '==' => \& equals,
-    );
-
-sub stringify {
-    my ($self) = @_;
-    return $self->{_name};
-}
-
-sub equals {
-    my ($self) = @_;
-    my $that = $_[1];
-
-    return ($self->get_type_value == $that->get_type_value);
-}
-
-sub getter_method {
-    my ($self) = @_;
-
-    return $self->{_get_method};
-}
-
-sub get_type_value {
-    my ($self) = @_;
-    my $type_value = $self->{_type_value};
-
-    return $self->{_type_value};
-}
-
-=pod
-
-=head1 MARSHALLING DATA
-
-I<Mapping> can move data automatically into and out of a I<Data> object.
-
-=over
-
-=item $mapping->put( [DATA], [VALUE] );
-
-=item $mapping->get( [DATA] );
-
-=back
-
-=cut
-
-sub put {
-    my ($self) = @_;
-    my $data = $_[1];
-    my $value = $_[2];
-    my $setter_method = $self->{_set_method};
-
-    $data->$setter_method($value);
-}
-
-sub get {
-    my ($self) = @_;
-    my $data = $_[1];
-    my $getter_method = $self->{_get_method};
-
-    my $result = $data->$getter_method;
-
-    return $result;
-}
-
-sub find_by_type_value {
-    my $type_value = $_[1];
-
-    return undef if !defined($type_value);
-
-    return $qpid::proton::Mapping::by_type_value{$type_value};
-}
-
-1;
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Posted by jr...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/ruby/lib/messenger/subscription.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/messenger/subscription.rb b/proton-c/bindings/ruby/lib/messenger/subscription.rb
deleted file mode 100644
index 49fb50e..0000000
--- a/proton-c/bindings/ruby/lib/messenger/subscription.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-module Qpid::Proton::Messenger
-
-  # A +Subscription+ is an opaque object for working with a +Messenger+'s
-  # subscriptions.
-  #
-  class Subscription
-
-    def initialize(impl) # :nodoc:
-      @impl = impl
-    end
-
-    def impl # :nodoc:
-      @impl
-    end
-
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/ruby/lib/messenger/tracker.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/messenger/tracker.rb b/proton-c/bindings/ruby/lib/messenger/tracker.rb
deleted file mode 100644
index 5fb98e5..0000000
--- a/proton-c/bindings/ruby/lib/messenger/tracker.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-module Qpid::Proton::Messenger
-
-  # A +Tracker+ is used to track the disposition of a +Message+.
-  #
-  class Tracker
-
-    CUMULATIVE = Cproton::PN_CUMULATIVE
-
-    def initialize(impl) # :nodoc:
-      @impl = impl
-    end
-
-    def impl # :nodoc:
-      @impl
-    end
-
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/ruby/lib/messenger/tracker_status.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/messenger/tracker_status.rb b/proton-c/bindings/ruby/lib/messenger/tracker_status.rb
deleted file mode 100644
index ab77683..0000000
--- a/proton-c/bindings/ruby/lib/messenger/tracker_status.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-module Qpid::Proton::Messenger
-
-  # TrackerStatus contains symbols that represent the status value for a
-  # Tracker.
-  #
-  class TrackerStatus
-
-    def initialize value, name # :nodoc:
-      @value = value
-      @name = name
-    end
-
-    def value # :nodoc:
-      @value
-    end
-
-    def to_s # :nodoc:
-      @name.to_s
-    end
-
-    def self.by_name(name) # :nodoc:
-      @by_name[name.to_sym] unless name.nil?
-    end
-
-    def self.by_value(value) # :nodoc:
-      @by_value[value] unless value.nil?
-    end
-
-    private
-
-    def self.add_item(key, value) # :nodoc:
-      @by_name ||= {}
-      @by_name[key] = TrackerStatus.new value, key
-      @by_value ||= {}
-      @by_value[value] = @by_name[key]
-    end
-
-    def self.const_missing(key) # :nodoc:
-      @by_name[key]
-    end
-
-    self.add_item :UNKNOWN,  Cproton::PN_STATUS_UNKNOWN
-    self.add_item :PENDING,  Cproton::PN_STATUS_PENDING
-    self.add_item :ACCEPTED, Cproton::PN_STATUS_ACCEPTED
-    self.add_item :REJECTED, Cproton::PN_STATUS_REJECTED
-    self.add_item :SETTLED,  Cproton::PN_STATUS_SETTLED
-
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/ruby/lib/qpid_proton.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/qpid_proton.rb b/proton-c/bindings/ruby/lib/qpid_proton.rb
index 79c8cb7..18f3ddd 100644
--- a/proton-c/bindings/ruby/lib/qpid_proton.rb
+++ b/proton-c/bindings/ruby/lib/qpid_proton.rb
@@ -93,10 +93,3 @@ require "core/container"
 require "handler/reactor_messaging_adapter"
 require "handler/messaging_handler" # Keep original name for compatibility
 require "reactor/container"
-
-# DEPRECATED Messenger API classes
-require "messenger/subscription"
-require "messenger/tracker_status"
-require "messenger/tracker"
-require "messenger/messenger"
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/ruby/tests/old_examples/old_example_test.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/tests/old_examples/old_example_test.rb b/proton-c/bindings/ruby/tests/old_examples/old_example_test.rb
index b6700c3..a3f6ad1 100755
--- a/proton-c/bindings/ruby/tests/old_examples/old_example_test.rb
+++ b/proton-c/bindings/ruby/tests/old_examples/old_example_test.rb
@@ -52,14 +52,6 @@ class OldExampleTest < MiniTest::Test
     assert_output want, ["simple_recv.rb", "-a", make_url($port, __method__)]
   end
 
-  def test_smoke
-    url = "127.0.0.1:#{unused_port}"
-    recv = run_script("recv.rb", "~#{url}")
-    recv.readline               # Wait for "Listening"
-    assert_output("Status: ACCEPTED", ["send.rb", url])
-    assert_equal "Got: Hello World!", recv.read.strip
-  end
-
   def test_client_server
     want =  <<EOS
 -> Twas brillig, and the slithy toves

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/ruby/tests/old_examples/recv.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/tests/old_examples/recv.rb b/proton-c/bindings/ruby/tests/old_examples/recv.rb
deleted file mode 100755
index a29f123..0000000
--- a/proton-c/bindings/ruby/tests/old_examples/recv.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'qpid_proton.rb'
-
-messenger = Qpid::Proton::Messenger::Messenger.new()
-messenger.incoming_window = 1
-message = Qpid::Proton::Message.new()
-
-address = ARGV[0]
-if not address then
-  address = "~0.0.0.0"
-end
-messenger.subscribe(address)
-
-messenger.start()
-
-puts "Listening"; STDOUT.flush
-messenger.receive()
-messenger.get(message)
-puts "Got: #{message.body}"
-messenger.accept()
-
-messenger.stop()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/ruby/tests/old_examples/send.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/tests/old_examples/send.rb b/proton-c/bindings/ruby/tests/old_examples/send.rb
deleted file mode 100755
index 73016d0..0000000
--- a/proton-c/bindings/ruby/tests/old_examples/send.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'qpid_proton.rb'
-
-messenger = Qpid::Proton::Messenger::Messenger.new()
-messenger.outgoing_window = 10
-message = Qpid::Proton::Message.new()
-
-address = ARGV[0]
-if not address then
-  address = "0.0.0.0"
-end
-
-message.address = address
-message.body = "Hello World!"
-
-messenger.start()
-tracker = messenger.put(message)
-messenger.send()
-print "Status: ", messenger.status(tracker), "\n"
-messenger.stop()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/javascript/codec.js
----------------------------------------------------------------------
diff --git a/tests/javascript/codec.js b/tests/javascript/codec.js
deleted file mode 100755
index 5110f4f..0000000
--- a/tests/javascript/codec.js
+++ /dev/null
@@ -1,569 +0,0 @@
-#!/usr/bin/env node
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/**
- * This is a fairly literal JavaScript port of codec.py used to unit test the
- * proton.Data wrapper class. This suite of tests is actually testing the low
- * level implementation methods used to access the AMQP type system and in
- * practice most normal users wouldn't need to call these directly, rather users
- * should simply use the putObject() and getObject() methods.
- */
-
-// Check if the environment is Node.js and if not log an error and exit.
-if (typeof process === 'object' && typeof require === 'function') {
-    var unittest = require("./unittest.js");
-    var assert = require("assert");
-
-    // Increase the virtual heap available to the emscripten compiled C runtime.
-    // This allows us to test a really big string.
-    PROTON_TOTAL_MEMORY = 140000000;
-    PROTON_TOTAL_STACK = 25000000; // Needs to be bigger than the biggest string.
-    var proton = require("qpid-proton-messenger");
-
-    // Extend TestCase by creating a prototype instance and adding test methods as properties.
-    var DataTest = new unittest.TestCase();
-
-    DataTest.setUp = function() {
-        this.data = new proton.Data();
-    };
-
-    DataTest.tearDown = function() {
-        this.data.free();
-        this.data = null;
-    };
-    
-    DataTest.testTopLevelNext = function() {
-        console.log("testTopLevelNext");
-        assert(this.data.next() === null);
-        this.data.putNULL();
-        this.data.putBOOL(false);
-        this.data.putINT(0);
-        assert(this.data.next() === null);
-        this.data.rewind();
-        assert(this.data.next() === proton.Data.NULL);
-        assert(this.data.next() === proton.Data.BOOL);
-        assert(this.data.next() === proton.Data.INT);
-        assert(this.data.next() === null);
-        console.log("OK\n");
-    };
-    
-    DataTest.testNestedNext = function() {
-        console.log("testNestedNext");
-        assert(this.data.next() === null);
-        this.data.putNULL();
-        assert(this.data.next() === null);
-        this.data.putLISTNODE();
-        assert(this.data.next() === null);
-        this.data.putBOOL(false);
-        assert(this.data.next() === null);
-        this.data.rewind();
-        assert(this.data.next() === proton.Data.NULL);
-        assert(this.data.next() === proton.Data.LIST);
-        this.data.enter();
-        assert(this.data.next() === null);
-        this.data.putUBYTE(0);
-        assert(this.data.next() === null);
-        this.data.putUINT(0);
-        assert(this.data.next() === null);
-        this.data.putINT(0);
-        assert(this.data.next() === null);
-        this.data.exit();
-        assert(this.data.next() === proton.Data.BOOL);
-        assert(this.data.next() === null);
-    
-        this.data.rewind();
-        assert(this.data.next() === proton.Data.NULL);
-        assert(this.data.next() === proton.Data.LIST);
-        assert(this.data.enter());
-        assert(this.data.next() === proton.Data.UBYTE);
-        assert(this.data.next() === proton.Data.UINT);
-        assert(this.data.next() === proton.Data.INT);
-        assert(this.data.next() === null);
-        assert(this.data.exit());
-        assert(this.data.next() === proton.Data.BOOL);
-        assert(this.data.next() === null);
-        console.log("OK\n");
-    };
-    
-    DataTest.testEnterExit = function() {
-        console.log("testEnterExit");
-        assert(this.data.next() === null);
-        assert(!this.data.enter());
-        this.data.putLISTNODE();
-        assert(this.data.enter());
-        assert(this.data.next() === null);
-        this.data.putLISTNODE();
-        assert(this.data.enter());
-        this.data.putLISTNODE();
-        assert(this.data.enter());
-        assert(this.data.exit());
-        assert(this.data.getLISTNODE() === 0);
-        assert(this.data.exit());
-        assert(this.data.getLISTNODE() === 1);
-        assert(this.data.exit());
-        assert(this.data.getLISTNODE() === 1);
-        assert(!this.data.exit());
-        assert(this.data.getLISTNODE() === 1);
-        assert(this.data.next() === null);
-    
-        this.data.rewind();
-        assert(this.data.next() === proton.Data.LIST);
-        assert(this.data.getLISTNODE() === 1);
-        assert(this.data.enter());
-        assert(this.data.next() === proton.Data.LIST);
-        assert(this.data.getLISTNODE() === 1);
-        assert(this.data.enter());
-        assert(this.data.next() === proton.Data.LIST);
-        assert(this.data.getLISTNODE() === 0);
-        assert(this.data.enter());
-        assert(this.data.next() === null);
-        assert(this.data.exit());
-        assert(this.data.getLISTNODE() === 0);
-        assert(this.data.exit());
-        assert(this.data.getLISTNODE() === 1);
-        assert(this.data.exit());
-        assert(this.data.getLISTNODE() === 1);
-        assert(!this.data.exit());
-        console.log("OK\n");
-    };
-    
-    /**
-     * This tests the "low level" putARRAYNODE/getARRAYNODE methods.
-     * In general though applications would create a proton.Data.Array and use the
-     * higher level putARRAY/getARRAY
-     */
-    DataTest._testArray = function(dtype, descriptor, atype, values) {
-        var values = Array.prototype.slice.apply(arguments, [3]);
-        dtype = (dtype == null) ? null : dtype.toUpperCase();
-        atype = atype.toUpperCase();
-    
-        // Create an array node, enter it and put the descriptor (if present) and values.
-        this.data.putARRAYNODE(dtype != null, proton.Data[atype]);
-        this.data.enter();
-        if (dtype != null) {
-            var putter = 'put' + dtype;
-            this.data[putter](descriptor);
-        }
-        var putter = 'put' + atype;
-        for (var i = 0; i < values.length; i++) {
-            this.data[putter](values[i]);
-        }
-        this.data.exit();
-    
-        // Check that we did indeed add an Array node
-        this.data.rewind();
-        assert(this.data.next() === proton.Data.ARRAY);
-    
-        // Get the count, described and type metadata from the array node and compare
-        // with the values we passed to putARRAYNODE.
-        var metadata = this.data.getARRAYNODE();
-        var count = metadata.count;
-        var described = metadata.described;
-        var type = metadata.type;
-    
-        assert(count === values.length);
-        if (dtype == null) {
-            assert(described === false);
-        } else {
-            assert(described === true);
-        }
-        assert(type === proton.Data[atype]);
-    
-        // Enter the array node and compare the descriptor and values with those that
-        // we put into the array.
-        assert(this.data.enter());
-        if (described) {
-            assert(this.data.next() === proton.Data[dtype]);
-            var getter = 'get' + dtype;
-            var gotten = this.data[getter]();
-            assert(gotten.toString() === descriptor.toString());
-        }
-        var getter = 'get' + atype;
-        for (var i = 0; i < values.length; i++) {
-            assert(this.data.next() === proton.Data[atype]);
-            var gotten = this.data[getter]();
-            assert(gotten.toString() === values[i].toString());
-        }
-        assert(this.data.next() === null);
-        assert(this.data.exit());
-    };
-    
-    DataTest.testStringArray = function() {
-        console.log("testStringArray");
-        this._testArray(null, null, "string", "one", "two", "three");
-    
-        // Now try using the proton.Data.Array class.
-        this.data.clear();
-        var put = new proton.Data.Array("STRING", ["four", "five", "six"]);
-        this.data.putARRAY(put);
-        var get = this.data.getARRAY();
-        assert(get.equals(put));
-        console.log("OK\n");
-    };
-    
-    DataTest.testDescribedStringArray = function() {
-        console.log("testDescribedStringArray");
-        this._testArray("symbol", "url", "string", "one", "two", "three");
-    
-        // Now try using the proton.Data.Array class.
-        this.data.clear();
-        var put = new proton.Data.Array("STRING", ["four", "five", "six"], new proton.Data.Symbol("url"));
-        this.data.putARRAY(put);
-        var get = this.data.getARRAY();
-        assert(get.equals(put));
-        console.log("OK\n");
-    };
-    
-    DataTest.testIntArray = function() {
-        console.log("testIntArray");
-        this._testArray(null, null, "int", 1, 2, 3);
-    
-        // Now try using the proton.Data.Array class.
-        this.data.clear();
-        var put = new proton.Data.Array("INT", [4, 5, 6]);
-        this.data.putARRAY(put);
-        var get = this.data.getARRAY();
-        assert(get.equals(put));
-        console.log("OK\n");
-    };
-    
-    DataTest.testUUIDArray = function() {
-        console.log("testUUIDArray");
-        this._testArray(null, null, "uuid", new proton.Data.Uuid(), new proton.Data.Uuid(), new proton.Data.Uuid());
-    
-        // Now try using the proton.Data.Array class.
-        this.data.clear();
-        var put = new proton.Data.Array("UUID", [new proton.Data.Uuid(), new proton.Data.Uuid(), new proton.Data.Uuid()]);
-        this.data.putARRAY(put);
-        var get = this.data.getARRAY();
-        assert(get.equals(put));
-        console.log("OK\n");
-    };
-
-    DataTest.testEmptyArray = function() {
-        console.log("testEmptyArray");
-        this._testArray(null, null, "null");
-
-        // Now try using the proton.Data.Array class.
-        this.data.clear();
-        var put = new proton.Data.Array();
-        this.data.putARRAY(put);
-        var get = this.data.getARRAY();
-        assert(get.equals(put));
-        console.log("OK\n");
-    };
-
-    DataTest.testDescribedEmptyArray = function() {
-        console.log("testDescribedEmptyArray");
-        this._testArray("long", 0, "null");
-    
-        // Now try using the proton.Data.Array class.
-        this.data.clear();
-        var put = new proton.Data.Array((0).long());
-        this.data.putARRAY(put);
-        var get = this.data.getARRAY();
-        assert(get.equals(put));
-        console.log("OK\n");
-    };  
-
-    DataTest._test = function(dtype, values) {
-        var values = Array.prototype.slice.apply(arguments, [1]);
-        var lastValue = values[values.length - 1];
-
-        // Default equality function. Note that we use valueOf because some of the
-        // types we are trying to compare (Symbol, Timestamp, Uuid etc.) are object
-        // types and we want to compare their value not whether they are the same object.
-        var eq = function(x, y) {return x.valueOf() === y.valueOf();};
-    
-        if (typeof lastValue === 'function') {
-            eq = values.pop();
-        }
-    
-        dtype = dtype.toUpperCase();
-        var ntype = proton.Data[dtype];
-        var putter = 'put' + dtype;
-        var getter = 'get' + dtype;
-    
-        for (var i = 0; i < values.length; i++) {
-            var v = values[i];
-            /*
-             * Replace the array element with its value. We do this to make testing
-             * simpler for Binary elements. In the case of Binary putBINARY "consumes"
-             * the data, in other words ownership of the underlying raw data transfers
-             * to the Data object so the v object becomes "empty" after calling the
-             * putter. Calling its valueOf() happens to call its toString() which
-             * provides a stringified version of the Binary whilst also working for
-             * the other data types we want to test too.
-             */
-            values[i] = v.valueOf();
-            this.data[putter](v);
-            var gotten = this.data[getter]();
-            assert(eq(gotten, values[i]));
-        }
-    
-        this.data.rewind();
-    
-        for (var i = 0; i < values.length; i++) {
-            var v = values[i];
-            var vtype = this.data.next();
-            assert(vtype === ntype);
-            var gotten = this.data[getter]();
-            assert(eq(gotten, v));
-        }
-    
-        // Test encode and decode methods.
-        var encoded = this.data.encode();
-        var copy = new proton.Data();
-        while (encoded) {
-            encoded = copy.decode(encoded);
-        }
-        copy.rewind();
-    
-        for (var i = 0; i < values.length; i++) {
-            var v = values[i];
-            var vtype = copy.next();
-            assert(vtype === ntype);
-            var gotten = copy[getter]();
-            assert(eq(gotten, v));
-        }
-        copy.free();
-    };  
-    
-    DataTest.testInt = function() {
-        console.log("testInt");
-        this._test("int", 1, 2, 3, -1, -2, -3);
-        console.log("OK\n");
-    
-    };  
-
-    DataTest.testString = function() {
-        console.log("testString");
-        this._test("string", "one", "two", "three", "this is a test", "");
-        console.log("OK\n");
-    };  
-
-    DataTest.testBigString = function() {
-        // Try a 2MB string, this is about as big as we can cope with using the default
-        // emscripten heap size.
-        console.log("testBigString");
-        var data = "";
-        for (var i = 0; i < 2000000; i++) {
-            data += "*";
-        }
-        var string = "start\n" + data + "\nfinish\n";
-        this._test("string", string);
-        console.log("OK\n");
-    };  
-
-/* TODO - currently emscripten isn't respecting Module['TOTAL_STACK'] so setting PROTON_TOTAL_STACK doesn't actually increase the stack size.
-    DataTest.testReallyBigString = function() {
-        // Try a 20MB string, this needs a bigger emscripten heap size and more stack
-        // as the default stack is 5MB and strings are allocated on the stack.
-        console.log("testReallyBigString");
-        var data = "";
-        for (var i = 0; i < 20000000; i++) {
-            data += "*";
-        }
-        var string = "start\n" + data + "\nfinish\n";
-        this._test("string", string);
-        console.log("OK\n");
-    };
-*/
-
-    DataTest.testFloat = function() {
-        console.log("testFloat");
-        // We have to use a special comparison here because JavaScript internally
-        // only uses doubles and converting between floats and doubles is imprecise.
-        this._test("float", 0, 1, 2, 3, 0.1, 0.2, 0.3, -1, -2, -3, -0.1, -0.2, -0.3,
-                   function(x, y) {return (x - y < 0.000001);});
-        console.log("OK\n");
-    };  
-
-    DataTest.testDouble = function() {
-        console.log("testDouble");
-        this._test("double", 0, 1, 2, 3, 0.1, 0.2, 0.3, -1, -2, -3, -0.1, -0.2, -0.3);
-        console.log("OK\n");
-    };  
-
-    DataTest.testBinary = function() {
-        console.log("testBinary");
-        this._test("binary", new proton.Data.Binary(["t".char(), "h".char(), "i".char(), "s".char()]),
-                   new proton.Data.Binary("is"), new proton.Data.Binary("a"), new proton.Data.Binary("test"),
-                   new proton.Data.Binary("of"), new proton.Data.Binary("двоичные данные"));
-        console.log("OK\n");
-    };  
-
-    DataTest.testSymbol = function() {
-        console.log("testSymbol");
-        this._test("symbol", new proton.Data.Symbol("this is a symbol test"),
-                             new proton.Data.Symbol("bleh"), new proton.Data.Symbol("blah"));
-        console.log("OK\n");
-    };
-
-    DataTest.testTimestamp = function() {
-        console.log("testTimestamp");
-        this._test("timestamp", new Date(0), new Date(12345), new Date(1000000));
-        console.log("OK\n");
-    };  
-
-    DataTest.testChar = function() {
-        console.log("testChar");
-        this._test("char", 'a', 'b', 'c', '\u1234');
-        console.log("OK\n");
-    };  
-
-    DataTest.testUUID = function() {
-        console.log("testUUID");
-        this._test("uuid", new proton.Data.Uuid(), new proton.Data.Uuid(), new proton.Data.Uuid());
-        console.log("OK\n");
-    };
-
-    /* TODO
-    DataTest.testDecimal32 = function() {
-        console.log("testDecimal32");
-        //this._test("decimal32", 0, 1, 2, 3, 4, Math.pow(2, 30));
-    };
-
-    DataTest.testDecimal64 = function() {
-        console.log("testDecimal64");
-        //this._test("decimal64", 0, 1, 2, 3, 4, Math.pow(2, 60));
-    };  
-
-    DataTest.testDecimal128 = function() {
-        console.log("testDecimal128");
-        // TODO
-    };
-    */
-
-    DataTest.testCopy = function() {
-        console.log("testCopy");
-        this.data.putDESCRIBEDNODE();
-        this.data.enter();
-        this.data.putULONG(123);
-        this.data.putMAPNODE();
-        this.data.enter();
-        this.data.putSTRING("pi");
-        this.data.putDOUBLE(3.14159265359);
-        this.data.exit();
-        this.data.exit();
-    
-        var dst = this.data.copy();
-        var copy = dst.format();
-        var orig = this.data.format();
-        assert(copy === orig);
-        dst.free();
-        console.log("OK\n");
-    };  
-
-    DataTest.testCopyNested = function() {
-        console.log("testCopyNested");
-        var nested = [1, 2, 3, [4, 5, 6], 7, 8, 9];
-        this.data.putObject(nested);
-        var dst = this.data.copy();
-        assert(dst.format() === this.data.format());
-        dst.free();
-        console.log("OK\n");
-    };  
-
-    DataTest.testCopyNestedArray = function() {
-        console.log("testCopyNestedArray");
-        var nested = [new proton.Data.Array("LIST", [
-                        ["first",  [new proton.Data.Array("INT", [1, 2, 3]), "this"]],
-                        ["second", [new proton.Data.Array("INT", [1, 2, 3]), "is"]],
-                        ["third",  [new proton.Data.Array("INT", [1, 2, 3]), "fun"]]
-                        ]),
-                    "end"];
-        this.data.putObject(nested);
-        var dst = this.data.copy();
-        assert(dst.format() === this.data.format());
-        dst.free();
-        console.log("OK\n");
-    };
-
-    DataTest.testRoundTrip = function() {
-        console.log("testRoundTrip");
-        var obj = {key: new Date(1234),
-                   123: "blah",
-                   c: "bleh",
-                   desc: new proton.Data.Described("http://example.org", new proton.Data.Symbol("url")),
-                   array: new proton.Data.Array("INT", [1, 2, 3]),
-                   list: [1, 2, 3, null, 4],
-                   boolean: true};
-        // Serialise obj into this.data.
-        this.data.putObject(obj);
-    
-        // Encode this.data into a Binary representation.
-        var enc = this.data.encode();
-    
-        // Create a new Data instance and decode from the Binary representation
-        // consuming the Binary contents in the process.
-        var data = new proton.Data();
-        data.decode(enc);
-    
-        assert(data.format() === this.data.format());
-    
-        // Deserialize from the copied Data instance into a new JavaScript Object.
-        data.rewind();
-        assert(data.next());
-        var copy = data.getObject();
-    
-        // Create yet another Data instance and serialise the new Object into that.
-        var data1 = new proton.Data();
-        data1.putObject(copy);
-    
-        // Compare the round tripped Data with the original one.
-        assert(data1.format() === this.data.format());
-    
-        data.free();
-        data1.free();
-        console.log("OK\n");
-    };
-
-    DataTest.testLookup = function() {
-        console.log("testLookup");
-        var obj = {key: "value",
-                   pi: 3.14159,
-                   list: [1, 2, 3, 4]};
-        // Serialise obj into this.data.
-        this.data.putObject(obj);
-        this.data.rewind();
-        this.data.next();
-        this.data.enter();
-        this.data.narrow();
-        assert(this.data.lookup("pi"));
-        assert(this.data.getObject() === 3.14159);
-        this.data.rewind();
-        assert(this.data.lookup("key"));
-        assert(this.data.getObject() === "value");
-        this.data.rewind();
-        assert(this.data.lookup("list"));
-        assert(this.data.getObject().toString() === "1,2,3,4");
-        this.data.widen();
-        this.data.rewind();
-        assert(!this.data.lookup("pi"));
-        console.log("OK\n");
-    };  
-
-    DataTest.run();
-} else {
-    console.error("codec.js should be run in Node.js");
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/javascript/message.js
----------------------------------------------------------------------
diff --git a/tests/javascript/message.js b/tests/javascript/message.js
deleted file mode 100755
index 8e6ec2e..0000000
--- a/tests/javascript/message.js
+++ /dev/null
@@ -1,359 +0,0 @@
-#!/usr/bin/env node
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/**
- * This is a fairly literal JavaScript port of message.py used to unit test the
- * proton.Message wrapper class.
- */
-
-// Check if the environment is Node.js and if not log an error and exit.
-if (typeof process === 'object' && typeof require === 'function') {
-    var unittest = require("./unittest.js");
-    var assert = require("assert");
-    var proton = require("qpid-proton-messenger");
-
-    /**
-     * JavaScript Implementation of Python's range() function taken from:
-     * http://stackoverflow.com/questions/8273047/javascript-function-similar-to-python-range
-     */
-    var range = function(start, stop, step) {
-        if (typeof stop == 'undefined') {
-            // one param defined
-            stop = start;
-            start = 0;
-        };
-        if (typeof step == 'undefined') {
-            step = 1;
-        };
-        if ((step > 0 && start >= stop) || (step < 0 && start <= stop)) {
-            return [];
-        };
-        var result = [];
-        for (var i = start; step > 0 ? i < stop : i > stop; i += step) {
-            result.push(i);
-        };
-        return result;
-    };
-
-
-    // Extend TestCase by creating a new Test class as we're using it in a few places.
-    var Test = function() { // Test constructor.
-        /**
-         * The following call is the equivalent of "super" in Java. It's not necessary
-         * here as the unittest.TestCase constructor doesn't set any state, but it
-         * is the correct thing to do when implementing classical inheritance in
-         * JavaScript so I've kept it here as a useful reminder of the "pattern".
-         */
-        //unittest.TestCase.prototype.constructor.call(this);
-    };  
-
-    Test.prototype = new unittest.TestCase(); // Here's where the inheritance occurs.
-    Test.prototype.constructor = Test; // Otherwise instances of Test would have a constructor of unittest.TestCase.
-
-    Test.prototype.setUp = function() {
-        this.msg = new proton.Message();
-    };
-
-    Test.prototype.tearDown = function() {
-        this.msg.free();
-        this.msg = null;
-    };
-
-
-    // Extend Test more simply by creating a prototype instance and adding test methods as properties.
-
-    var AccessorsTest = new Test();
-
-    AccessorsTest._test = function(name, defaultValue, values) {
-        /**
-         * For the case of Binary values under test we retrieve their toString().
-         * This is because the methods under test "consume" the data, in other
-         * words ownership of the underlying raw data transfers to the Message
-         * object so the sent Binary object becomes "empty" after calling the setter.
-         * In addition Binary values merely contain a "pointer" to the raw data
-         * so even a "deepEqual" comparison won't accurately compare two Binaries.
-         * For these tests we "cheat" and store an array of characters in the
-         * Binary so that we can use their String forms for comparison tests.
-         *
-         * We also get the String value of Uuid for the case of setUserID because
-         * that method transparently creates Binary values from the String form
-         * of non-Binary data passed to it. It's a convenience method, but makes
-         * testing somewhat more fiddly.
-         */
-
-        // First get the values passed to the method.
-        var values = Array.prototype.slice.apply(arguments, [2]);
-        // If the first element of values is actually an Array then use the Array.
-        // This scenario is what happens in the tests that use the range() function.
-        values = (Object.prototype.toString.call(values[0]) === '[object Array]') ? values[0] : values;
-    
-        // Work out the accessor/mutator names noting that boolean accessors use "is" not "get".
-        var setter = 'set' + name;
-        var getter = (typeof defaultValue === 'boolean') ? 'is' + name : 'get' + name;
-    
-        // Get the message's default value first.
-        var d = this.msg[getter]();
-        d = (d instanceof proton.Data.Binary) ? d.toString() : d;
-    
-        // Compare the message's default with the expected default value passed in the test case.
-        assert.deepEqual(d, defaultValue);
-    
-        for (var i = 0; i < values.length; i++) {
-            var v = values[i];
-    
-            var value = (v instanceof proton.Data.Binary ||
-                         (name === 'UserID' && v instanceof proton.Data.Uuid)) ? v.toString() : v;
-            value = (v instanceof Date) ? v.valueOf() : v;
-    
-            this.msg[setter](v); // This call will "consume" Binary data.
-    
-            var gotten = this.msg[getter]();
-            gotten = (gotten instanceof proton.Data.Binary) ? gotten.toString() : gotten;
-            gotten = (gotten instanceof Date) ? gotten.valueOf() : v;
-    
-            assert.deepEqual(value, gotten);
-        }
-    };
-
-    AccessorsTest._testString = function(name) {
-        this._test(name, "", "asdf", "fdsa", "");
-    };  
-
-    AccessorsTest._testTime = function(name) {
-        // The ExpiryTime and CreationTime methods can take either a number or a Date Object.
-        this._test(name, new Date(0), new Date(0), 123456789, new Date(987654321));
-    };
-
-    AccessorsTest.testID = function() {
-        console.log("testID");
-        this._test("ID", null, "bytes", null, 123, "string", new proton.Data.Uuid(), new proton.Data.Binary("ВИНАРЫ"));
-        console.log("OK\n");
-    };  
-
-    AccessorsTest.testCorrelationID = function() {
-        console.log("testCorrelationID");
-        this._test("CorrelationID", null, "bytes", null, 123, "string", new proton.Data.Uuid(), new proton.Data.Binary("ВИНАРЫ"));
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testDurable = function() {
-        console.log("testDurable");
-        this._test("Durable", false, true, false);
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testPriority = function() {
-        console.log("testPriority");
-        this._test("Priority", proton.Message.DEFAULT_PRIORITY, range(0, 256));
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testTTL = function() {
-        console.log("testTTL");
-        this._test("TTL", 0, range(12345, 54321));
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testFirstAcquirer = function() {
-        console.log("testFirstAcquirer");
-        this._test("FirstAcquirer", false, true, false);
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testDeliveryCount = function() {
-        console.log("testDeliveryCount");
-        this._test("DeliveryCount", 0, range(0, 1024));
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testUserID = function() {
-        console.log("testUserID");
-        this._test("UserID", "", "asdf", "fdsa", 123, new proton.Data.Binary("ВИНАРЫ"), new proton.Data.Uuid(), "");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testAddress = function() {
-        console.log("testAddress");
-        this._testString("Address");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testSubject = function() {
-        console.log("testSubject");
-        this._testString("Subject");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testReplyTo = function() {
-        console.log("testReplyTo");
-        this._testString("ReplyTo");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testContentType = function() {
-        console.log("testContentType");
-        this._testString("ContentType");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testContentEncoding = function() {
-        console.log("testContentEncoding");
-        this._testString("ContentEncoding");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testExpiryTime = function() {
-        console.log("testExpiryTime");
-        this._testTime("ExpiryTime");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testCreationTime = function() {
-        console.log("testCreationTime");
-        this._testTime("CreationTime");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testGroupID = function() {
-        console.log("testGroupID");
-        this._testString("GroupID");
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testGroupSequence = function() {
-        console.log("testGroupSequence");
-        this._test("GroupSequence", 0, 0, -10, 10, 20, -20);
-        console.log("OK\n");
-    };
-
-    AccessorsTest.testReplyToGroupID = function() {
-        console.log("testReplyToGroupID");
-        this._testString("ReplyToGroupID");
-        console.log("OK\n");
-    };
-
-
-    var CodecTest = new Test();
-
-    CodecTest.testRoundTrip = function() {
-        console.log("testRoundTrip");
-        this.msg.setID("asdf");
-        this.msg.setCorrelationID(new proton.Data.Uuid());
-        this.msg.setTTL(3);
-        this.msg.setPriority(100);
-        this.msg.setAddress("address");
-        this.msg.setSubject("subject");
-        this.msg.body = "Hello World!";
-    
-        var data = this.msg.encode();
-        var msg2 = new proton.Message();
-        msg2.decode(data);
-    
-        assert(this.msg.getID() === msg2.getID());
-        assert(this.msg.getCorrelationID().toString() === msg2.getCorrelationID().toString());
-        assert(this.msg.getTTL() === msg2.getTTL());
-        assert(this.msg.getPriority() === msg2.getPriority());
-        assert(this.msg.getAddress() === msg2.getAddress());
-        assert(this.msg.getSubject() === msg2.getSubject());
-        assert(this.msg.body === msg2.body);
-
-        msg2.free();
-        console.log("OK\n");
-    };
-
-    /**
-     * This test tests the transparent serialization and deserialization of JavaScript
-     * Objects using the AMQP type system (this is the default behaviour).
-     */
-    CodecTest.testRoundTripBodyObject = function() {
-        console.log("testRoundTripBodyObject");
-        this.msg.setAddress("address");
-        this.msg.body = {array: [1, 2, 3, 4], object: {name: "John Smith", age: 65}};
-
-        var data = this.msg.encode();
-        var msg2 = new proton.Message();
-        msg2.decode(data);
-    
-        assert(this.msg.getAddress() === msg2.getAddress());
-        assert(this.msg.getContentType() === msg2.getContentType());
-        assert.deepEqual(this.msg.body, msg2.body);
-
-        msg2.free();
-        console.log("OK\n");
-    };
-
-    /**
-     * This test tests the transparent serialization and deserialization of JavaScript
-     * Objects as JSON. In this case the "on-the-wire" representation is an AMQP binary
-     * stored in the AMQP data section.
-     */
-    CodecTest.testRoundTripBodyObjectAsJSON = function() {
-        console.log("testRoundTripBodyObjectAsJSON");
-        this.msg.setAddress("address");
-        this.msg.setContentType("application/json");
-        this.msg.body = {array: [1, 2, 3, 4], object: {name: "John Smith", age: 65}};
-    
-        var data = this.msg.encode();
-        var msg2 = new proton.Message();
-        msg2.decode(data);
-    
-        assert(this.msg.getAddress() === msg2.getAddress());
-        assert(this.msg.getContentType() === msg2.getContentType());
-        assert.deepEqual(this.msg.body, msg2.body);
-    
-        msg2.free();
-        console.log("OK\n");
-    };
-
-    /**
-     * By default the API will encode using the AMQP type system, but is the content-type
-     * is set it will encode as an opaque Binary in an AMQP data section. For certain
-     * types however this isn't the most useful thing. For application/json (see
-     * previous test) we convert to and from JavaScript Objects and for text/* MIME
-     * types the API will automatically convert the received Binary into a String.
-     */
-    CodecTest.testRoundTripMIMETextObject = function() {
-        console.log("testRoundTripMIMETextObject");
-        this.msg.setAddress("address");
-        this.msg.setContentType("text/plain");
-        this.msg.body = "some text";
-    
-        var data = this.msg.encode();
-        var msg2 = new proton.Message();
-        msg2.decode(data);
-
-        assert(this.msg.getAddress() === msg2.getAddress());
-        assert(this.msg.getContentType() === msg2.getContentType());
-        assert.deepEqual(this.msg.body, msg2.body);
-
-        msg2.free();
-        console.log("OK\n");
-    };
-
-
-    // load and save are deprecated so not implemented in the JavaScript binding.
-
-    AccessorsTest.run();
-    CodecTest.run();
-} else {
-    console.error("message.js should be run in Node.js");
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/javascript/msgr-recv.js
----------------------------------------------------------------------
diff --git a/tests/javascript/msgr-recv.js b/tests/javascript/msgr-recv.js
deleted file mode 100755
index 24bdcae..0000000
--- a/tests/javascript/msgr-recv.js
+++ /dev/null
@@ -1,265 +0,0 @@
-#!/usr/bin/env node
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-var Statistics = function() {
-    this.startTime = 0;
-    this.latencySamples = 0;
-    this.latencyTotal = 0;
-    this.latencyMin = 0;
-    this.latencyMax = 0;
-};
-
-Statistics.prototype.start = function() {
-    this.startTime = +new Date();
-};
-
-Statistics.prototype.messageReceived = function(msg) {
-    var ts = +msg.getCreationTime(); // The + gets the value of the returned Data Object.
-    if (ts) {
-        var l = +new Date() - ts;
-        if (l) {
-            this.latencyTotal += l;
-            this.latencySamples += 1;
-            if (this.latencySamples === 1) {
-                this.latencyMin = this.latencyMax = l;
-            } else {
-                if (this.latencyMin > l) {
-                    this.latencyMin = l;
-                }
-                if (this.latencyMax < l) {
-                    this.latencyMax = l;
-                }
-            }
-        }
-    }
-};
-
-Statistics.prototype.report = function(sent, received) {
-    var seconds = (+new Date() - this.startTime)/1000;
-    console.log("Messages sent: " + sent + " received: " + received);
-    console.log("Total time: " + seconds + " seconds");
-    if (seconds) {
-        console.log("Throughput: " + (sent/seconds) + " msgs/sec sent");
-        console.log("Throughput: " + (received/seconds) + " msgs/sec received");
-    }
-
-    if (this.latencySamples) {
-        console.log("Latency (ms): " + this.latencyMin + " min " + 
-                                       this.latencyMax + " max " + 
-                                       (this.latencyTotal/this.latencySamples) + " avg");
-    }
-};
-
-
-var MessengerReceive = function(opts, callback) {
-    //if (opts.verbose) {
-        console.log("subscriptions = " + opts.subscriptions);
-        console.log("messageCount = " + opts.messageCount);
-        console.log("recvCount = " + opts.recvCount);
-        console.log("incomingWindow = " + opts.incomingWindow);
-        console.log("reportInterval = " + opts.reportInterval);
-        console.log("reply = " + opts.reply);
-        console.log("forwardingTargets = " + opts.forwardingTargets);
-        console.log("name = " + opts.name);
-        console.log("readyText = " + opts.readyText);
-        console.log("verbose = " + opts.verbose);
-        console.log();
-    //}
-
-    var stats = new Statistics();
-    var running = true; // Used to avoid calling stop multiple times.
-    var sent = 0;
-    var received = 0;
-    var forwardingIndex = 0;
-
-    var message = new proton.Message();
-    var messenger = new proton.Messenger(opts.name);
-
-    var pumpData = function() {
-        if (opts.verbose) {
-            console.log("Calling messenger.recv(" + opts.recvCount + ")");
-        }
-        messenger.recv(opts.recvCount);
-
-        if (opts.verbose) {
-            console.log("Messages on incoming queue: " + messenger.incoming());
-        }
-        while (messenger.incoming()) {
-            // start the timer only after receiving the first msg
-            if (received === 0) {
-                stats.start();
-            }
-
-            messenger.get(message);
-            received += 1;
-            //console.log("Address: " + message.getAddress());
-            //console.log("CorrelationID: " + message.getCorrelationID());
-            //console.log("Content: " + message.body);
-            stats.messageReceived(message);
-
-            if (opts.reply) {
-                var replyTo = message.getReplyTo();
-                if (replyTo) {
-                    if (opts.verbose) {
-                        console.log("Replying to: " + replyTo);
-                    }
-                    message.setAddress(replyTo);
-                    message.setCreationTime(new Date());
-                    messenger.put(message);
-                    sent += 1;
-                }
-            }
-        }
-
-        // Check for exit condition.
-        if (running && !(opts.messageCount === 0 || received < opts.messageCount)) {
-            // Wait for outgoing to be zero before calling stop so pending sends
-            // get flushed properly.
-            if (messenger.outgoing()) {
-                if (opts.verbose) {
-                    console.log("Flushing pending sends");
-                }
-            } else {
-//console.log("******* messenger.stop()");
-                messenger.stop();
-                running = false;
-                stats.report(sent, received);
-                if (callback) {
-                    callback(stats);
-                }
-            }
-        }
-
-        if (messenger.isStopped()) {
-//console.log("-------------------- messenger.isStopped()");
-            message.free();
-            messenger.free();
-        }
-    };
-
-    this.start = function() {
-        messenger.on('error', function(error) {console.log("** error **"); console.log(error);});
-        messenger.on('work', pumpData);
-        messenger.on('subscription', function(subscription) {
-            // Hack to let test scripts know when the receivers are ready (so that the
-            // senders may be started).
-console.log("****** subscription " + subscription.getAddress() + " succeeded")
-            if (opts.readyText) {
-                console.log(opts.readyText);
-            }
-        });
-
-        if (opts.incomingWindow) {
-            messenger.setIncomingWindow(opts.incomingWindow);
-        }
-        messenger.start();
-
-        // Unpack addresses that were specified using comma-separated list
-        var subscriptions = opts.subscriptions.split(',');
-        for (var i = 0; i < subscriptions.length; i++) {
-            var subscription = subscriptions[i];
-            if (opts.verbose) {
-                console.log("Subscribing to " + subscription);
-            }
-            messenger.subscribe(subscription);
-        }
-    };
-};
-
-
-// Check if the environment is Node.js and if not log an error and exit.
-if (typeof process === 'object' && typeof require === 'function') {
-    var usage =
-    'Usage: msgr-recv [OPTIONS]\n' +
-    ' -a <addr>[,<addr>]* \tAddresses to listen on [amqp://~0.0.0.0]\n' +
-    ' -c # \tNumber of messages to receive before exiting [0=forever]\n' +
-    ' -b # \tArgument to Messenger::recv(n) [2048]\n' +
-    ' -w # \tSize for incoming window [0]\n' +
-    ' -e # \t# seconds to report statistics, 0 = end of test [0] *TBD*\n' +
-    ' -R \tSend reply if \'reply-to\' present\n' +
-    ' -F <addr>[,<addr>]* \tAddresses used for forwarding received messages\n' +
-    ' -N <name> \tSet the container name to <name>\n' +
-    ' -X <text> \tPrint \'<text>\\n\' to stdout after all subscriptions are created\n' +
-    ' -V \tEnable debug logging\n';
-
-    // Increase the virtual heap available to the emscripten compiled C runtime.
-    // This allows us to test a really big string.
-    PROTON_TOTAL_MEMORY = 140000000;
-    PROTON_TOTAL_STACK = 25000000; // Needs to be bigger than the biggest string.
-    var proton = require("qpid-proton-messenger");
-
-    var opts = {};
-    opts.subscriptions = 'amqp://~0.0.0.0';
-    opts.messageCount = 0;
-    opts.recvCount = -1;
-    opts.incomingWindow;
-    opts.reportInterval = 0;
-    opts.reply = false;
-    opts.forwardingTargets;
-    opts.name;
-    opts.readyText;
-    opts.verbose = false;
-
-    var args = process.argv.slice(2);
-    if (args.length > 0) {
-        if (args[0] === '-h' || args[0] === '--help') {
-            console.log(usage);
-            process.exit(0);
-        }
-
-        for (var i = 0; i < args.length; i++) {
-            var arg = args[i];
-            if (arg.charAt(0) === '-') {
-                if (arg === '-V') {
-                    opts.verbose = true;
-                } else if (arg === '-R') {
-                    opts.reply = true;
-                } else {
-                    i++;
-                    var val = args[i];
-                    if (arg === '-a') {
-                        opts.subscriptions = val;
-                    } else if (arg === '-c') {
-                        opts.messageCount = val;
-                    } else if (arg === '-b') {
-                        opts.recvCount = val;
-                    } else if (arg === '-w') {
-                        opts.incomingWindow = val;
-                    } else if (arg === '-e') {
-                        opts.reportInterval = val;
-                    } else if (arg === '-F') {
-                        opts.forwardingTargets = val;
-                    } else if (arg === '-N') {
-                        opts.name = val;
-                    } else if (arg === '-X') {
-                        opts.readyText = val;
-                    }
-                }
-            }
-        }
-    }
-
-    var receiver = new MessengerReceive(opts);
-    receiver.start();
-} else {
-    console.error("msgr-recv.js should be run in Node.js");
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/javascript/msgr-send-common.js
----------------------------------------------------------------------
diff --git a/tests/javascript/msgr-send-common.js b/tests/javascript/msgr-send-common.js
deleted file mode 100644
index 4e68097..0000000
--- a/tests/javascript/msgr-send-common.js
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/**
- * This file is essentially a "module" that is common to msgr-send.js and msgr-send.html.
- * It defines the Statistics and MessengerSend classes and if the environment is Node.js
- * it will import qpid-proton-messenger and export MessengerSend for use in msgr-send.js.
- * Because it's really a module/library trying to execute msgr-send-common.js won't
- * itself do anything terribly exciting.
- */
-
-var Statistics = function() {
-    this.startTime = 0;
-    this.latencySamples = 0;
-    this.latencyTotal = 0;
-    this.latencyMin = 0;
-    this.latencyMax = 0;
-};
-
-Statistics.prototype.start = function() {
-    this.startTime = +new Date();
-};
-
-Statistics.prototype.messageReceived = function(msg) {
-    var ts = +msg.getCreationTime(); // The + gets the value of the returned Data Object.
-    if (ts) {
-        var l = +new Date() - ts;
-        if (l) {
-            this.latencyTotal += l;
-            this.latencySamples += 1;
-            if (this.latencySamples === 1) {
-                this.latencyMin = this.latencyMax = l;
-            } else {
-                if (this.latencyMin > l) {
-                    this.latencyMin = l;
-                }
-                if (this.latencyMax < l) {
-                    this.latencyMax = l;
-                }
-            }
-        }
-    }
-};
-
-Statistics.prototype.report = function(sent, received) {
-    var seconds = (+new Date() - this.startTime)/1000;
-    console.log("Messages sent: " + sent + " received: " + received);
-    console.log("Total time: " + seconds + " seconds");
-    if (seconds) {
-        console.log("Throughput: " + (sent/seconds) + " msgs/sec sent");
-        console.log("Throughput: " + (received/seconds) + " msgs/sec received");
-    }
-
-    if (this.latencySamples) {
-        console.log("Latency (ms): " + this.latencyMin + " min " + 
-                                       this.latencyMax + " max " + 
-                                       (this.latencyTotal/this.latencySamples) + " avg");
-    }
-};
-
-
-var MessengerSend = function(opts, callback) {
-    //if (opts.verbose) {
-        console.log("addresses = " + opts.addresses);
-        console.log("messageCount = " + opts.messageCount);
-        console.log("messageSize = " + opts.messageSize);
-        console.log("recvCount = " + opts.recvCount);
-        console.log("sendBatch = " + opts.sendBatch);
-        console.log("outgoingWindow = " + opts.outgoingWindow);
-        console.log("reportInterval = " + opts.reportInterval);
-        console.log("getReplies = " + opts.getReplies);
-        console.log("name = " + opts.name);
-        console.log("verbose = " + opts.verbose);
-        console.log();
-    //}
-
-    var stats = new Statistics();
-    var targets = [];
-    var running = true; // Used to avoid calling stop multiple times.
-    var sent = 0;
-    var received = 0;
-
-    var message = new proton.Message();
-    var replyMessage = new proton.Message();
-    var messenger = new proton.Messenger(opts.name);
-
-    // Retrieve replies and return the number of reply messages received.
-    var processReplies = function() {
-        var received = 0;
-        if (opts.verbose) {
-            console.log("Calling messenger.recv(" + opts.recvCount + ")");
-        }
-        messenger.recv(opts.recvCount);
-
-        if (opts.verbose) {
-            console.log("Messages on incoming queue: " + messenger.incoming());
-        }
-        while (messenger.incoming()) {
-            messenger.get(replyMessage);
-            received += 1;
-            //console.log("Address: " + replyMessage.getAddress());
-            //console.log("Content: " + replyMessage.body);
-            stats.messageReceived(replyMessage);
-        }
-        return received;
-    };
-
-    // Send messages as fast as possible. This is analogous to the while loop in
-    // the Python msgr-send.py but we wrap in a function in JavaScript so that
-    // we can schedule on the JavaScript Event queue via setTimeout. This is needed
-    // otherwise the JavaScript Event loop is blocked and no data gets sent.
-    var sendData = function() {
-        var delay = 0;
-        while (opts.messageCount === 0 || (sent < opts.messageCount)) {
-            // Check the amount of data buffered on the socket, if it's non-zero
-            // exit the loop and call senData again after a short delay. This
-            // will throttle the send rate if necessary.
-            if (messenger.getBufferedAmount()) {
-console.log("messenger.getBufferedAmount() = " + messenger.getBufferedAmount());
-                delay = 100;
-                break; // Exit loop to check for exit condition and schedule to Event queue.
-            }       
-
-            var index = sent % targets.length;
-//console.log("sent = " + sent + ", index = " + index);
-
-            message.setAddress(targets[index]);
-            message.setCorrelationID(sent);
-            message.setCreationTime(new Date());
-            messenger.put(message);
-            sent += 1;
-
-            if (opts.sendBatch && (messenger.outgoing() >= opts.sendBatch)) {
-                if (opts.verbose) {
-                    console.log("Calling messenger.send()")
-                }
-                messenger.send();
-
-                if (opts.getReplies) {
-                    received += processReplies();
-                }
-                break; // Exit loop to check for exit condition and yield to Event loop.
-            }
-        }
-
-        // Check for exit condition.
-        if (running && !(opts.messageCount === 0 || (sent < opts.messageCount))) {
-            if (opts.getReplies && (received < sent)) {
-                received += processReplies();
-                if (opts.verbose) {
-                    console.log("Messages sent = " + sent + ", received = " + received);
-                }
-            } else if (messenger.outgoing()) {
-                if (opts.verbose) {
-                    console.log("Flushing pending sends");
-                }
-                messenger.send();
-            } else {
-//console.log("******* calling stop")
-                messenger.stop();
-                running = false;
-                stats.report(sent, received);
-                if (callback) {
-                    callback(stats);
-                }
-            }
-        }
-
-        if (messenger.isStopped()) {
-//console.log("-------------------- messenger.isStopped()");
-            message.free();
-            messenger.free();
-        } else {
-            // schedule next call on the JavaScript Event queue. If we don't do this
-            // our messages won't get sent because none of the internal JavaScript
-            // network code will get any CPU.
-
-            // If available we call setImmediate rather than setTimeout when the delay
-            // is zero. setImmediate is more efficient, in particular I noticed that
-            // with Node.js v0.10.18 I could get max throughput and max out CPU using
-            // setTimeout, but when I upgraded to v0.10.33 my throughput dropped and
-            // my CPU was hovering around 55% but using setImmediate the performance
-            // improved again. My guess is that v0.10.18 was checking for zero delay
-            // and calling setImmediate internally whereas v0.10.33 wasn't, but I
-            // can't say for sure. TODO it's possible that some browsers might do a
-            // better job with setImmediate too (given what I'm seeing with Node.js),
-            // Chrome might be one such case, but it's not universally supported.
-            // It might be worth adding a proper polyfill to handle this.
-            if (delay === 0 && typeof setImmediate === 'function') {
-                setImmediate(sendData);
-            } else {
-                setTimeout(sendData, delay);
-            }   
-        }
-    };
-
-    this.start = function() {
-        message.body = Array(+opts.messageSize + 1).join('X');
-        message.setReplyTo('~');
-
-        messenger.on('error', function(error) {
-            console.log(error);
-            opts.messageCount = -1; // Force exit condition.
-        });
-
-        if (opts.outgoingWindow) {
-            messenger.setOutgoingWindow(opts.outgoingWindow);
-        }
-        messenger.start();
-
-        // Unpack targets that were specified using comma-separated list
-        var addresses = opts.addresses.split(',');
-        for (var i = 0; i < addresses.length; i++) {
-            var address = addresses[i];
-            targets.push(address);
-        }
-
-        stats.start();
-        sendData();
-    };
-};
-
-// If running in Node.js import the proton library and export MessengerSend.
-if (typeof module === 'object') {
-    var proton = require("qpid-proton-messenger");
-    module.exports.MessengerSend = MessengerSend;
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/javascript/msgr-send.html
----------------------------------------------------------------------
diff --git a/tests/javascript/msgr-send.html b/tests/javascript/msgr-send.html
deleted file mode 100644
index 531d886..0000000
--- a/tests/javascript/msgr-send.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<!DOCTYPE html> <!-- HTML5 doctype -->
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-    http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<html>
-
-<head>
-	<title>Proton Messenger Send Benchmark</title>
-	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
-
-<!--
-  Import the Messenger Binding proton.js. Note that this simple example pulls
-  it from the node_modules/qpid-proton/lib, which is created by the build process
-  so that the node.js based examples "just work", in a real Web App you would
-  clearly need to copy the proton.js to your own server.
-
-  In actual fact the CMake build actually builds proton.js into the directory:
-  <build>/proton-c/bindings/javascript
-  where <build> is the build directory created to run cmake from, it is then
-  copied to the node_modules/qpid-proton/lib directory.
-
-  In this example we also set the global variable PROTON_TOTAL_MEMORY in order to
-  increase the virtual heap available to the emscripten compiled C runtime. It
-  is not really necessary to do this for this application as the default value
-  of 16777216 is fine, it is simply done here to illustrate how to do it.
--->
-<script type="text/javascript">PROTON_TOTAL_MEMORY = 140000000;</script>
-<script type="text/javascript">PROTON_TOTAL_STACK = 25000000;</script>
-<script type="text/javascript" src="../../node_modules/qpid-proton-messenger/lib/proton-messenger.js"></script>
-<script type="text/javascript" src="./msgr-send-common.js"></script>
-
-<script type="text/javascript">
-
-var start = function() {
-    var opts = {};
-    opts.addresses = document.getElementById("address").value;
-    opts.messageCount = parseInt(document.getElementById("messageCount").value, 10);
-    opts.messageSize = parseInt(document.getElementById("messageSize").value, 10);
-    opts.sendBatch = parseInt(document.getElementById("sendBatch").value, 10);
-
-    opts.recvCount = -1;
-    opts.outgoingWindow;
-    opts.reportInterval = 0;
-    opts.getReplies = false;
-    opts.name;
-    opts.verbose = false;
-
-    var sender = new MessengerSend(opts);
-    sender.start();
-};
-
-</script>
-
-<style>
-body
-{
-	font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
-    overflow-x: hidden; /* Hide horizontal scrollbar */
-    background: #dddddd;
-}
-
-label
-{
-    display: block;
-	font-size: 17px;
-}
-
-input, textarea
-{
-	font-size: 13px;
-    margin-bottom: 10px;
-}
-</style>
-
-</head>
-
-<body>
-<div>
-    <label for="address">Address:</label>
-    <input type="text" id="address" size="40"
-           placeholder="amqp://user:password@host:port"
-           name="address" value="amqp://guest:guest@0.0.0.0" />
-</div>
-<div>    
-    <label for="messageCount">Message Count:</label>
-    <input type="text" id="messageCount" size="40"
-           name="messageCount" value="0" />
-</div>
-<div>    
-    <label for="messageSize">Message Size:</label>
-    <input type="text" id="messageSize" size="40"
-           name="messageSize" value="1024" />
-</div>
-<div>    
-    <label for="sendBatch">Send Batch Size:</label>
-    <input type="text" id="sendBatch" size="40"
-           name="sendBatch" value="1024" />
-</div>
-
-
-<div>
-    <input type="button" value="start" onclick="start()"/>
-</div>
-</body>
-
-</html>

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/javascript/msgr-send.js
----------------------------------------------------------------------
diff --git a/tests/javascript/msgr-send.js b/tests/javascript/msgr-send.js
deleted file mode 100755
index 124f29e..0000000
--- a/tests/javascript/msgr-send.js
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/env node
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-// Check if the environment is Node.js and if not log an error and exit.
-if (typeof process === 'object' && typeof require === 'function') {
-    var usage =
-    'Usage: msgr-send [OPTIONS]\n' +
-    ' -a <addr>[,<addr>]* \tThe target address [amqp://~0.0.0.0]\n' +
-    ' -c # \tNumber of messages to send before exiting [0=forever]\n' +
-    ' -b # \tSize of message body in bytes [1024]\n' +
-    ' -p # \tSend batches of # messages (wait for replies before sending next batch if -R) [1024]\n' +
-    ' -w # \tSize for outgoing window [0]\n' +
-    ' -e # \t# seconds to report statistics, 0 = end of test [0] *TBD*\n' +
-    ' -R \tWait for a reply to each sent message\n' +
-    ' -B # \tArgument to Messenger::recv(n) [-1]\n' +
-    ' -N <name> \tSet the container name to <name>\n' +
-    ' -V \tEnable debug logging\n';
-
-    // Increase the virtual heap available to the emscripten compiled C runtime.
-    // This allows us to test a really big string.
-    PROTON_TOTAL_MEMORY = 140000000;
-    PROTON_TOTAL_STACK = 25000000; // Needs to be bigger than the biggest string.
-    var proton = require("qpid-proton-messenger");
-    var benchmark = require("./msgr-send-common.js");
-
-    var opts = {};
-    opts.addresses = 'amqp://0.0.0.0';
-    opts.messageCount = 0;
-    opts.messageSize = 1024;
-    opts.recvCount = -1;
-    opts.sendBatch = 1024;
-    opts.outgoingWindow;
-    opts.reportInterval = 0;
-    opts.getReplies = false;
-    opts.name;
-    opts.verbose = false;
-
-    var args = process.argv.slice(2);
-    if (args.length > 0) {
-        if (args[0] === '-h' || args[0] === '--help') {
-            console.log(usage);
-            process.exit(0);
-        }
-
-        for (var i = 0; i < args.length; i++) {
-            var arg = args[i];
-            if (arg.charAt(0) === '-') {
-                if (arg === '-V') {
-                    opts.verbose = true;
-                } else if (arg === '-R') {
-                    opts.getReplies = true;
-                } else {
-                    i++;
-                    var val = args[i];
-                    if (arg === '-a') {
-                        opts.addresses = val;
-                    } else if (arg === '-c') {
-                        opts.messageCount = val;
-                    } else if (arg === '-b') {
-                        opts.messageSize = val;
-                    } else if (arg === '-B') {
-                        opts.recvCount = val;
-                    } else if (arg === '-p') {
-                        opts.sendBatch = val;
-                    } else if (arg === '-w') {
-                        opts.outgoingWindow = val;
-                    } else if (arg === '-e') {
-                        opts.reportInterval = val;
-                    } else if (arg === '-N') {
-                        opts.name = val;
-                    }
-                }
-            }
-        }
-    }
-
-    var sender = new benchmark.MessengerSend(opts);
-    sender.start();
-} else {
-    console.error("msgr-send.js should be run in Node.js");
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/javascript/soak.js
----------------------------------------------------------------------
diff --git a/tests/javascript/soak.js b/tests/javascript/soak.js
deleted file mode 100755
index 50bf921..0000000
--- a/tests/javascript/soak.js
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/env node
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-// Check if the environment is Node.js and if not log an error and exit.
-if (typeof process === 'object' && typeof require === 'function') {
-    var proton = require("qpid-proton-messenger");
-
-    var addr = 'guest:guest@localhost:5673';
-    //var addr = 'localhost:5673';
-    var address = 'amqp://' + addr;
-    console.log(address);
-
-    var subscriptionQueue = '';
-    var count = 0;
-    var start = 0; // Start Time.
-
-    var message = new proton.Message();
-    var messenger = new proton.Messenger();
-
-    var pumpData = function() {
-        while (messenger.incoming()) {
-            // The second parameter forces Binary payloads to be decoded as strings
-            // this is useful because the broker QMF Agent encodes strings as AMQP
-            // binary, which is a right pain from an interoperability perspective.
-            var t = messenger.get(message, true);
-            //console.log("Address: " + message.getAddress());
-            //console.log("Content: " + message.body);
-            messenger.accept(t);
-    
-            if (count % 1000 === 0) {
-                var time = +new Date();
-                console.log("count = " + count + ", duration = " + (time - start) + ", rate = " + ((count*1000)/(time - start)));
-            }
-
-            sendMessage();
-        }
-
-        if (messenger.isStopped()) {
-            message.free();
-            messenger.free();
-        }
-    };
-
-    var sendMessage = function() {
-        var msgtext = "Message Number " + count;
-        count++;
-
-        message.setAddress(address + '/' + subscriptionQueue);
-        message.body = msgtext;
-        messenger.put(message);
-        //messenger.settle();
-    };
-
-    messenger.on('error', function(error) {console.log(error);});
-    messenger.on('work', pumpData);
-    messenger.on('subscription', function(subscription) {
-        var subscriptionAddress = subscription.getAddress();
-        var splitAddress = subscriptionAddress.split('/');
-        subscriptionQueue = splitAddress[splitAddress.length - 1];
-
-        console.log("Subscription Queue: " + subscriptionQueue);
-        start = +new Date();
-        sendMessage();
-    });
-
-    //messenger.setOutgoingWindow(1024);
-    messenger.setIncomingWindow(1024); // The Java Broker seems to need this.
-    messenger.recv(); // Receive as many messages as messenger can buffer.
-    messenger.start();
-
-    messenger.subscribe('amqp://' + addr + '/#');
-} else {
-    console.error("soak.js should be run in Node.js");
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/javascript/unittest.js
----------------------------------------------------------------------
diff --git a/tests/javascript/unittest.js b/tests/javascript/unittest.js
deleted file mode 100644
index bc1567c..0000000
--- a/tests/javascript/unittest.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/**
- * The TestCase class provides a simple dependency-free Unit Test framework to
- * automagically invoke methods that start with "test" on classes that extend it.
- */
-
-// TestCase Constructor
-var TestCase = function() {};
-
-// Enumerate all functions of the class and invoke those beginning with "test".
-TestCase.prototype.run = function() {
-    for (var property in this) {
-        if ((typeof this[property] === 'function') &&
-            property.lastIndexOf('test', 0) === 0) {
-            this.setUp();
-            this[property]();
-            this.tearDown();
-        }
-    }
-};
-
-TestCase.prototype.setUp = function() {};
-TestCase.prototype.tearDown = function() {};
-
-module.exports.TestCase = TestCase;
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/python/proton_tests/__init__.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/__init__.py b/tests/python/proton_tests/__init__.py
index 66ce650..66792f5 100644
--- a/tests/python/proton_tests/__init__.py
+++ b/tests/python/proton_tests/__init__.py
@@ -22,7 +22,6 @@ import proton_tests.engine
 import proton_tests.message
 import proton_tests.handler
 import proton_tests.reactor
-import proton_tests.messenger
 import proton_tests.sasl
 import proton_tests.transport
 import proton_tests.ssl

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/tests/python/proton_tests/common.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/common.py b/tests/python/proton_tests/common.py
index 019c47d..b3f93fb 100644
--- a/tests/python/proton_tests/common.py
+++ b/tests/python/proton_tests/common.py
@@ -509,19 +509,6 @@ class MessengerReceiverValgrind(MessengerReceiverC):
     def __init__(self, suppressions=None):
         setup_valgrind(self)
 
-class MessengerSenderPython(MessengerSender):
-    def __init__(self):
-        MessengerSender.__init__(self)
-        self._command = ["msgr-send.py"]
-
-
-class MessengerReceiverPython(MessengerReceiver):
-    def __init__(self):
-        MessengerReceiver.__init__(self)
-        self._command = ["msgr-recv.py"]
-
-
-
 class ReactorSenderC(MessengerSender):
     def __init__(self):
         MessengerSender.__init__(self)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[3/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Posted by jr...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/get_include_dir.php
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/get_include_dir.php b/proton-c/bindings/php/get_include_dir.php
deleted file mode 100644
index 6103e41..0000000
--- a/proton-c/bindings/php/get_include_dir.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-$prefix = $argv[1];
-$include_path = ini_get("include_path");
-
-$php_dir = null;
-$pear_dir = null;
-$abs_dir = null;
-
-foreach (explode(PATH_SEPARATOR, $include_path) as $include_dir) {
-  if (strpos($include_dir, ".") === false &&
-      strpos($include_dir, $prefix) === 0) {
-    $abs_dir = $include_dir;
-    $suffix = substr($abs_dir, strlen($prefix));
-    if (strpos($suffix, "php") !== false) {
-      $php_dir = $abs_dir;
-    }
-    if (strpos($suffix, "pear") !== false) {
-      $pear_dir = $abs_dir;
-    }
-  }
-}
-
-if ($php_dir) {
-  print $php_dir;
-} else if ($pear_dir) {
-  print $pear_dir;
-} else if ($abs_dir) {
-  print $abs_dir;
-}
-
-print "\n";
-
-?>

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/php.i
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/php.i b/proton-c/bindings/php/php.i
deleted file mode 100644
index 6e927f7..0000000
--- a/proton-c/bindings/php/php.i
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-%module cproton
-
-// provided by SWIG development libraries
-%include php.swg
-
-#if SWIG_VERSION < 0x020000
-%include compat.swg
-#endif
-
-%header %{
-/* Include the headers needed by the code in this wrapper file */
-#include <proton/types.h>
-#include <proton/connection.h>
-#include <proton/condition.h>
-#include <proton/delivery.h>
-#include <proton/event.h>
-#include <proton/message.h>
-#include <proton/messenger.h>
-#include <proton/session.h>
-#include <proton/url.h>
-#include <proton/reactor.h>
-#include <proton/handlers.h>
-#include <proton/sasl.h>
-
-#define zend_error_noreturn zend_error
-%}
-
-%apply (char *STRING, int LENGTH) { (char *STRING, size_t LENGTH) };
-
-// ssize_t return value
-//
-%typemap(out) ssize_t {
-    ZVAL_LONG($result, (long)$1);
-}
-
-// (char **OUTPUT_BUFFER, ssize_t *OUTPUT_LEN)
-//
-// typemap for binary buffer output arguments.  Given an uninitialized pointer for a
-// buffer (OUTPUT_BUFFER) and a pointer to an un-initialized size/error (OUTPUT_LEN), a buffer
-// will be allocated and filled with binary data. *OUTPUT_BUFFER will be set to the address
-// of the allocated buffer.  *OUTPUT_LEN will be set to the size of the data.  The maximum
-// length of the buffer must be provided by a separate argument.
-//
-// The return value is an array, with [0] set to the length of the output buffer OR an
-// error code and [1] set to the returned string object.  This value is appended to the
-// function's return value (also an array).
-//
-%typemap(in,numinputs=0) (char **OUTPUT_BUFFER, ssize_t *OUTPUT_LEN) (char *Buff = 0, ssize_t outLen = 0) {
-    // setup locals for output.
-    $1 = &Buff;
-    $2 = &outLen;
-}
-%typemap(argout,fragment="t_output_helper") (char **OUTPUT_BUFFER, ssize_t *OUTPUT_LEN) {
-    // convert to array: [0]=len||error, [1]=binary string
-    zval *tmp;
-    ALLOC_INIT_ZVAL(tmp);
-    array_init(tmp);
-    ssize_t len = *($2);
-    add_next_index_long(tmp, len); // write the len|error code
-    if (len >= 0) {
-        add_next_index_stringl(tmp, *($1), len, 0);  // 0 == take ownership of $1 memory
-    } else {
-        add_next_index_string(tmp, "", 1);    // 1 = strdup the ""
-    }
-    t_output_helper(&$result, tmp);     // append it to output array
-}
-
-%typemap(in) pn_bytes_t {
-  if (ZVAL_IS_NULL(*$input)) {
-    $1.start = NULL;
-    $1.size = 0;
-  } else {
-    $1.start = Z_STRVAL_PP($input);
-    $1.size = Z_STRLEN_PP($input);
-  }
-}
-
-%typemap(out) pn_bytes_t {
-  ZVAL_STRINGL($result, $1.start, $1.size, 1);
-}
-
-%typemap(in) pn_uuid_t {
-  memmove($1.bytes, Z_STRVAL_PP($input), 16);
-}
-
-%typemap(out) pn_uuid_t {
-  ZVAL_STRINGL($result, $1.bytes, 16, 1);
-}
-
-%typemap(in) pn_decimal128_t {
-  memmove($1.bytes, Z_STRVAL_PP($input), 16);
-}
-
-%typemap(out) pn_decimal128_t {
-  ZVAL_STRINGL($result, $1.bytes, 16, 1);
-}
-
-// The PHP SWIG typedefs define the typemap STRING, LENGTH to be binary safe (allow
-// embedded \0's).
-//
-
-// allow pn_link_send/pn_input's input buffer to be binary safe
-ssize_t pn_link_send(pn_link_t *transport, char *STRING, size_t LENGTH);
-%ignore pn_link_send;
-ssize_t pn_transport_input(pn_transport_t *transport, char *STRING, size_t LENGTH);
-%ignore pn_transport_input;
-
-
-// Use the OUTPUT_BUFFER,OUTPUT_LEN typemap to allow these functions to return
-// variable length binary data.
-
-%rename(pn_link_recv) wrap_pn_link_recv;
-// in PHP:   array = pn_link_recv(link, MAXLEN);
-//           array[0] = size || error code
-//           array[1] = native string containing binary data
-%inline %{
-    void wrap_pn_link_recv(pn_link_t *link, size_t maxCount, char **OUTPUT_BUFFER, ssize_t *OUTPUT_LEN) {
-        *OUTPUT_BUFFER = emalloc(sizeof(char) * maxCount);
-        *OUTPUT_LEN = pn_link_recv(link, *OUTPUT_BUFFER, maxCount );
-    }
-%}
-%ignore pn_link_recv;
-
-%rename(pn_transport_output) wrap_pn_transport_output;
-// in PHP:   array = pn_transport_output(transport, MAXLEN);
-//           array[0] = size || error code
-//           array[1] = native string containing binary data
-%inline %{
-    void wrap_pn_transport_output(pn_transport_t *transport, size_t maxCount, char **OUTPUT_BUFFER, ssize_t *OUTPUT_LEN) {
-        *OUTPUT_BUFFER = emalloc(sizeof(char) * maxCount);
-        *OUTPUT_LEN = pn_transport_output(transport, *OUTPUT_BUFFER, maxCount);
-    }
-%}
-%ignore pn_transport_output;
-
-%rename(pn_message_encode) wrap_pn_message_encode;
-%inline %{
-    void wrap_pn_message_encode(pn_message_t *message, size_t maxCount, char **OUTPUT_BUFFER, ssize_t *OUTPUT_LEN) {
-        *OUTPUT_BUFFER = emalloc(sizeof(char) * maxCount);
-        *OUTPUT_LEN = maxCount;
-        int err = pn_message_encode(message, *OUTPUT_BUFFER, OUTPUT_LEN);
-        if (err) {
-          *OUTPUT_LEN = err;
-          efree(*OUTPUT_BUFFER);
-        }
-    }
-%}
-%ignore pn_message_encode;
-
-
-
-//
-// allow pn_delivery/pn_delivery_tag to accept a binary safe string:
-//
-
-%rename(pn_delivery) wrap_pn_delivery;
-// in PHP:   delivery = pn_delivery(link, "binary safe string");
-//
-%inline %{
-  pn_delivery_t *wrap_pn_delivery(pn_link_t *link, char *STRING, size_t LENGTH) {
-    return pn_delivery(link, pn_dtag(STRING, LENGTH));
-  }
-%}
-%ignore pn_delivery;
-
-// pn_delivery_tag: output a copy of the pn_delivery_tag buffer
-//
-%typemap(in,numinputs=0) (const char **RETURN_STRING, size_t *RETURN_LEN) (char *Buff = 0, size_t outLen = 0) {
-    $1 = &Buff;         // setup locals for holding output values.
-    $2 = &outLen;
-}
-%typemap(argout) (const char **RETURN_STRING, size_t *RETURN_LEN) {
-    // This allocates a copy of the binary buffer for return to the caller
-    ZVAL_STRINGL($result, *($1), *($2), 1); // 1 = duplicate the input buffer
-}
-
-// Suppress "Warning(451): Setting a const char * variable may leak memory." on pn_delivery_tag_t
-%warnfilter(451) pn_delivery_tag_t;
-%rename(pn_delivery_tag) wrap_pn_delivery_tag;
-// in PHP: str = pn_delivery_tag(delivery);
-//
-%inline %{
-    void wrap_pn_delivery_tag(pn_delivery_t *d, const char **RETURN_STRING, size_t *RETURN_LEN) {
-        pn_delivery_tag_t tag = pn_delivery_tag(d);
-        *RETURN_STRING = tag.start;
-        *RETURN_LEN = tag.size;
-    }
-%}
-%ignore pn_delivery_tag;
-
-
-
-//
-// reference counter management for passing a context to/from the listener/connector
-//
-
-%typemap(in) void *PHP_CONTEXT {
-    // since we hold a pointer to the context we must increment the reference count
-    Z_ADDREF_PP($input);
-    $1 = *$input;
-}
-
-// return the context.  Apparently, PHP won't let us return a pointer to a reference
-// counted zval, so we must return a copy of the data
-%typemap(out) void * {
-    *$result = *(zval *)($1);
-    zval_copy_ctor($result);
-}
-
-%include "proton/cproton.i"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/proton.ini.in
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/proton.ini.in b/proton-c/bindings/php/proton.ini.in
deleted file mode 100644
index 51a774e..0000000
--- a/proton-c/bindings/php/proton.ini.in
+++ /dev/null
@@ -1,21 +0,0 @@
-;;
-; Licensed to the Apache Software Foundation (ASF) under one
-; or more contributor license agreements.  See the NOTICE file
-; distributed with this work for additional information
-; regarding copyright ownership.  The ASF licenses this file
-; to you under the Apache License, Version 2.0 (the
-; "License"); you may not use this file except in compliance
-; with the License.  You may obtain a copy of the License at
-;
-;   http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing,
-; software distributed under the License is distributed on an
-; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-; KIND, either express or implied.  See the License for the
-; specific language governing permissions and limitations
-; under the License.
-;;
-
-; Enable cproton extension module
-@PROTON_INI@

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/proton.php
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/proton.php b/proton-c/bindings/php/proton.php
deleted file mode 100644
index 8cad1b2..0000000
--- a/proton-c/bindings/php/proton.php
+++ /dev/null
@@ -1,1119 +0,0 @@
-<?php
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- **/
-
-include("cproton.php");
-
-class ProtonException extends Exception {}
-
-class Timeout extends ProtonException {}
-
-class MessengerException extends ProtonException {}
-
-class MessageException extends ProtonException {}
-
-function code2exc($err) {
-  switch ($err) {
-  case PN_TIMEOUT:
-    return "Timeout";
-  default:
-    return null;
-  }
-}
-
-class Messenger
-{
-  private $impl;
-
-  public function __construct($name=null) {
-    $this->impl = pn_messenger($name);
-  }
-
-  public function __destruct() {
-    pn_messenger_free($this->impl);
-  }
-
-  public function __toString() {
-    return 'Messenger("' . pn_messenger_name($this->impl) . '")';
-  }
-
-  private function _check($value) {
-    if ($value < 0) {
-      $exc = code2exc($value);
-      if ($exc == null) $exc = "MessengerException";
-      throw new $exc("[$value]: " . pn_error_text(pn_messenger_error($this->impl)));
-    } else {
-      return $value;
-    }
-  }
-
-  public function __get($name) {
-    switch ($name) {
-    case "name":
-      return pn_messenger_name($this->impl);
-    case "certificate":
-      return pn_messenger_get_certificate($this->impl);
-    case "private_key":
-      return pn_messenger_get_private_key($this->impl);
-    case "password":
-      return pn_messenger_get_password($this->impl);
-    case "trusted_certificates":
-      return pn_messenger_get_trusted_certificates($this->impl);
-    case "incoming":
-      return $this->incoming();
-    case "outgoing":
-      return $this->outgoing();
-    default:
-      throw new Exception("unknown property: " . $name);
-    }
-  }
-
-  public function __set($name, $value) {
-    switch ($name) {
-    case "certificate":
-      $this->_check(pn_messenger_set_certificate($this->impl, $value));
-      break;
-    case "private_key":
-      $this->_check(pn_messenger_set_private_key($this->impl, $value));
-      break;
-    case "password":
-      $this->_check(pn_messenger_set_password($this->impl, $value));
-      break;
-    case "trusted_certificates":
-      $this->_check(pn_messenger_set_trusted_certificates($this->impl, $value));
-      break;
-    case "timeout":
-      $this->_check(pn_messenger_set_timeout($this->impl, $value));
-      break;
-    case "outgoing_window":
-      $this->_check(pn_messenger_set_outgoing_window($this->impl, $value));
-      break;
-    case "incoming_window":
-      $this->_check(pn_messenger_set_incoming_window($this->impl, $value));
-      break;
-    default:
-      throw new Exception("unknown property: " . $name);
-    }
-  }
-
-  public function start() {
-    $this->_check(pn_messenger_start($this->impl));
-  }
-
-  public function stop() {
-    $this->_check(pn_messenger_stop($this->impl));
-  }
-
-  public function subscribe($source) {
-    if ($source == null) {
-      throw new MessengerException("null source passed to subscribe");
-    }
-    $this->_check(pn_messenger_subscribe($this->impl, $source));
-  }
-
-  public function outgoing_tracker() {
-    return pn_messenger_outgoing_tracker($this->impl);
-  }
-
-  public function put($message) {
-    $message->_pre_encode();
-    $this->_check(pn_messenger_put($this->impl, $message->impl));
-    return $this->outgoing_tracker();
-  }
-
-  public function send($n = -1) {
-    $this->_check(pn_messenger_send($this->impl, $n));
-  }
-
-  public function recv($n = -1) {
-    $this->_check(pn_messenger_recv($this->impl, $n));
-  }
-
-  public function incoming_tracker() {
-    return pn_messenger_incoming_tracker($this->impl);
-  }
-
-  public function get($message) {
-    $this->_check(pn_messenger_get($this->impl, $message->impl));
-    $message->_post_decode();
-    return $this->incoming_tracker();
-  }
-
-  public function accept($tracker = null) {
-    if ($tracker == null) {
-      $tracker = $this->incoming_tracker();
-      $flag = PN_CUMULATIVE;
-    } else {
-      $flag = 0;
-    }
-    $this->_check(pn_messenger_accept($this->impl, $tracker, $flag));
-  }
-
-  public function reject($tracker = null) {
-    if ($tracker == null) {
-      $tracker = $this->incoming_tracker();
-      $flag = PN_CUMULATIVE;
-    } else {
-      $flag = 0;
-    }
-    $this->_check(pn_messenger_reject($this->impl, $tracker, $flag));
-  }
-
-  public function route($pattern, $address) {
-    $this->_check(pn_messenger_route($this->impl, $pattern, $address));
-  }
-
-  public function outgoing() {
-    return pn_messenger_outgoing($this->impl);
-  }
-
-  public function incoming() {
-    return pn_messenger_incoming($this->impl);
-  }
-
-  public function status($tracker) {
-    return pn_messenger_status($this->impl, $tracker);
-  }
-
-}
-
-class Message {
-
-  const DEFAULT_PRIORITY = PN_DEFAULT_PRIORITY;
-
-  var $impl;
-  var $_id;
-  var $_correlation_id;
-  public $instructions = null;
-  public $annotations = null;
-  public $properties = null;
-  public $body = null;
-
-  public function __construct() {
-    $this->impl = pn_message();
-    $this->_id = new Data(pn_message_id($this->impl));
-    $this->_correlation_id = new Data(pn_message_correlation_id($this->impl));
-  }
-
-  public function __destruct() {
-    pn_message_free($this->impl);
-  }
-
-  public function __tostring() {
-    $tmp = pn_string("");
-    pn_inspect($this->impl, $tmp);
-    $result = pn_string_get($tmp);
-    pn_free($tmp);
-    return $result;
-  }
-
-  private function _check($value) {
-    if ($value < 0) {
-      $exc = code2exc($value);
-      if ($exc == null) $exc = "MessageException";
-      throw new $exc("[$value]: " . pn_message_error($this->impl));
-    } else {
-      return $value;
-    }
-  }
-
-  public function __get($name) {
-    if ($name == "impl")
-      throw new Exception();
-    $getter = "_get_$name";
-    return $this->$getter();
-  }
-
-  public function __set($name, $value) {
-    $setter = "_set_$name";
-    $this->$setter($value);
-  }
-
-  function _pre_encode() {
-    $inst = new Data(pn_message_instructions($this->impl));
-    $ann = new Data(pn_message_annotations($this->impl));
-    $props = new Data(pn_message_properties($this->impl));
-    $body = new Data(pn_message_body($this->impl));
-
-    $inst->clear();
-    if ($this->instructions != null)
-      $inst->put_object($this->instructions);
-    $ann->clear();
-    if ($this->annotations != null)
-      $ann->put_object($this->annotations);
-    $props->clear();
-    if ($this->properties != null)
-      $props->put_object($this->properties);
-
-    $body->clear();
-    if ($this->body != null) {
-      $body->put_object($this->body);
-    }
-  }
-
-  function _post_decode() {
-    $inst = new Data(pn_message_instructions($this->impl));
-    $ann = new Data(pn_message_annotations($this->impl));
-    $props = new Data(pn_message_properties($this->impl));
-    $body = new Data(pn_message_body($this->impl));
-
-    if ($inst->next())
-      $this->instructions = $inst->get_object();
-    else
-      $this->instructions = null;
-    if ($ann->next())
-      $this->annotations = $ann->get_object();
-    else
-      $this->annotations = null;
-    if ($props->next())
-      $this->properties = $props->get_object();
-    else
-      $this->properties = null;
-    if ($body->next())
-      $this->body = $body->get_object();
-    else
-      $this->body = null;
-  }
-
-  public function clear() {
-    pn_message_clear($this->impl);
-    $this->instructions = null;
-    $this->annotations = null;
-    $this->properties = null;
-    $this->body = null;
-  }
-
-  private function _get_inferred() {
-    return pn_message_is_inferred($this->impl);
-  }
-
-  private function _set_inferred($value) {
-    $this->_check(pn_message_set_inferred($this->impl, $value));
-  }
-
-  private function _get_durable() {
-    return pn_message_is_durable($this->impl);
-  }
-
-  private function _set_durable($value) {
-    $this->_check(pn_message_set_durable($this->impl, $value));
-  }
-
-  private function _get_priority() {
-    return pn_message_get_priority($this->impl);
-  }
-
-  private function _set_priority($value) {
-    $this->_check(pn_message_set_priority($this->impl, $value));
-  }
-
-  private function _get_ttl() {
-    return pn_message_get_ttl($this->impl);
-  }
-
-  private function _set_ttl($value) {
-    $this->_check(pn_message_set_ttl($this->impl, $value));
-  }
-
-  private function _get_first_acquirer() {
-    return pn_message_is_first_acquirer($this->impl);
-  }
-
-  private function _set_first_acquirer($value) {
-    $this->_check(pn_message_set_first_acquirer($this->impl, $value));
-  }
-
-  private function _get_delivery_count() {
-    return pn_message_get_delivery_count($this->impl);
-  }
-
-  private function _set_delivery_count($value) {
-    $this->_check(pn_message_set_delivery_count($this->impl, $value));
-  }
-
-  private function _get_id() {
-    return $this->_id->get_object();
-  }
-
-  private function _set_id($value) {
-    $this->_id->rewind();
-    $this->_id->put_object($value);
-  }
-
-  private function _get_user_id() {
-    return pn_message_get_user_id($this->impl);
-  }
-
-  private function _set_user_id($value) {
-    $this->_check(pn_message_set_user_id($this->impl, $value));
-  }
-
-  private function _get_address() {
-    return pn_message_get_address($this->impl);
-  }
-
-  private function _set_address($value) {
-    $this->_check(pn_message_set_address($this->impl, $value));
-  }
-
-  private function _get_subject() {
-    return pn_message_get_subject($this->impl);
-  }
-
-  private function _set_subject($value) {
-    $this->_check(pn_message_set_subject($this->impl, $value));
-  }
-
-  private function _get_reply_to() {
-    return pn_message_get_reply_to($this->impl);
-  }
-
-  private function _set_reply_to($value) {
-    $this->_check(pn_message_set_reply_to($this->impl, $value));
-  }
-
-  private function _get_correlation_id() {
-    return $this->_correlation_id->get_object();
-  }
-
-  private function _set_correlation_id($value) {
-    $this->_correlation_id->rewind();
-    $this->_correlation_id->put_object($value);
-  }
-
-  private function _get_content_type() {
-    return pn_message_get_content_type($this->impl);
-  }
-
-  private function _set_content_type($value) {
-    $this->_check(pn_message_set_content_type($this->impl, $value));
-  }
-
-  private function _get_content_encoding() {
-    return pn_message_get_content_encoding($this->impl);
-  }
-
-  private function _set_content_encoding($value) {
-    $this->_check(pn_message_set_content_encoding($this->impl, $value));
-  }
-
-  private function _get_expiry_time() {
-    return pn_message_get_expiry_time($this->impl);
-  }
-
-  private function _set_expiry_time($value) {
-    $this->_check(pn_message_set_expiry_time($this->impl, $value));
-  }
-
-  private function _get_creation_time() {
-    return pn_message_get_creation_time($this->impl);
-  }
-
-  private function _set_creation_time($value) {
-    $this->_check(pn_message_set_creation_time($this->impl, $value));
-  }
-
-  private function _get_group_id() {
-    return pn_message_get_group_id($this->impl);
-  }
-
-  private function _set_group_id($value) {
-    $this->_check(pn_message_set_group_id($this->impl, $value));
-  }
-
-  private function _get_group_sequence() {
-    return pn_message_get_group_sequence($this->impl);
-  }
-
-  private function _set_group_sequence($value) {
-    $this->_check(pn_message_set_group_sequence($this->impl, $value));
-  }
-
-  private function _get_reply_to_group_id() {
-    return pn_message_get_reply_to_group_id($this->impl);
-  }
-
-  private function _set_reply_to_group_id($value) {
-    $this->_check(pn_message_set_reply_to_group_id($this->impl, $value));
-  }
-
-  public function encode() {
-    $this->_pre_encode();
-    $sz = 16;
-    while (true) {
-      list($err, $data) = pn_message_encode($this->impl, $sz);
-      if ($err == PN_OVERFLOW) {
-        $sz *= 2;
-        continue;
-      } else {
-        $this->_check($err);
-        return $data;
-      }
-    }
-  }
-
-  public function decode($data) {
-    $this->_check(pn_message_decode($this->impl, $data, strlen($data)));
-    $this->_post_decode();
-  }
-}
-
-class Binary {
-
-  public $bytes;
-
-  public function __construct($bytes) {
-    $this->bytes = $bytes;
-  }
-
-  public function __tostring() {
-    return "Binary($this->bytes)";
-  }
-
-}
-
-class Symbol {
-
-  public $name;
-
-  public function __construct($name) {
-    $this->name = $name;
-  }
-
-  public function __tostring() {
-    return "Symbol($this->name)";
-  }
-
-}
-
-class UUID {
-
-  public $bytes;
-
-  public function __construct($bytes) {
-    if (strlen($bytes) != 16) {
-      throw new Exception("invalid argument: exactly 16 bytes required");
-    }
-    $this->bytes = $bytes;
-  }
-
-  public function __tostring() {
-    $b = $this->bytes;
-    return sprintf("UUID(%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x)",
-                   ord($b[0]), ord($b[1]), ord($b[2]), ord($b[3]),
-                   ord($b[4]), ord($b[5]), ord($b[6]), ord($b[7]), ord($b[8]), ord($b[9]),
-                   ord($b[10]), ord($b[11]), ord($b[12]), ord($b[13]), ord($b[14]), ord($b[15]));
-  }
-
-}
-
-class PList {
-
-  public $elements;
-
-  public function __construct() {
-    $this->elements = func_get_args();
-  }
-
-  public function __tostring() {
-    return "PList(" . implode(", ", $this->elements) . ")";
-  }
-
-}
-
-class Char {
-
-  public $codepoint;
-
-  public function __construct($codepoint) {
-    $this->codepoint = $codepoint;
-  }
-
-  public function __tostring() {
-    return "Char($this->codepoint)";
-  }
-
-}
-
-class Described {
-
-  public $descriptor;
-  public $value;
-
-  public function __construct($descriptor, $value) {
-    $this->descriptor = $descriptor;
-    $this->value = $value;
-  }
-
-  public function __tostring() {
-    return "Described($this->descriptor, $this->value)";
-  }
-
-}
-
-class DataException extends ProtonException {}
-
-class Data {
-
-  const NULL = PN_NULL;
-  const BOOL = PN_BOOL;
-  const UBYTE = PN_UBYTE;
-  const BYTE = PN_BYTE;
-  const USHORT = PN_USHORT;
-  const SHORT = PN_SHORT;
-  const UINT = PN_UINT;
-  const INT = PN_INT;
-  const CHAR = PN_CHAR;
-  const ULONG = PN_ULONG;
-  const LONG = PN_LONG;
-  const TIMESTAMP = PN_TIMESTAMP;
-  const FLOAT = PN_FLOAT;
-  const DOUBLE = PN_DOUBLE;
-  const DECIMAL32 = PN_DECIMAL32;
-  const DECIMAL64 = PN_DECIMAL64;
-  const DECIMAL128 = PN_DECIMAL128;
-  const UUID = PN_UUID;
-  const BINARY = PN_BINARY;
-  const STRING = PN_STRING;
-  const SYMBOL = PN_SYMBOL;
-  const DESCRIBED = PN_DESCRIBED;
-  const PARRAY = PN_ARRAY;
-  const PLIST = PN_LIST;
-  const MAP = PN_MAP;
-
-  private $impl;
-  private $free;
-
-  public function __construct($capacity=16) {
-    if (is_int($capacity)) {
-      $this->impl = pn_data($capacity);
-      $this->free = true;
-    } else {
-      $this->impl = $capacity;
-      $this->free = false;
-    }
-  }
-
-  public function __destruct() {
-    if ($this->free)
-      pn_data_free($this->impl);
-  }
-
-  public function _check($value) {
-    if ($value < 0) {
-      $exc = code2exc($value);
-      if ($exc == null) $exc = "DataException";
-      throw new $exc("[$value]");
-    } else {
-      return $value;
-    }
-  }
-
-  public function clear() {
-    pn_data_clear($this->impl);
-  }
-
-  public function rewind() {
-    pn_data_rewind($this->impl);
-  }
-
-  public function next() {
-    $found = pn_data_next($this->impl);
-    if ($found)
-      return $this->type();
-    else
-      return null;
-  }
-
-  public function prev() {
-    $found = pn_data_prev($this->impl);
-    if ($found)
-      return $this->type();
-    else
-      return null;
-  }
-
-  public function enter() {
-    return pn_data_enter($this->impl);
-  }
-
-  public function exit_() {
-    return pn_data_exit($this->impl);
-  }
-
-  public function type() {
-    $dtype = pn_data_type($this->impl);
-    if ($dtype == -1)
-      return null;
-    else
-      return $dtype;
-  }
-
-  public function encode() {
-    $size = 1024;
-    while (true) {
-      list($cd, $enc) = pn_data_encode($this->impl, $size);
-      if ($cd == PN_OVERFLOW)
-        $size *= 2;
-      else if ($cd >= 0)
-        return $enc;
-      else
-        $this->_check($cd);
-    }
-  }
-
-  public function decode($encoded) {
-    return $this->_check(pn_data_decode($this->impl, $encoded));
-  }
-
-  public function put_list() {
-    $this->_check(pn_data_put_list($this->impl));
-  }
-
-  public function put_map() {
-    $this->_check(pn_data_put_map($this->impl));
-  }
-
-  public function put_array($described, $element_type) {
-    $this->_check(pn_data_put_array($this->impl, $described, $element_type));
-  }
-
-  public function put_described() {
-    $this->_check(pn_data_put_described($this->impl));
-  }
-
-  public function put_null() {
-    $this->_check(pn_data_put_null($this->impl));
-  }
-
-  public function put_bool($b) {
-    $this->_check(pn_data_put_bool($this->impl, $b));
-  }
-
-  public function put_ubyte($ub) {
-    $this->_check(pn_data_put_ubyte($this->impl, $ub));
-  }
-
-  public function put_byte($b) {
-    $this->_check(pn_data_put_byte($this->impl, $b));
-  }
-
-  public function put_ushort($us) {
-    $this->_check(pn_data_put_ushort($this->impl, $us));
-  }
-
-  public function put_short($s) {
-    $this->_check(pn_data_put_short($this->impl, $s));
-  }
-
-  public function put_uint($ui) {
-    $this->_check(pn_data_put_uint($this->impl, $ui));
-  }
-
-  public function put_int($i) {
-    $this->_check(pn_data_put_int($this->impl, $i));
-  }
-
-  public function put_char($c) {
-    if ($c instanceof Char) {
-      $c = $c->codepoint;
-    } else {
-      $c = ord($c);
-    }
-    $this->_check(pn_data_put_char($this->impl, $c));
-  }
-
-  public function put_ulong($ul) {
-    $this->_check(pn_data_put_ulong($this->impl, $ul));
-  }
-
-  public function put_long($l) {
-    $this->_check(pn_data_put_long($this->impl, $l));
-  }
-
-  public function put_timestamp($t) {
-    $this->_check(pn_data_put_timestamp($this->impl, $t));
-  }
-
-  public function put_float($f) {
-    $this->_check(pn_data_put_float($this->impl, $f));
-  }
-
-  public function put_double($d) {
-    $this->_check(pn_data_put_double($this->impl, $d));
-  }
-
-  public function put_decimal32($d) {
-    $this->_check(pn_data_put_decimal32($this->impl, $d));
-  }
-
-  public function put_decimal64($d) {
-    $this->_check(pn_data_put_decimal64($this->impl, $d));
-  }
-
-  public function put_decimal128($d) {
-    $this->_check(pn_data_put_decimal128($this->impl, $d));
-  }
-
-  public function put_uuid($u) {
-    if ($u instanceof UUID) {
-      $u = $u->bytes;
-    }
-    $this->_check(pn_data_put_uuid($this->impl, $u));
-  }
-
-  public function put_binary($b) {
-    if ($b instanceof Binary) {
-      $b = $b->bytes;
-    }
-    $this->_check(pn_data_put_binary($this->impl, $b));
-  }
-
-  public function put_string($s) {
-    $this->_check(pn_data_put_string($this->impl, $s));
-  }
-
-  public function put_symbol($s) {
-    if ($s instanceof Symbol) {
-      $s = $s->name;
-    }
-    $this->_check(pn_data_put_symbol($this->impl, $s));
-  }
-
-  public function get_list() {
-    return pn_data_get_list($this->impl);
-  }
-
-  public function get_map() {
-    return pn_data_get_map($this->impl);
-  }
-
-  public function get_array() {
-    $count = pn_data_get_array($this->impl);
-    $described = pn_data_is_array_described($this->impl);
-    $type = pn_data_get_array_type($this->impl);
-    if ($type == -1)
-      $type = null;
-    return array($count, $described, $type);
-  }
-
-  public function is_described() {
-    return pn_data_is_described($this->impl);
-  }
-
-  public function is_null() {
-    $this->_check(pn_data_get_null($this->impl));
-  }
-
-  public function get_bool() {
-    return pn_data_get_bool($this->impl);
-  }
-
-  public function get_ubyte() {
-    return pn_data_get_ubyte($this->impl);
-  }
-
-  public function get_byte() {
-    return pn_data_get_byte($this->impl);
-  }
-
-  public function get_ushort() {
-    return pn_data_get_ushort($this->impl);
-  }
-
-  public function get_short() {
-    return pn_data_get_short($this->impl);
-  }
-
-  public function get_uint() {
-    return pn_data_get_uint($this->impl);
-  }
-
-  public function get_int() {
-    return pn_data_get_int($this->impl);
-  }
-
-  public function get_char() {
-    return new Char(pn_data_get_char($this->impl));
-  }
-
-  public function get_ulong() {
-    return pn_data_get_ulong($this->impl);
-  }
-
-  public function get_long() {
-    return pn_data_get_long($this->impl);
-  }
-
-  public function get_timestamp() {
-    return pn_data_get_timestamp($this->impl);
-  }
-
-  public function get_float() {
-    return pn_data_get_float($this->impl);
-  }
-
-  public function get_double() {
-    return pn_data_get_double($this->impl);
-  }
-
-  # XXX: need to convert
-  public function get_decimal32() {
-    return pn_data_get_decimal32($this->impl);
-  }
-
-  # XXX: need to convert
-  public function get_decimal64() {
-    return pn_data_get_decimal64($this->impl);
-  }
-
-  # XXX: need to convert
-  public function get_decimal128() {
-    return pn_data_get_decimal128($this->impl);
-  }
-
-  public function get_uuid() {
-    if (pn_data_type($this->impl) == Data::UUID)
-      return new UUID(pn_data_get_uuid($this->impl));
-    else
-      return null;
-  }
-
-  public function get_binary() {
-    return new Binary(pn_data_get_binary($this->impl));
-  }
-
-  public function get_string() {
-    return pn_data_get_string($this->impl);
-  }
-
-  public function get_symbol() {
-    return new Symbol(pn_data_get_symbol($this->impl));
-  }
-
-  public function copy($src) {
-    $this->_check(pn_data_copy($this->impl, $src->impl));
-  }
-
-  public function format() {
-    $sz = 16;
-    while (true) {
-      list($err, $result) = pn_data_format($this->impl, $sz);
-      if ($err == PN_OVERFLOW) {
-        $sz *= 2;
-        continue;
-      } else {
-        $this->_check($err);
-        return $result;
-      }
-    }
-  }
-
-  public function dump() {
-    pn_data_dump($this->impl);
-  }
-
-  public function get_null() {
-    return null;
-  }
-
-  public function get_php_described() {
-    if ($this->enter()) {
-      try {
-        $this->next();
-        $descriptor = $this->get_object();
-        $this->next();
-        $value = $this->get_object();
-        $this->exit_();
-      } catch (Exception $e) {
-        $this->exit_();
-        throw $e;
-      }
-      return new Described($descriptor, $value);
-    }
-  }
-
-  public function get_php_array() {
-    if ($this->enter()) {
-      try {
-        $result = array();
-        while ($this->next()) {
-          $result[] = $this->get_object();
-        }
-        $this->exit_();
-      } catch (Exception $e) {
-        $this->exit_();
-        throw $e;
-      }
-      return $result;
-    }
-  }
-
-  public function put_php_list($lst) {
-    $this->put_list();
-    $this->enter();
-    try {
-      foreach ($lst->elements as $e) {
-        $this->put_object($e);
-      }
-      $this->exit_();
-    } catch (Exception $e) {
-      $this->exit_();
-      throw $e;
-    }
-  }
-
-  public function get_php_list() {
-    if ($this->enter()) {
-      try {
-        $result = new PList();
-        while ($this->next()) {
-          $result->elements[] = $this->get_object();
-        }
-        $this->exit_();
-      } catch (Exception $e) {
-        $this->exit_();
-        throw $e;
-      }
-
-      return $result;
-    }
-  }
-
-  public function put_php_map($ary) {
-    $this->put_map();
-    $this->enter();
-    try {
-      foreach ($ary as $k => $v) {
-        $this->put_object($k);
-        $this->put_object($v);
-      }
-      $this->exit_();
-    } catch (Exception $e) {
-      $this->exit_();
-      throw $e;
-    }
-  }
-
-  public function get_php_map() {
-    if ($this->enter()) {
-      try {
-        $result = array();
-        while ($this->next()) {
-          $k = $this->get_object();
-          switch ($this->type()) {
-          case Data::BINARY:
-            $k = $k->bytes;
-            break;
-          case Data::SYMBOL:
-            $k = $k->name;
-            break;
-          case Data::STRING:
-          case Data::UBYTE:
-          case Data::BYTE:
-          case Data::USHORT:
-          case Data::SHORT:
-          case Data::UINT:
-          case Data::INT:
-          case Data::ULONG:
-          case Data::LONG:
-            break;
-          default:
-            $k = "$k";
-            break;
-          }
-          if ($this->next())
-            $v = $this->get_object();
-          else
-            $v = null;
-          $result[$k] = $v;
-        }
-        $this->exit_();
-      } catch (Exception $e) {
-        $this->exit_();
-        throw $e;
-      }
-      return $result;
-    }
-  }
-
-  private $put_mappings = array
-    ("NULL" => "put_null",
-     "boolean" => "put_bool",
-     "UUID" => "put_uuid",
-     "string" => "put_string",
-     "Binary" => "put_binary",
-     "Symbol" => "put_symbol",
-     "integer" => "put_long",
-     "Char" => "put_char",
-     "double" => "put_double",
-     "Described" => "put_php_described",
-     "PList" => "put_php_list",
-     "array" => "put_php_map"
-     );
-  private $get_mappings = array
-    (Data::NULL => "get_null",
-     Data::BOOL => "get_bool",
-     Data::UBYTE => "get_ubyte",
-     Data::BYTE => "get_byte",
-     Data::USHORT => "get_ushort",
-     Data::SHORT => "get_short",
-     Data::UINT => "get_uint",
-     Data::INT => "get_int",
-     Data::CHAR => "get_char",
-     Data::ULONG => "get_ulong",
-     Data::LONG => "get_long",
-     Data::TIMESTAMP => "get_timestamp",
-     Data::FLOAT => "get_float",
-     Data::DOUBLE => "get_double",
-     Data::DECIMAL32 => "get_decimal32",
-     Data::DECIMAL64 => "get_decimal64",
-     Data::DECIMAL128 => "get_decimal128",
-     Data::UUID => "get_uuid",
-     Data::BINARY => "get_binary",
-     Data::STRING => "get_string",
-     Data::SYMBOL => "get_symbol",
-     Data::DESCRIBED => "get_php_described",
-     Data::PARRAY => "get_php_array",
-     Data::PLIST => "get_php_list",
-     Data::MAP => "get_php_map"
-     );
-
-  public function put_object($obj) {
-    $type = gettype($obj);
-    if ($type == "object") {
-      $type = get_class($obj);
-    }
-    $putter = $this->put_mappings[$type];
-    if ($putter == null)
-      throw new DataException("unknown type: $type");
-    $this->$putter($obj);
-  }
-
-  public function get_object() {
-    $type = $this->type();
-    if ($type == null) return null;
-    $getter = $this->get_mappings[$type];
-    return $this->$getter();
-  }
-
-}
-
-?>

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/php/tests.php
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/tests.php b/proton-c/bindings/php/tests.php
deleted file mode 100644
index 8ae45cf..0000000
--- a/proton-c/bindings/php/tests.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-include("proton.php");
-
-function round_trip($body) {
-  $msg = new Message();
-  $msg->inferred = true;
-  $msg->durable = true;
-  $msg->id = 10;
-  $msg->correlation_id = "asdf";
-  $msg->properties = array();
-  $msg->properties["null"] = null;
-  $msg->properties["boolean"] = true;
-  $msg->properties["integer"] = 123;
-  $msg->properties["double"] = 3.14159;
-  $msg->properties["binary"] = new Binary("binary");
-  $msg->properties["symbol"] = new Symbol("symbol");
-  $msg->properties["uuid"] = new UUID("1234123412341234");
-  $msg->properties["list"] = new PList(1, 2, 3, 4);
-  $msg->properties["char"] = new Char(321);
-  $msg->body = $body;
-  assert($msg->id == 10);
-  assert($msg->correlation_id == "asdf");
-
-  $copy = new Message();
-  $copy->decode($msg->encode());
-  assert($copy->id == $msg->id);
-  assert($copy->correlation_id == $msg->correlation_id);
-  $diff = array_diff($msg->properties, $copy->properties);
-  assert($copy->durable == $msg->durable);
-  assert(count($diff) == 0);
-  assert($copy->body == $msg->body);
-}
-
-round_trip("this is a string body");
-round_trip(new Binary("this is a binary body"));
-round_trip(new Symbol("this is a symbol body"));
-round_trip(true);
-round_trip(1234);
-round_trip(3.14159);
-round_trip(array("pi" => 3.14159, "blueberry-pi" => "yummy"));
-
-?>

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/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 1878d57..60f7323 100644
--- a/proton-c/bindings/python/proton/__init__.py
+++ b/proton-c/bindings/python/proton/__init__.py
@@ -23,7 +23,6 @@ protocol.
 
 The proton APIs consist of the following classes:
 
- - L{Messenger} -- A messaging endpoint.
  - L{Message}   -- A class for creating and/or accessing AMQP message content.
  - L{Data}      -- A class for creating and/or accessing arbitrary AMQP encoded
                   data.
@@ -166,13 +165,6 @@ class Interrupt(ProtonException):
   """
   pass
 
-class MessengerException(ProtonException):
-  """
-  The root of the messenger exception hierarchy. All exceptions
-  generated by the messenger class derive from this exception.
-  """
-  pass
-
 class MessageException(ProtonException):
   """
   The MessageException class is the root of the message exception
@@ -205,600 +197,6 @@ STATUSES = {
   PN_STATUS_UNKNOWN: None
   }
 
-AUTOMATIC = Constant("AUTOMATIC")
-MANUAL = Constant("MANUAL")
-
-class Messenger(object):
-  """
-  The L{Messenger} class defines a high level interface for sending
-  and receiving L{Messages<Message>}. Every L{Messenger} contains a
-  single logical queue of incoming messages and a single logical queue
-  of outgoing messages. These messages in these queues may be destined
-  for, or originate from, a variety of addresses.
-
-  The messenger interface is single-threaded.  All methods
-  except one (L{interrupt}) are intended to be used from within
-  the messenger thread.
-
-
-  Address Syntax
-  ==============
-
-  An address has the following form::
-
-    [ amqp[s]:// ] [user[:password]@] domain [/[name]]
-
-  Where domain can be one of::
-
-    host | host:port | ip | ip:port | name
-
-  The following are valid examples of addresses:
-
-   - example.org
-   - example.org:1234
-   - amqp://example.org
-   - amqps://example.org
-   - example.org/incoming
-   - amqps://example.org/outgoing
-   - amqps://fred:trustno1@example.org
-   - 127.0.0.1:1234
-   - amqps://127.0.0.1:1234
-
-  Sending & Receiving Messages
-  ============================
-
-  The L{Messenger} class works in conjunction with the L{Message} class. The
-  L{Message} class is a mutable holder of message content.
-
-  The L{put} method copies its L{Message} to the outgoing queue, and may
-  send queued messages if it can do so without blocking.  The L{send}
-  method blocks until it has sent the requested number of messages,
-  or until a timeout interrupts the attempt.
-
-
-    >>> message = Message()
-    >>> for i in range(3):
-    ...   message.address = "amqp://host/queue"
-    ...   message.subject = "Hello World %i" % i
-    ...   messenger.put(message)
-    >>> messenger.send()
-
-  Similarly, the L{recv} method receives messages into the incoming
-  queue, and may block as it attempts to receive the requested number
-  of messages,  or until timeout is reached. It may receive fewer
-  than the requested number.  The L{get} method pops the
-  eldest L{Message} off the incoming queue and copies it into the L{Message}
-  object that you supply.  It will not block.
-
-
-    >>> message = Message()
-    >>> messenger.recv(10):
-    >>> while messenger.incoming > 0:
-    ...   messenger.get(message)
-    ...   print message.subject
-    Hello World 0
-    Hello World 1
-    Hello World 2
-
-  The blocking flag allows you to turn off blocking behavior entirely,
-  in which case L{send} and L{recv} will do whatever they can without
-  blocking, and then return.  You can then look at the number
-  of incoming and outgoing messages to see how much outstanding work
-  still remains.
-  """
-
-  def __init__(self, name=None):
-    """
-    Construct a new L{Messenger} with the given name. The name has
-    global scope. If a NULL name is supplied, a UUID based name will
-    be chosen.
-
-    @type name: string
-    @param name: the name of the messenger or None
-
-    """
-    self._mng = pn_messenger(name)
-    self._selectables = {}
-
-  def __del__(self):
-    """
-    Destroy the L{Messenger}.  This will close all connections that
-    are managed by the L{Messenger}.  Call the L{stop} method before
-    destroying the L{Messenger}.
-    """
-    if hasattr(self, "_mng"):
-      pn_messenger_free(self._mng)
-      del self._mng
-
-  def _check(self, err):
-    if err < 0:
-      if (err == PN_INPROGRESS):
-        return
-      exc = EXCEPTIONS.get(err, MessengerException)
-      raise exc("[%s]: %s" % (err, pn_error_text(pn_messenger_error(self._mng))))
-    else:
-      return err
-
-  @property
-  def name(self):
-    """
-    The name of the L{Messenger}.
-    """
-    return pn_messenger_name(self._mng)
-
-  def _get_certificate(self):
-    return pn_messenger_get_certificate(self._mng)
-
-  def _set_certificate(self, value):
-    self._check(pn_messenger_set_certificate(self._mng, value))
-
-  certificate = property(_get_certificate, _set_certificate,
-                         doc="""
-Path to a certificate file for the L{Messenger}. This certificate is
-used when the L{Messenger} accepts or establishes SSL/TLS connections.
-This property must be specified for the L{Messenger} to accept
-incoming SSL/TLS connections and to establish client authenticated
-outgoing SSL/TLS connection. Non client authenticated outgoing SSL/TLS
-connections do not require this property.
-""")
-
-  def _get_private_key(self):
-    return pn_messenger_get_private_key(self._mng)
-
-  def _set_private_key(self, value):
-    self._check(pn_messenger_set_private_key(self._mng, value))
-
-  private_key = property(_get_private_key, _set_private_key,
-                         doc="""
-Path to a private key file for the L{Messenger's<Messenger>}
-certificate. This property must be specified for the L{Messenger} to
-accept incoming SSL/TLS connections and to establish client
-authenticated outgoing SSL/TLS connection. Non client authenticated
-SSL/TLS connections do not require this property.
-""")
-
-  def _get_password(self):
-    return pn_messenger_get_password(self._mng)
-
-  def _set_password(self, value):
-    self._check(pn_messenger_set_password(self._mng, value))
-
-  password = property(_get_password, _set_password,
-                      doc="""
-This property contains the password for the L{Messenger.private_key}
-file, or None if the file is not encrypted.
-""")
-
-  def _get_trusted_certificates(self):
-    return pn_messenger_get_trusted_certificates(self._mng)
-
-  def _set_trusted_certificates(self, value):
-    self._check(pn_messenger_set_trusted_certificates(self._mng, value))
-
-  trusted_certificates = property(_get_trusted_certificates,
-                                  _set_trusted_certificates,
-                                  doc="""
-A path to a database of trusted certificates for use in verifying the
-peer on an SSL/TLS connection. If this property is None, then the peer
-will not be verified.
-""")
-
-  def _get_timeout(self):
-    t = pn_messenger_get_timeout(self._mng)
-    if t == -1:
-      return None
-    else:
-      return millis2secs(t)
-
-  def _set_timeout(self, value):
-    if value is None:
-      t = -1
-    else:
-      t = secs2millis(value)
-    self._check(pn_messenger_set_timeout(self._mng, t))
-
-  timeout = property(_get_timeout, _set_timeout,
-                     doc="""
-The timeout property contains the default timeout for blocking
-operations performed by the L{Messenger}.
-""")
-
-  def _is_blocking(self):
-    return pn_messenger_is_blocking(self._mng)
-
-  def _set_blocking(self, b):
-    self._check(pn_messenger_set_blocking(self._mng, b))
-
-  blocking = property(_is_blocking, _set_blocking,
-                      doc="""
-Enable or disable blocking behavior during L{Message} sending
-and receiving.  This affects every blocking call, with the
-exception of L{work}.  Currently, the affected calls are
-L{send}, L{recv}, and L{stop}.
-""")
-
-  def _is_passive(self):
-    return pn_messenger_is_passive(self._mng)
-
-  def _set_passive(self, b):
-    self._check(pn_messenger_set_passive(self._mng, b))
-
-  passive = property(_is_passive, _set_passive,
-                      doc="""
-When passive is set to true, Messenger will not attempt to perform I/O
-internally. In this mode it is necessary to use the selectables API to
-drive any I/O needed to perform requested actions. In this mode
-Messenger will never block.
-""")
-
-  def _get_incoming_window(self):
-    return pn_messenger_get_incoming_window(self._mng)
-
-  def _set_incoming_window(self, window):
-    self._check(pn_messenger_set_incoming_window(self._mng, window))
-
-  incoming_window = property(_get_incoming_window, _set_incoming_window,
-                             doc="""
-The incoming tracking window for the messenger. The messenger will
-track the remote status of this many incoming deliveries after they
-have been accepted or rejected. Defaults to zero.
-
-L{Messages<Message>} enter this window only when you take them into your application
-using L{get}.  If your incoming window size is I{n}, and you get I{n}+1 L{messages<Message>}
-without explicitly accepting or rejecting the oldest message, then the
-message that passes beyond the edge of the incoming window will be assigned
-the default disposition of its link.
-""")
-
-  def _get_outgoing_window(self):
-    return pn_messenger_get_outgoing_window(self._mng)
-
-  def _set_outgoing_window(self, window):
-    self._check(pn_messenger_set_outgoing_window(self._mng, window))
-
-  outgoing_window = property(_get_outgoing_window, _set_outgoing_window,
-                             doc="""
-The outgoing tracking window for the messenger. The messenger will
-track the remote status of this many outgoing deliveries after calling
-send. Defaults to zero.
-
-A L{Message} enters this window when you call the put() method with the
-message.  If your outgoing window size is I{n}, and you call L{put} I{n}+1
-times, status information will no longer be available for the
-first message.
-""")
-
-  def start(self):
-    """
-    Currently a no-op placeholder.
-    For future compatibility, do not L{send} or L{recv} messages
-    before starting the L{Messenger}.
-    """
-    self._check(pn_messenger_start(self._mng))
-
-  def stop(self):
-    """
-    Transitions the L{Messenger} to an inactive state. An inactive
-    L{Messenger} will not send or receive messages from its internal
-    queues. A L{Messenger} should be stopped before being discarded to
-    ensure a clean shutdown handshake occurs on any internally managed
-    connections.
-    """
-    self._check(pn_messenger_stop(self._mng))
-
-  @property
-  def stopped(self):
-    """
-    Returns true iff a L{Messenger} is in the stopped state.
-    This function does not block.
-    """
-    return pn_messenger_stopped(self._mng)
-
-  def subscribe(self, source):
-    """
-    Subscribes the L{Messenger} to messages originating from the
-    specified source. The source is an address as specified in the
-    L{Messenger} introduction with the following addition. If the
-    domain portion of the address begins with the '~' character, the
-    L{Messenger} will interpret the domain as host/port, bind to it,
-    and listen for incoming messages. For example "~0.0.0.0",
-    "amqp://~0.0.0.0", and "amqps://~0.0.0.0" will all bind to any
-    local interface and listen for incoming messages with the last
-    variant only permitting incoming SSL connections.
-
-    @type source: string
-    @param source: the source of messages to subscribe to
-    """
-    sub_impl = pn_messenger_subscribe(self._mng, source)
-    if not sub_impl:
-      self._check(pn_error_code(pn_messenger_error(self._mng)))
-      raise MessengerException("Cannot subscribe to %s"%source)
-    return Subscription(sub_impl)
-
-  def put(self, message):
-    """
-    Places the content contained in the message onto the outgoing
-    queue of the L{Messenger}. This method will never block, however
-    it will send any unblocked L{Messages<Message>} in the outgoing
-    queue immediately and leave any blocked L{Messages<Message>}
-    remaining in the outgoing queue. The L{send} call may be used to
-    block until the outgoing queue is empty. The L{outgoing} property
-    may be used to check the depth of the outgoing queue.
-
-    When the content in a given L{Message} object is copied to the outgoing
-    message queue, you may then modify or discard the L{Message} object
-    without having any impact on the content in the outgoing queue.
-
-    This method returns an outgoing tracker for the L{Message}.  The tracker
-    can be used to determine the delivery status of the L{Message}.
-
-    @type message: Message
-    @param message: the message to place in the outgoing queue
-    @return: a tracker
-    """
-    message._pre_encode()
-    self._check(pn_messenger_put(self._mng, message._msg))
-    return pn_messenger_outgoing_tracker(self._mng)
-
-  def status(self, tracker):
-    """
-    Gets the last known remote state of the delivery associated with
-    the given tracker.
-
-    @type tracker: tracker
-    @param tracker: the tracker whose status is to be retrieved
-
-    @return: one of None, PENDING, REJECTED, MODIFIED, or ACCEPTED
-    """
-    disp = pn_messenger_status(self._mng, tracker);
-    return STATUSES.get(disp, disp)
-
-  def buffered(self, tracker):
-    """
-    Checks if the delivery associated with the given tracker is still
-    waiting to be sent.
-
-    @type tracker: tracker
-    @param tracker: the tracker whose status is to be retrieved
-
-    @return: true if delivery is still buffered
-    """
-    return pn_messenger_buffered(self._mng, tracker);
-
-  def settle(self, tracker=None):
-    """
-    Frees a L{Messenger} from tracking the status associated with a given
-    tracker. If you don't supply a tracker, all outgoing L{messages<Message>} up
-    to the most recent will be settled.
-    """
-    if tracker is None:
-      tracker = pn_messenger_outgoing_tracker(self._mng)
-      flags = PN_CUMULATIVE
-    else:
-      flags = 0
-    self._check(pn_messenger_settle(self._mng, tracker, flags))
-
-  def send(self, n=-1):
-    """
-    This call will block until the indicated number of L{messages<Message>}
-    have been sent, or until the operation times out.  If n is -1 this call will
-    block until all outgoing L{messages<Message>} have been sent. If n is 0 then
-    this call will send whatever it can without blocking.
-    """
-    self._check(pn_messenger_send(self._mng, n))
-
-  def recv(self, n=None):
-    """
-    Receives up to I{n} L{messages<Message>} into the incoming queue.  If no value
-    for I{n} is supplied, this call will receive as many L{messages<Message>} as it
-    can buffer internally.  If the L{Messenger} is in blocking mode, this
-    call will block until at least one L{Message} is available in the
-    incoming queue.
-    """
-    if n is None:
-      n = -1
-    self._check(pn_messenger_recv(self._mng, n))
-
-  def work(self, timeout=None):
-    """
-    Sends or receives any outstanding L{messages<Message>} queued for a L{Messenger}.
-    This will block for the indicated timeout.
-    This method may also do I/O work other than sending and receiving
-    L{messages<Message>}.  For example, closing connections after messenger.L{stop}()
-    has been called.
-    """
-    if timeout is None:
-      t = -1
-    else:
-      t = secs2millis(timeout)
-    err = pn_messenger_work(self._mng, t)
-    if (err == PN_TIMEOUT):
-      return False
-    else:
-      self._check(err)
-      return True
-
-  @property
-  def receiving(self):
-    return pn_messenger_receiving(self._mng)
-
-  def interrupt(self):
-    """
-    The L{Messenger} interface is single-threaded.
-    This is the only L{Messenger} function intended to be called
-    from outside of the L{Messenger} thread.
-    Call this from a non-messenger thread to interrupt
-    a L{Messenger} that is blocking.
-    This will cause any in-progress blocking call to throw
-    the L{Interrupt} exception.  If there is no currently blocking
-    call, then the next blocking call will be affected, even if it
-    is within the same thread that interrupt was called from.
-    """
-    self._check(pn_messenger_interrupt(self._mng))
-
-  def get(self, message=None):
-    """
-    Moves the message from the head of the incoming message queue into
-    the supplied message object. Any content in the message will be
-    overwritten.
-
-    A tracker for the incoming L{Message} is returned.  The tracker can
-    later be used to communicate your acceptance or rejection of the
-    L{Message}.
-
-    If None is passed in for the L{Message} object, the L{Message}
-    popped from the head of the queue is discarded.
-
-    @type message: Message
-    @param message: the destination message object
-    @return: a tracker
-    """
-    if message is None:
-      impl = None
-    else:
-      impl = message._msg
-    self._check(pn_messenger_get(self._mng, impl))
-    if message is not None:
-      message._post_decode()
-    return pn_messenger_incoming_tracker(self._mng)
-
-  def accept(self, tracker=None):
-    """
-    Signal the sender that you have acted on the L{Message}
-    pointed to by the tracker.  If no tracker is supplied,
-    then all messages that have been returned by the L{get}
-    method are accepted, except those that have already been
-    auto-settled by passing beyond your incoming window size.
-
-    @type tracker: tracker
-    @param tracker: a tracker as returned by get
-    """
-    if tracker is None:
-      tracker = pn_messenger_incoming_tracker(self._mng)
-      flags = PN_CUMULATIVE
-    else:
-      flags = 0
-    self._check(pn_messenger_accept(self._mng, tracker, flags))
-
-  def reject(self, tracker=None):
-    """
-    Rejects the L{Message} indicated by the tracker.  If no tracker
-    is supplied, all messages that have been returned by the L{get}
-    method are rejected, except those that have already been auto-settled
-    by passing beyond your outgoing window size.
-
-    @type tracker: tracker
-    @param tracker: a tracker as returned by get
-    """
-    if tracker is None:
-      tracker = pn_messenger_incoming_tracker(self._mng)
-      flags = PN_CUMULATIVE
-    else:
-      flags = 0
-    self._check(pn_messenger_reject(self._mng, tracker, flags))
-
-  @property
-  def outgoing(self):
-    """
-    The outgoing queue depth.
-    """
-    return pn_messenger_outgoing(self._mng)
-
-  @property
-  def incoming(self):
-    """
-    The incoming queue depth.
-    """
-    return pn_messenger_incoming(self._mng)
-
-  def route(self, pattern, address):
-    """
-          Adds a routing rule to a L{Messenger's<Messenger>} internal routing table.
-
-          The route procedure may be used to influence how a L{Messenger} will
-          internally treat a given address or class of addresses. Every call
-          to the route procedure will result in L{Messenger} appending a routing
-          rule to its internal routing table.
-
-          Whenever a L{Message} is presented to a L{Messenger} for delivery, it
-          will match the address of this message against the set of routing
-          rules in order. The first rule to match will be triggered, and
-          instead of routing based on the address presented in the message,
-          the L{Messenger} will route based on the address supplied in the rule.
-
-          The pattern matching syntax supports two types of matches, a '%'
-          will match any character except a '/', and a '*' will match any
-          character including a '/'.
-
-          A routing address is specified as a normal AMQP address, however it
-          may additionally use substitution variables from the pattern match
-          that triggered the rule.
-
-          Any message sent to "foo" will be routed to "amqp://foo.com":
-
-             >>> messenger.route("foo", "amqp://foo.com");
-
-          Any message sent to "foobar" will be routed to
-          "amqp://foo.com/bar":
-
-             >>> messenger.route("foobar", "amqp://foo.com/bar");
-
-          Any message sent to bar/<path> will be routed to the corresponding
-          path within the amqp://bar.com domain:
-
-             >>> messenger.route("bar/*", "amqp://bar.com/$1");
-
-          Route all L{messages<Message>} over TLS:
-
-             >>> messenger.route("amqp:*", "amqps:$1")
-
-          Supply credentials for foo.com:
-
-             >>> messenger.route("amqp://foo.com/*", "amqp://user:password@foo.com/$1");
-
-          Supply credentials for all domains:
-
-             >>> messenger.route("amqp://*", "amqp://user:password@$1");
-
-          Route all addresses through a single proxy while preserving the
-          original destination:
-
-             >>> messenger.route("amqp://%/*", "amqp://user:password@proxy/$1/$2");
-
-          Route any address through a single broker:
-
-             >>> messenger.route("*", "amqp://user:password@broker/$1");
-    """
-    self._check(pn_messenger_route(self._mng, unicode2utf8(pattern), unicode2utf8(address)))
-
-  def rewrite(self, pattern, address):
-    """
-    Similar to route(), except that the destination of
-    the L{Message} is determined before the message address is rewritten.
-
-    The outgoing address is only rewritten after routing has been
-    finalized.  If a message has an outgoing address of
-    "amqp://0.0.0.0:5678", and a rewriting rule that changes its
-    outgoing address to "foo", it will still arrive at the peer that
-    is listening on "amqp://0.0.0.0:5678", but when it arrives there,
-    the receiver will see its outgoing address as "foo".
-
-    The default rewrite rule removes username and password from addresses
-    before they are transmitted.
-    """
-    self._check(pn_messenger_rewrite(self._mng, unicode2utf8(pattern), unicode2utf8(address)))
-
-  def selectable(self):
-    return Selectable.wrap(pn_messenger_selectable(self._mng))
-
-  @property
-  def deadline(self):
-    tstamp = pn_messenger_deadline(self._mng)
-    if tstamp:
-      return millis2secs(tstamp)
-    else:
-      return None
-
 class Message(object):
   """The L{Message} class is a mutable holder of message content.
 
@@ -1190,15 +588,6 @@ The group-id for any replies.
     self._check(err)
     return result
 
-class Subscription(object):
-
-  def __init__(self, impl):
-    self._impl = impl
-
-  @property
-  def address(self):
-    return pn_subscription_address(self._impl)
-
 _DEFAULT = object()
 
 class Selectable(Wrapper):
@@ -4291,9 +3680,7 @@ __all__ = [
            "IMPLEMENTATION_LANGUAGE",
            "ABORTED",
            "ACCEPTED",
-           "AUTOMATIC",
            "PENDING",
-           "MANUAL",
            "REJECTED",
            "RELEASED",
            "MODIFIED",
@@ -4314,8 +3701,6 @@ __all__ = [
            "Link",
            "Message",
            "MessageException",
-           "Messenger",
-           "MessengerException",
            "ProtonException",
            "VERSION_MAJOR",
            "VERSION_MINOR",

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/ruby/lib/messenger/messenger.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/messenger/messenger.rb b/proton-c/bindings/ruby/lib/messenger/messenger.rb
deleted file mode 100644
index 912d159..0000000
--- a/proton-c/bindings/ruby/lib/messenger/messenger.rb
+++ /dev/null
@@ -1,703 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-module Qpid::Proton::Messenger
-  # @deprecated use {Qpid::Proton::Container}
-  #
-  # The +Messenger+ class defines a high level interface for
-  # sending and receiving Messages. Every Messenger contains
-  # a single logical queue of incoming messages and a single
-  # logical queue of outgoing messages. These messages in these
-  # queues may be destined for, or originate from, a variety of
-  # addresses.
-  #
-  # The messenger interface is single-threaded.  All methods
-  # except one ( #interrupt ) are intended to be used from within
-  # the messenger thread.
-  #
-  # === Sending & Receiving Messages
-  #
-  # The Messenger class works in conjuction with the Message class. The
-  # Message class is a mutable holder of message content.
-  #
-  # The put method copies its Message to the outgoing queue, and may
-  # send queued messages if it can do so without blocking.  The send
-  # method blocks until it has sent the requested number of 
-  # or until a timeout interrupts the attempt.
-  #
-  # Similarly, the recv method receives messages into the incoming
-  # queue, and may block as it attempts to receive the requested number
-  # of messages,  or until timeout is reached. It may receive fewer
-  # than the requested number.  The get method pops the
-  # eldest Message off the incoming queue and copies it into the Message
-  # object that you supply.  It will not block.
-  #
-  # The blocking attribute allows you to turn off blocking behavior entirely,
-  # in which case send and recv will do whatever they can without
-  # blocking, and then return.  You can then look at the number
-  # of incoming and outgoing messages to see how much outstanding work
-  # still remains.
-  #
-  class Messenger
-
-    include Qpid::Proton::Util::ErrorHandler
-    include Qpid::Proton::Util::Deprecation
-
-    # Creates a new +Messenger+.
-    #
-    # The +name+ parameter is optional. If one is not provided then
-    # a unique name is generated.
-    #
-    # ==== Options
-    #
-    # * name - the name (def. nil)
-    #
-    def initialize(name = nil)
-      deprecated Qpid::Proton::Messenger, Qpid::Proton::Container
-      @impl = Cproton.pn_messenger(name)
-      @selectables = {}
-      ObjectSpace.define_finalizer(self, self.class.finalize!(@impl))
-    end
-
-    def self.finalize!(impl) # :nodoc:
-      proc {
-        Cproton.pn_messenger_free(impl)
-      }
-    end
-
-    # Returns the name.
-    #
-    def name
-      Cproton.pn_messenger_name(@impl)
-    end
-
-    # This property contains the password for the Messenger.private_key
-    # file, or +nil+ if the file is not encrypted.
-    #
-    # ==== Arguments
-    #
-    # * password - the password
-    #
-    def password=(password)
-      Cproton.pn_messenger_set_password(@impl, password)
-    end
-
-    # Returns the password property for the Messenger.private_key file.
-    #
-    def password
-      Cproton.pn_messenger_get_password(@impl)
-    end
-
-    # Sets the timeout period, in milliseconds.
-    #
-    # A negative timeout period implies an infinite timeout.
-    #
-    # ==== Options
-    #
-    # * timeout - the timeout period
-    #
-    def timeout=(timeout)
-      raise TypeError.new("invalid timeout: #{timeout}") if timeout.nil?
-      Cproton.pn_messenger_set_timeout(@impl, timeout)
-    end
-
-    # Returns the timeout period
-    #
-    def timeout
-      Cproton.pn_messenger_get_timeout(@impl)
-    end
-
-    # Returns true if blocking mode is enabled.
-    #
-    # Enable or disable blocking behavior during message sending
-    # and receiving.  This affects every blocking call, with the
-    # exception of work().  Currently, the affected calls are
-    # send, recv, and stop.
-    def blocking?
-      Cproton.pn_messenger_is_blocking(@impl)
-    end
-
-    # Sets the blocking mode.
-    def blocking=(blocking)
-      Cproton.pn_messenger_set_blocking(@impl, blocking)
-    end
-
-    # Returns true if passive mode is enabled.
-    #
-    def passive?
-      Cproton.pn_messenger_is_passive(@impl)
-    end
-
-    # Turns passive mode on or off.
-    #
-    # When set to passive mode, Messenger will not attempt to perform I/O
-    # operations internally. In this mode it is necesssary to use the
-    # Selectable type to drive any I/O needed to perform requestioned
-    # actions.
-    #
-    # In this mode Messenger will never block.
-    #
-    def passive=(mode)
-      Cproton.pn_messenger_set_passive(@impl, mode)
-    end
-
-    def deadline
-      tstamp = Cproton.pn_messenger_deadline(@impl)
-      return tstamp / 1000.0 unless tstamp.nil?
-    end
-
-    # Reports whether an error occurred.
-    #
-    def error?
-      !Cproton.pn_messenger_errno(@impl).zero?
-    end
-
-    # Returns the most recent error number.
-    #
-    def errno
-      Cproton.pn_messenger_errno(@impl)
-    end
-
-    # Returns the most recent error message.
-    #
-    def error
-      Cproton.pn_error_text(Cproton.pn_messenger_error(@impl))
-    end
-
-    # Clears the current error state.
-    #
-    def clear_error
-      error = Cproton.pn_messenger_error(@impl)
-      unless error.nil?
-        Cproton.pn_error_clear(error)
-      end
-    end
-
-    # For future compatibility, do not send or recv messages
-    # before starting the +Messenger+.
-    #
-    def start
-      at_exit { stop }
-      Cproton.pn_messenger_start(@impl)
-    end
-
-    # Stops the +Messenger+, preventing it from sending or receiving
-    # any more messages.
-    #
-    def stop
-      Cproton.pn_messenger_stop(@impl)
-    end
-
-    # Returns true if a Messenger is in the stopped state.
-    # This function does not block.
-    #
-    def stopped?
-      Cproton.pn_messenger_stopped(@impl)
-    end
-
-    # Subscribes the Messenger to messages originating from the
-    # specified source. The source is an address as specified in the
-    # Messenger introduction with the following addition. If the
-    # domain portion of the address begins with the '~' character, the
-    # Messenger will interpret the domain as host/port, bind to it,
-    # and listen for incoming messages. For example "~0.0.0.0",
-    # "amqp://~0.0.0.0" will all bind to any local interface and
-    # listen for incoming messages.  An address of "amqps://~0.0.0.0"
-    # will only permit incoming SSL connections.
-    #
-    # ==== Options
-    #
-    # * address - the source address to be subscribe
-    # * timeout - an optional time-to-live value, in seconds, for the
-    #             subscription
-    #
-    def subscribe(address, timeout=0)
-      raise TypeError.new("invalid address: #{address}") if address.nil?
-      subscription = Cproton.pn_messenger_subscribe_ttl(@impl, address, timeout)
-      raise Qpid::Proton::ProtonError.new("Subscribe failed") if subscription.nil?
-      Subscription.new(subscription)
-    end
-
-    # Path to a certificate file for the +Messenger+.
-    #
-    # This certificate is used when the +Messenger+ accepts or establishes
-    # SSL/TLS connections.  This property must be specified for the
-    # Messenger to accept incoming SSL/TLS connections and to establish
-    # client authenticated outgoing SSL/TLS connection.  Non client authenticated
-    # outgoing SSL/TLS connections do not require this property.
-    #
-    # ==== Options
-    #
-    # * certificate - the certificate
-    #
-    def certificate=(certificate)
-      Cproton.pn_messenger_set_certificate(@impl, certificate)
-    end
-
-    # Returns the path to a certificate file.
-    #
-    def certificate
-      Cproton.pn_messenger_get_certificate(@impl)
-    end
-
-    # Path to a private key file for the +Messenger+.
-    #
-    # The property must be specified for the +Messenger+ to accept incoming
-    # SSL/TLS connections and to establish client authenticated outgoing
-    # SSL/TLS connections.  Non client authenticated SSL/TLS connections
-    # do not require this property.
-    #
-    # ==== Options
-    #
-    # * key - the key file
-    #
-    def private_key=(key)
-      Cproton.pn_messenger_set_private_key(@impl, key)
-    end
-
-    # Returns the path to a private key file.
-    #
-    def private_key
-      Cproton.pn_messenger_get_private_key(@impl)
-    end
-
-    # A path to a database of trusted certificates for use in verifying the
-    # peer on an SSL/TLS connection. If this property is +nil+, then the
-    # peer will not be verified.
-    #
-    # ==== Options
-    #
-    # * certificates - the certificates path
-    #
-    def trusted_certificates=(certificates)
-      Cproton.pn_messenger_set_trusted_certificates(@impl,certificates)
-    end
-
-    # The path to the databse of trusted certificates.
-    #
-    def trusted_certificates
-      Cproton.pn_messenger_get_trusted_certificates(@impl)
-    end
-
-    # Places the content contained in the message onto the outgoing
-    # queue of the Messenger.
-    #
-    # This method will never block, however it will send any unblocked
-    # Messages in the outgoing queue immediately and leave any blocked
-    # Messages remaining in the outgoing queue.
-    # The send call may then be used to block until the outgoing queue
-    # is empty.  The outgoing attribute may be used to check the depth
-    # of the outgoing queue.
-    #
-    # ==== Options
-    #
-    # * message - the message
-    #
-    def put(message)
-      if message.nil?
-        raise TypeError.new("invalid message: #{message}")
-      end
-      unless message.kind_of?(Qpid::Proton::Message)
-        raise ::ArgumentError.new("invalid message type: #{message.class}")
-      end
-      # encode the message first
-      message.pre_encode
-      perform_put(message)
-      return outgoing_tracker
-    end
-
-    private
-
-    def perform_put(message) # :nodoc:
-      Cproton.pn_messenger_put(@impl, message.impl)
-    end
-
-    public
-
-
-    # This call will block until the indicated number of messages
-    # have been sent, or until the operation times out.
-    # If n is -1 this call will block until all outgoing messages
-    # have been sent. If n is 0 then this call will send whatever
-    # it can without blocking.
-    #
-    def send(n = -1)
-      Cproton.pn_messenger_send(@impl, n)
-    end
-
-    # Moves the message from the head of the incoming message queue into
-    # the supplied message object. Any content in the supplied message
-    # will be overwritten.
-    # A tracker for the incoming Message is returned.  The tracker can
-    # later be used to communicate your acceptance or rejection of the
-    # Message.
-    #
-    # If no message is provided in the argument, then one is created. In
-    # either case, the one returned will be the fetched message.
-    #
-    # ==== Options
-    #
-    # * msg - the (optional) +Message+ instance to be used
-    #
-    def get(msg = nil)
-      msg_impl = nil
-      if msg.nil? then
-        msg_impl = nil
-      else
-        msg_impl = msg.impl
-      end
-      perform_get(msg_impl)
-      msg.post_decode unless msg.nil?
-      return incoming_tracker
-    end
-
-    private
-
-    def perform_get(msg) # :nodoc:
-      Cproton.pn_messenger_get(@impl, msg)
-    end
-
-    public
-
-    # Receives up to limit messages into the incoming queue.  If no value
-    # for limit is supplied, this call will receive as many messages as it
-    # can buffer internally.  If the Messenger is in blocking mode, this
-    # call will block until at least one Message is available in the
-    # incoming queue.
-    #
-    # Options ====
-    #
-    # * limit - the maximum number of messages to receive
-    #
-    def receive(limit = -1)
-      Cproton.pn_messenger_recv(@impl, limit)
-    end
-
-    # Returns true if the messenger is currently receiving data.
-    def receiving?
-      Cproton.pn_messenger_receiving(@impl)
-    end
-
-    # Attempts interrupting of the messenger thread.
-    #
-    # The Messenger interface is single-threaded, and this is the only
-    # function intended to be called from outside of is thread.
-    #
-    # Call this from a non-Messenger thread to interrupt it while it
-    # is blocking. This will cause a ::InterruptError to be raised.
-    #
-    # If there is no currently blocking call, then the next blocking
-    # call will be affected, even if it is within the same thread that
-    # originated the interrupt.
-    #
-    def interrupt
-      Cproton.pn_messenger_interrupt(@impl)
-    end
-
-    # Sends or receives any outstanding messages queued for a Messenger.
-    #
-    # This will block for the indicated timeout.  This method may also do I/O
-    # other than sending and receiving messages.  For example, closing
-    # connections after stop() has been called.
-    #
-    def work(timeout=-1)
-      err = Cproton.pn_messenger_work(@impl, timeout)
-      if (err == Cproton::PN_TIMEOUT) then
-        return false
-      else
-        check_for_error(err)
-        return true
-      end
-    end
-
-    # Returns the number messages in the outgoing queue that have not been
-    # transmitted.
-    #
-    def outgoing
-      Cproton.pn_messenger_outgoing(@impl)
-    end
-
-    # Returns the number of messages in the incoming queue that have not
-    # been retrieved.
-    #
-    def incoming
-      Cproton.pn_messenger_incoming(@impl)
-    end
-
-    # Adds a routing rule to the Messenger's internal routing table.
-    #
-    # The route procedure may be used to influence how a Messenger will
-    # internally treat a given address or class of addresses. Every call
-    # to the route procedure will result in Messenger appending a routing
-    # rule to its internal routing table.
-    #
-    # Whenever a Message is presented to a Messenger for delivery, it
-    # will match the address of this message against the set of routing
-    # rules in order. The first rule to match will be triggered, and
-    # instead of routing based on the address presented in the message,
-    # the Messenger will route based on the address supplied in the rule.
-    #
-    # The pattern matching syntax supports two types of matches, a '%'
-    # will match any character except a '/', and a '*' will match any
-    # character including a '/'.
-    #
-    # A routing address is specified as a normal AMQP address, however it
-    # may additionally use substitution variables from the pattern match
-    # that triggered the rule.
-    #
-    # ==== Arguments
-    #
-    # * pattern - the address pattern
-    # * address - the target address
-    #
-    # ==== Examples
-    #
-    #   # route messages sent to foo to the destionaty amqp://foo.com
-    #   messenger.route("foo", "amqp://foo.com")
-    #
-    #   # any message to foobar will be routed to amqp://foo.com/bar
-    #   messenger.route("foobar", "amqp://foo.com/bar")
-    #
-    #   # any message to bar/<path> will be routed to the same path within
-    #   # the amqp://bar.com domain
-    #   messenger.route("bar/*", "amqp://bar.com/$1")
-    #
-    #   # route all Message objects over TLS
-    #   messenger.route("amqp:*", "amqps:$1")
-    #
-    #   # supply credentials for foo
-    #   messenger.route("amqp://foo.com/*", "amqp://user:password@foo.com/$1")
-    #
-    #   # supply credentials for all domains
-    #   messenger.route("amqp://*", "amqp://user:password@$1")
-    #
-    #   # route all addresses through a single proxy while preserving the
-    #   # original destination
-    #   messenger.route("amqp://%$/*", "amqp://user:password@proxy/$1/$2")
-    #
-    #   # route any address through a single broker
-    #   messenger.route("*", "amqp://user:password@broker/$1")
-    #
-    def route(pattern, address)
-      Cproton.pn_messenger_route(@impl, pattern, address)
-    end
-
-    # Similar to #route, except that the destination of
-    # the Message is determined before the message address is rewritten.
-    #
-    # The outgoing address is only rewritten after routing has been
-    # finalized.  If a message has an outgoing address of
-    # "amqp://0.0.0.0:5678", and a rewriting rule that changes its
-    # outgoing address to "foo", it will still arrive at the peer that
-    # is listening on "amqp://0.0.0.0:5678", but when it arrives there,
-    # the receiver will see its outgoing address as "foo".
-    #
-    # The default rewrite rule removes username and password from addresses
-    # before they are transmitted.
-    #
-    # ==== Arguments
-    #
-    # * pattern - the outgoing address
-    # * address - the target address
-    #
-    def rewrite(pattern, address)
-      Cproton.pn_messenger_rewrite(@impl, pattern, address)
-    end
-
-    def selectable
-      impl = Cproton.pn_messenger_selectable(@impl)
-
-      # if we don't have any selectables, then return
-      return nil if impl.nil?
-
-      fd = Cproton.pn_selectable_get_fd(impl)
-
-      selectable = @selectables[fd]
-      if selectable.nil?
-        selectable = Selectable.new(self, impl)
-        @selectables[fd] = selectable
-      end
-      return selectable
-    end
-
-    # Returns a +Tracker+ for the message most recently sent via the put
-    # method.
-    #
-    def outgoing_tracker
-      impl = Cproton.pn_messenger_outgoing_tracker(@impl)
-      return nil if impl == -1
-      Tracker.new(impl)
-    end
-
-    # Returns a +Tracker+ for the most recently received message.
-    #
-    def incoming_tracker
-      impl = Cproton.pn_messenger_incoming_tracker(@impl)
-      return nil if impl == -1
-      Tracker.new(impl)
-    end
-
-    # Signal the sender that you have acted on the Message
-    # pointed to by the tracker.  If no tracker is supplied,
-    # then all messages that have been returned by the get
-    # method are accepted, except those that have already been
-    # auto-settled by passing beyond your incoming window size.
-    #
-    # ==== Options
-    #
-    # * tracker - the tracker
-    #
-    def accept(tracker = nil)
-      raise TypeError.new("invalid tracker: #{tracker}") unless tracker.nil? or valid_tracker?(tracker)
-      if tracker.nil? then
-        tracker = self.incoming_tracker
-        flag = Cproton::PN_CUMULATIVE
-      else
-        flag = 0
-      end
-      Cproton.pn_messenger_accept(@impl, tracker.impl, flag)
-    end
-
-    # Rejects the incoming message identified by the tracker.
-    # If no tracker is supplied, all messages that have been returned
-    # by the get method are rejected, except those that have already
-    # been auto-settled by passing beyond your outgoing window size.
-    #
-    # ==== Options
-    #
-    # * tracker - the tracker
-    #
-    def reject(tracker)
-      raise TypeError.new("invalid tracker: #{tracker}") unless tracker.nil? or valid_tracker?(tracker)
-      if tracker.nil? then
-        tracker = self.incoming_tracker
-        flag = Cproton::PN_CUMULATIVE
-      else
-        flag = 0
-      end
-      Cproton.pn_messenger_reject(@impl, tracker.impl, flag)
-    end
-
-    # Gets the last known remote state of the delivery associated with
-    # the given tracker, as long as the Message is still within your
-    # outgoing window. (Also works on incoming messages that are still
-    # within your incoming queue. See TrackerStatus for details on the
-    # values returned.
-    #
-    # ==== Options
-    #
-    # * tracker - the tracker
-    #
-    def status(tracker)
-      raise TypeError.new("invalid tracker: #{tracker}") unless valid_tracker?(tracker)
-      TrackerStatus.by_value(Cproton.pn_messenger_status(@impl, tracker.impl))
-    end
-
-    # Frees a Messenger from tracking the status associated
-    # with a given tracker. If you don't supply a tracker, all
-    # outgoing messages up to the most recent will be settled.
-    #
-    # ==== Options
-    #
-    # * tracker - the tracker
-    #
-    # ==== Examples
-    #
-    def settle(tracker)
-      raise TypeError.new("invalid tracker: #{tracker}") unless valid_tracker?(tracker)
-      if tracker.nil? then
-        tracker = self.incoming_tracker
-        flag = Cproton::PN_CUMULATIVE
-      else
-        flag = 0
-      end
-      Cproton.pn_messenger_settle(@impl, tracker.impl, flag)
-    end
-
-    # Sets the incoming window.
-    #
-    # The Messenger will track the remote status of this many incoming
-    # deliveries after they have been accepted or rejected.
-    #
-    # Messages enter this window only when you take them into your application
-    # using get().  If your incoming window size is n, and you get n+1 messages
-    # without explicitly accepting or rejecting the oldest message, then the
-    # message that passes beyond the edge of the incoming window will be
-    # assigned the default disposition of its link.
-    #
-    # ==== Options
-    #
-    # * window - the window size
-    #
-    def incoming_window=(window)
-      raise TypeError.new("invalid window: #{window}") unless valid_window?(window)
-      Cproton.pn_messenger_set_incoming_window(@impl, window)
-    end
-
-    # Returns the incoming window.
-    #
-    def incoming_window
-      Cproton.pn_messenger_get_incoming_window(@impl)
-    end
-
-    # Sets the outgoing window.
-    #
-    # The Messenger will track the remote status of this many outgoing
-    # deliveries after calling send.
-    # A Message enters this window when you call the put() method with the
-    # message.  If your outgoing window size is n, and you call put n+1
-    # times, status information will no longer be available for the
-    # first message.
-    #
-    # ==== Options
-    #
-    # * window - the window size
-    #
-    def outgoing_window=(window)
-      raise TypeError.new("invalid window: #{window}") unless valid_window?(window)
-      Cproton.pn_messenger_set_outgoing_window(@impl, window)
-    end
-
-    # Returns the outgoing window.
-    #
-    def outgoing_window
-      Cproton.pn_messenger_get_outgoing_window(@impl)
-    end
-
-    # Unregisters a selectable object.
-    def unregister_selectable(fileno) # :nodoc:
-      @selectables.delete(fileno)
-    end
-
-    private
-
-    def valid_tracker?(tracker)
-      !tracker.nil? && tracker.is_a?(Tracker)
-    end
-
-    def valid_window?(window)
-      !window.nil? && window.is_a?(Numeric)
-    end
-
-    can_raise_error [:send, :receive, :password=, :start, :stop,
-                     :perform_put, :perform_get, :interrupt,
-                     :route, :rewrite, :accept, :reject,
-                     :incoming_window=, :outgoing_window=]
-
-  end
-end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[8/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Posted by jr...@apache.org.
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/TODO
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/TODO b/proton-c/bindings/javascript/TODO
deleted file mode 100644
index 81d5e9e..0000000
--- a/proton-c/bindings/javascript/TODO
+++ /dev/null
@@ -1,49 +0,0 @@
-Qpid Proton JavaScript Language Bindings TODO List
-==================================================
-
-Network code is currently limited to a WebSocket transport, including for Node.js
-It would be good to allow a configurable transport so that Node.js and Chrome
-packaged apps could use native TCP sockets.
-
-The JavaScript binding is pure JavaScript, which has been trans-compiled from C
-to JavaScript using emscripten. This allows the same code to be used in a browser
-and Node.js, but it potentially has a performance penalty in Node.js. An alternative
-for Node.js might be to build a SWIG binding (recent versions of SWIG support
-JavaScript). This should be viewed as a complementary not competing approach as
-it would only work for environments like Node.js and definitely *not* browser
-environments, which clearly require pure JavaScript.
-
-Optimisation are enabled for compiling and linking but there hasn't been any
-profiling done yet. The binding code *shouldn't* be the bottleneck but it's
-always possible that I messed up.
-
-Error handling is nowhere near as good as it should be, though this is mostly
-because Messenger itself is a bit lacking on the error handling/recovery front.
-
-Although described as "Proton" this is currently a JavaScript binding for Messenger
-and associated Message & Data classes. There has been some talk on the user list
-of an alternative reactive API based on proton Engine. This might ultimately be
-a better fit for JavaScript but it is very much in its infancy and I haven't
-really looked at it yet.
-
-proton-j seems to use hawt-dispatch, which is modelled after Grand Central
-Dispatch so I need to work out what it's using it do do and whether there are
-parallels in proton-c
-
-Although the WebSocket transport uses the sub-protocol 'AMQPWSB10' as specified
-in http://docs.oasis-open.org/amqp-bindmap/amqp-wsb/v1.0/amqp-wsb-v1.0.html
-section 2.1 it is not technically compliant with the spec. as the AMQP data is
-created by the proton-c code, which produces a data-stream for the TCP transport
-whereas the WebSocket spec. seems to want to make use of the fact that WebSocket
-is a frame based transport (whereas TCP is not). This is quite hard to resolve
-as the binding simply sends the contents of the octet buffer created by proton
-over the transport and thus to make this binding compliant with the spec. would
-require a change to the underlying proton-c code! It is possible that this may be
-done in future as SCTP support would require the ability to push AMQP frames too.
-In the mean time fortunately the Java Broker WebSocket transport is actually
-tolerant of this off-spec. behaviour. My personal view is that both approaches
-should be valid and in particular using the standard TCP framing means that it
-is straightforward to create WebSocket<->TCP proxies, which is useful given that
-only the Java Broker currently has a native WebSocket transport.
-
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/binding-close.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/binding-close.js b/proton-c/bindings/javascript/binding-close.js
deleted file mode 100644
index 07b68c2..0000000
--- a/proton-c/bindings/javascript/binding-close.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/**
- * These values are essentially constants sitting in the proton namespace
- * that is to say they will be exported via:
- * proton.VERSION_MAJOR
- * proton.VERSION_MINOR
- * We have to set them after pn_get_version_major/pn_get_version_minor have been
- * defined so we must do it here in binding-close.js as it's a --post-js block.
- */
-Module['VERSION_MAJOR'] = _pn_get_version_major();
-Module['VERSION_MINOR'] = _pn_get_version_minor();
-
-})(); // End of self calling lambda used to wrap library.
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/binding-open.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/binding-open.js b/proton-c/bindings/javascript/binding-open.js
deleted file mode 100644
index 40e1b12..0000000
--- a/proton-c/bindings/javascript/binding-open.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-(function() { // Start of self-calling lambda used to avoid polluting global namespace.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/binding.c
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/binding.c b/proton-c/bindings/javascript/binding.c
deleted file mode 100644
index 8da83f6..0000000
--- a/proton-c/bindings/javascript/binding.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*
- * This file is largely just a stub, we're actually creating a JavaScript library
- * rather than an executable so most of the  work is done at the link stage.
- * We do however need to link the libqpid-proton-bitcode.so with *something* and
- * this is it. This file also provides a way to pass any global variable or
- * #defined values to the JavaScript binding by providing wrapper functions.
- */
-#include <uuid/uuid.h>
-#include <stdio.h>
-#include <proton/version.h>
-
-// To access #define values in JavaScript we need to wrap them in a function.
-int pn_get_version_major() {return PN_VERSION_MAJOR;}
-int pn_get_version_minor() {return PN_VERSION_MINOR;}
-void pn_uuid_generate(uuid_t out) { uuid_generate(out); }
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/data-array.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/data-array.js b/proton-c/bindings/javascript/data-array.js
deleted file mode 100644
index 6f9776d..0000000
--- a/proton-c/bindings/javascript/data-array.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                             proton.Data.Array                             */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * TODO make this behave more like a native JavaScript Array: http://www.bennadel.com/blog/2292-extending-javascript-arrays-while-keeping-native-bracket-notation-functionality.htm
- * Create a proton.Data.Array.
- * @classdesc
- * This class represents an AMQP Array.
- * @constructor proton.Data.Array
- * @param {string|number} type the type of the Number either as a string or number.
- *        Stored internally as a string corresponding to one of the TypeNames.       
- * @param {Array|TypedArray} elements the Native JavaScript Array or TypedArray that we wish to serialise.
- * @param {object} descriptor an optional object describing the type.
- */
-Data['Array'] = function(type, elements, descriptor) { // Data.Array Constructor.
-    // This block caters for an empty Array or a Described empty Array.
-    if (arguments.length < 2) {
-        descriptor = type;
-        type = 'NULL';
-        elements = [];
-    }
-
-    this['type']  = (typeof type === 'number') ? Data['TypeNames'][type] : type;
-    this['elements'] = elements;
-    this['descriptor'] = descriptor;
-};
-
-/**
- * @method toString
- * @memberof! proton.Data.Array#
- * @returns {string} the String form of a {@link proton.Data.Array}.
- */
-Data['Array'].prototype.toString = function() {
-    var descriptor = (this['descriptor'] == null) ? '' : ':' + this['descriptor'];
-    return this['type'] + 'Array' + descriptor + '[' + this['elements'] + ']';
-};
-
-/**
- * @method valueOf
- * @memberof! proton.Data.Array#
- * @returns {Array} the elements of the {@link proton.Data.Array}.
- */
-Data['Array'].prototype.valueOf = function() {
-    return this['elements'];
-};
-
-/**
- * Compare two instances of proton.Data.Array for equality. N.B. this method
- * compares the value of every Array element so its performance is O(n).
- * @method equals
- * @memberof! proton.Data.Array#
- * @param {proton.Data.Array} rhs the instance we wish to compare this instance with.
- * @returns {boolean} true iff the two compared instances are equal.
- */
-Data['Array'].prototype['equals'] = function(rhs) {
-    if (rhs instanceof Data['Array'] &&
-        // Check the string value of the descriptors.
-        (('' + this['descriptor']) === ('' + rhs['descriptor'])) &&
-        (this['type'] === rhs['type'])) {
-        var elements = this['elements'];
-        var relements = rhs['elements'];
-        var length = elements.length;
-        if (length === relements.length) {
-            for (var i = 0; i < length; i++) {
-                if (elements[i].valueOf() !== relements[i].valueOf()) {
-                    return false;
-                }
-            }
-            return true;
-        } else {
-            return false;
-        }
-    } else {
-        return false;
-    }
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/data-binary.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/data-binary.js b/proton-c/bindings/javascript/data-binary.js
deleted file mode 100644
index 27bac59..0000000
--- a/proton-c/bindings/javascript/data-binary.js
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                             proton.Data.Binary                            */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Create a proton.Data.Binary. This constructor takes one or two parameters.
- * The first parameter may serve different purposes depending on its type;
- * If value is a number then it represents the size of the Binary data buffer,
- * if it is a string then we copy the string to the buffer, if it is an Array
- * or a TypedArray then we copy the data to the buffer. The optional second
- * parameter is a pointer to the data in an internal data store. If start is
- * not specified then the number of bytes specified in the first parameter
- * will be allocated in the internal data store and start will point to the
- * start of that block of data.
- * @classdesc
- * This class represents an AMQP Binary type. This class allows us to create and
- * use raw binary data and map it efficiently between JavaScript client code and
- * the underlying implementation, where all data is managed on a "virtual heap".
- * <p>
- * Client applications should generally not have to care about memory management
- * as, for most common use cases, client applications would "transfer ownership"
- * to a "container" which would then "own" the underlying data and free the data
- * held by the {@link proton.Data.Binary}.
- * <p>
- * As an example one common use-case would be where client application creates a
- * {@link proton.Data.Binary} specifying the required size. It would usually then
- * call getBuffer() to access the underlying Uint8Array. At this point the client
- * "owns" the data and so would have to call free() if it did nothing more with
- * the Binary, however when {@link proton.Data.putBINARY} is called the ownership
- * of the raw data on the virtual heap transfers from the Binary to the Data and
- * the client no longer needs to call free() itself. In this case the putBINARY()
- * call transfers ownership and can then safely call free() on the Binary.
- * <p>
- * Conversely a common use-case when receiving data is where a Binary may be
- * created by {@link proton.Data#getBINARY}. In this case the Binary is simply a
- * "view" onto the bytes owned by the Data instance. A client application can
- * safely access the bytes from the view, but if it wishes to use the bytes beyond
- * the scope of the Data instance (e.g. after the next {@link proton.Messenger#get}
- * call then the client must explicitly *copy* the bytes into a new buffer, for
- * example via copyBuffer().
- * <p>
- * Most of the {@link proton.Data} methods that take {@link proton.Data.Binary}
- * as a parameter "consume" the underlying data and take responsibility for
- * freeing it from the heap e.g. {@link proton.Data#putBINARY}, {@link proton.Data#decode}.
- * For the methods that return a {@link proton.Data.Binary} the call to
- * {@link proton.Data#getBINARY}, which is the most common case, returns a Binary
- * that has a "view" of the underlying data that is actually owned by the Data
- * instance and thus doesn't need to be explicitly freed on the Binary. The call
- * to {@link proton.Data#encode} however returns a Binary that represents a *copy*
- * of the underlying data, in this case (like a client calling new proton.Data.Binary)
- * the client takes responsibility for freeing the data, unless of course it is
- * subsequently passed to a method that will consume the data (putBINARY/decode).
- * @constructor proton.Data.Binary
- * @param {(number|string|Array|TypedArray)} value If value is a number then it 
- *        represents the size of the Binary data buffer, if it is a string then
- *        we copy the string to the buffer, if it is an Array or a TypedArray
- *        then we copy the data to the buffer. N.B. although convenient do bear
- *        in mind that using a mechanism other than constructing with a simple
- *        size will result in some form of additional data copy.
- * @param {number} start an optional pointer to the start of the Binary data buffer.
- */
-Data['Binary'] = function(value, start) { // Data.Binary Constructor.
-    /**
-     * If the start pointer is specified then the underlying binary data is owned
-     * by another object, so we set the call to free to be a null function. If
-     * the start pointer is not passed then we allocate storage of the specified
-     * size on the emscripten heap and set the call to free to free the data from
-     * the emscripten heap.
-     */
-    var size = value;
-    if (start) {
-        this['free'] = function() {};
-    } else { // Create Binary from Array, ArrayBuffer or TypedArray.
-        var hasArrayBuffer = (typeof ArrayBuffer === 'function');
-        if (Data.isArray(value) ||
-            (hasArrayBuffer && value instanceof ArrayBuffer) || 
-            (value.buffer && hasArrayBuffer && value.buffer instanceof ArrayBuffer)) {
-            value = new Uint8Array(value);
-            size = value.length;
-            start = _malloc(size); // Allocate storage from emscripten heap.
-            Module['HEAPU8'].set(value, start); // Copy the data to the emscripten heap.
-        } else if (Data.isString(value)) { // Create Binary from native string
-            value = unescape(encodeURIComponent(value)); // Create a C-like UTF representation.
-            size = value.length;
-            start = _malloc(size); // Allocate storage from emscripten heap.
-            for (var i = 0; i < size; i++) {
-                setValue(start + i, value.charCodeAt(i), 'i8', 1);
-            }
-        } else { // Create unpopulated Binary of specified size.
-            // If the type is not a number by this point then an unrecognised data
-            // type has been passed so we create a zero length Binary.
-            size = Data.isNumber(size) ? size : 0;
-            start = _malloc(size); // Allocate storage from emscripten heap.
-        }
-        this['free'] = function() {
-            _free(this.start);
-            this.size = 0;
-            this.start = 0;
-            // Set free to a null function to prevent possibility of a "double free".
-            this['free'] = function() {};
-        };
-    }
-
-    this.size = size;
-    this.start = start;
-};
-
-/**
- * Get a Uint8Array view of the data. N.B. this is just a *view* of the data,
- * which will go out of scope on the next call to {@link proton.Messenger.get}. If
- * a client wants to retain the data then copy should be used to explicitly
- * create a copy of the data which the client then owns to do with as it wishes.
- * @method getBuffer
- * @returns {Uint8Array} a new Uint8Array view of the data.
- * @memberof! proton.Data.Binary#
- */
-Data['Binary'].prototype['getBuffer'] = function() {
-    return new Uint8Array(HEAPU8.buffer, this.start, this.size);
-};
-
-/**
- * Explicitly create a *copy* of the Binary, copying the underlying binary data too.
- * @method copy
- * @param {number} offset an optional offset into the underlying buffer from
- *        where we want to copy the data, default is zero.
- * @param {number} n an optional number of bytes to copy, default is this.size - offset.
- * @returns {proton.Data.Binary} a new {@link proton.Data.Binary} created by copying the underlying binary data.
- * @memberof! proton.Data.Binary#
- */
-Data['Binary'].prototype['copy'] = function(offset, n) {
-    offset = offset | 0;
-    n = n ? n : (this.size - offset);
-
-    if (offset >= this.size) {
-        offset = 0;
-        n = 0;
-    } else if ((offset + n) > this.size) {
-        n = this.size - offset; // Clamp length
-    }
-
-    var start = _malloc(n); // Allocate storage from emscripten heap.
-    _memcpy(start, this.start + offset, n); // Copy the raw data to new buffer.
-
-    return new Data['Binary'](n, start);
-};
-
-/**
- * Converts the {@link proton.Data.Binary} to a string. This is clearly most
- * useful when the binary data is actually a binary representation of a string
- * such as a C style ASCII string.
- * @method toString
- * @memberof! proton.Data.Binary#
- * @returns {string} the String form of a {@link proton.Data.Binary}.
- */
-Data['Binary'].prototype.toString = Data['Binary'].prototype.valueOf = function() {
-    // Create a native JavaScript String from the start/size information.
-    return Pointer_stringify(this.start, this.size);
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/data-described.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/data-described.js b/proton-c/bindings/javascript/data-described.js
deleted file mode 100644
index e1f9d84..0000000
--- a/proton-c/bindings/javascript/data-described.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                             proton.Data.Described                         */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Create a proton.Data.Described.
- * @classdesc
- * This class represents an AMQP Described.
- * @constructor proton.Data.Described
- * @param {object} value the value of the described type.
- * @param {string} descriptor an optional string describing the type.
- * @property {object} value the actual value of the described type.
- * @property {string} descriptor a string describing the type.
- */
-Data['Described'] = function(value, descriptor) { // Data.Described Constructor.
-    this['value'] = value;
-    this['descriptor'] = descriptor;
-};
-
-/**
- * @method toString
- * @memberof! proton.Data.Described#
- * @returns {string} the String form of a {@link proton.Data.Described}.
- */
-Data['Described'].prototype.toString = function() {
-    return 'Described(' + this['value'] + ', ' + this['descriptor'] + ')';
-};
-
-/**
- * @method valueOf
- * @memberof! proton.Data.Described#
- * @returns {object} the value of the {@link proton.Data.Described}.
- */
-Data['Described'].prototype.valueOf = function() {
-    return this['value'];
-};
-
-/**
- * Compare two instances of proton.Data.Described for equality.
- * @method equals
- * @memberof! proton.Data.Described#
- * @param {proton.Data.Described} rhs the instance we wish to compare this instance with.
- * @returns {boolean} true iff the two compared instances are equal.
- */
-Data['Described'].prototype['equals'] = function(rhs) {
-    if (rhs instanceof Data['Described']) {
-        return ((this['descriptor'] === rhs['descriptor']) && (this['value'] === rhs['value']));
-    } else {
-        return false;
-    }
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/data-long.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/data-long.js b/proton-c/bindings/javascript/data-long.js
deleted file mode 100644
index 38fb6c8..0000000
--- a/proton-c/bindings/javascript/data-long.js
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                             proton.Data.Long                              */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Create a proton.Data.Long.
- * @classdesc
- * This class represents a 64 bit Integer value. It is used primarily to pass and
- * return 64 bit Integer values to and from the emscripten compiled proton-c library.
- * This class is needed because JavaScript cannot natively represent 64 bit
- * Integers with sufficient accuracy.
- * @constructor proton.Data.Long
- * @param {number} low the least significant word.
- * @param {number} high the most significant word.
- */
-// Use dot notation as it is a "protected" inner class not exported from the closure.
-Data.Long = function(low, high) { // Data.Long Constructor.
-    this.low  = low  | 0;  // force into 32 signed bits.
-    this.high = high | 0;  // force into 32 signed bits.
-};
-
-// proton.Data.Long constants.
-Data.Long.TWO_PWR_16_DBL_ = 1 << 16;
-Data.Long.TWO_PWR_32_DBL_ = Data.Long.TWO_PWR_16_DBL_ * Data.Long.TWO_PWR_16_DBL_;
-Data.Long.TWO_PWR_64_DBL_ = Data.Long.TWO_PWR_32_DBL_ * Data.Long.TWO_PWR_32_DBL_;
-Data.Long.TWO_PWR_63_DBL_ = Data.Long.TWO_PWR_64_DBL_ / 2;
-Data.Long.MAX_VALUE = new Data.Long(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
-Data.Long.MIN_VALUE = new Data.Long(0, 0x80000000 | 0);
-Data.Long.ZERO = new Data.Long(0, 0);
-Data.Long.ONE  = new Data.Long(1, 0);
-
-/**
- * @method fromNumber
- * @memberof! proton.Data.Long#
- * @returns {proton.Data.Long} an instance of {@link proton.Data.Long} created
- *          using a native JavaScript number.
- */
-Data.Long.fromNumber = function(value) {
-    if (isNaN(value) || !isFinite(value)) {
-        return Data.Long.ZERO;
-    } else if (value <= -Data.Long.TWO_PWR_63_DBL_) {
-        return Data.Long.MIN_VALUE;
-    } else if (value + 1 >= Data.Long.TWO_PWR_63_DBL_) {
-        return Data.Long.MAX_VALUE;
-    } else if (value < 0) {
-        return Data.Long.fromNumber(-value).negate();
-    } else {
-      return new Data.Long(
-          (value % Data.Long.TWO_PWR_32_DBL_) | 0,
-          (value / Data.Long.TWO_PWR_32_DBL_) | 0);
-    }
-};
-
-/**
- * Return the twos complement of this instance.
- * @method negate
- * @memberof! proton.Data.Long#
- * @returns {proton.Data.Long} the twos complement of this instance.
- */
-Data.Long.prototype.negate = function() {
-    if (this.equals(Data.Long.MIN_VALUE)) {
-        return Data.Long.MIN_VALUE;
-    } else {
-        return this.not().add(Data.Long.ONE);
-    }
-};
-
-/**
- * Add two instances of {@link proton.Data.Long}.
- * @method add
- * @memberof! proton.Data.Long#
- * @param {proton.Data.Long} rhs the instance we wish to add to this instance.
- * @returns {proton.Data.Long} the sum of this value and the rhs.
- */
-Data.Long.prototype.add = function(rhs) {
-    // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
-
-    var a48 = this.high >>> 16;
-    var a32 = this.high & 0xFFFF;
-    var a16 = this.low >>> 16;
-    var a00 = this.low & 0xFFFF;
-
-    var b48 = rhs.high >>> 16;
-    var b32 = rhs.high & 0xFFFF;
-    var b16 = rhs.low >>> 16;
-    var b00 = rhs.low & 0xFFFF;
-
-    var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
-    c00 += a00 + b00;
-    c16 += c00 >>> 16;
-    c00 &= 0xFFFF;
-    c16 += a16 + b16;
-    c32 += c16 >>> 16;
-    c16 &= 0xFFFF;
-    c32 += a32 + b32;
-    c48 += c32 >>> 16;
-    c32 &= 0xFFFF;
-    c48 += a48 + b48;
-    c48 &= 0xFFFF;
-    return new Data.Long((c16 << 16) | c00, (c48 << 16) | c32);
-};
-
-/**
- * Return the complement of this instance.
- * @method not
- * @memberof! proton.Data.Long#
- * @returns {proton.Data.Long} the complement of this instance.
- */
-Data.Long.prototype.not = function() {
-    return new Data.Long(~this.low, ~this.high);
-};
-
-/**
- * Compare two instances of {@link proton.Data.Long} for equality.
- * @method equals
- * @memberof! proton.Data.Long#
- * @param {proton.Data.Long} rhs the instance we wish to compare this instance with.
- * @returns {boolean} true iff the two compared instances are equal.
- */
-Data.Long.prototype.equals = function(other) {
-    return (this.high == other.high) && (this.low == other.low);
-};
-
-/**
- * @method getHighBits
- * @memberof! proton.Data.Long#
- * @returns {number} the most significant word of a {@link proton.Data.Long}.
- */
-Data.Long.prototype.getHighBits = function() {
-    return this.high;
-};
-
-/**
- * @method getLowBits
- * @memberof! proton.Data.Long#
- * @returns {number} the least significant word of a {@link proton.Data.Long}.
- */
-Data.Long.prototype.getLowBits = function() {
-    return this.low;
-};
-
-/**
- * @method getLowBitsUnsigned
- * @memberof! proton.Data.Long#
- * @returns {number} the least significant word of a {@link proton.Data.Long}
- *          as an unsigned value.
- */
-Data.Long.prototype.getLowBitsUnsigned = function() {
-    return (this.low >= 0) ? this.low : Data.Long.TWO_PWR_32_DBL_ + this.low;
-};
-
-/**
- * @method toNumber
- * @memberof! proton.Data.Long#
- * @returns {number} a native JavaScript number (with possible loss of precision).
- */
-Data.Long.prototype.toNumber = function() {
-    return (this.high * Data.Long.TWO_PWR_32_DBL_) + this.getLowBitsUnsigned();
-};
-
-/**
- * @method toString
- * @memberof! proton.Data.Long#
- * @returns {string} the String form of a {@link proton.Data.Long}.
- */
-Data.Long.prototype.toString = function() {
-    return this.high + ':' + this.getLowBitsUnsigned();
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/data-symbol.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/data-symbol.js b/proton-c/bindings/javascript/data-symbol.js
deleted file mode 100644
index c742acb..0000000
--- a/proton-c/bindings/javascript/data-symbol.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                             proton.Data.Symbol                            */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Create a proton.Data.Symbol.
- * @classdesc
- * This class represents an AMQP Symbol. This class is necessary primarily as a
- * way to enable us to distinguish between a native String and a Symbol in the
- * JavaScript type system.
- * @constructor proton.Data.Symbol
- * @param {string} s a symbol.
- */
-Data['Symbol'] = function(s) { // Data.Symbol Constructor.
-    this.value = s;
-};
-
-/**
- * @method toString
- * @memberof! proton.Data.Symbol#
- * @returns {string} the String form of a {@link proton.Data.Symbol}.
- */
-Data['Symbol'].prototype.toString = Data['Symbol'].prototype.valueOf = function() {
-    return this.value;
-};
-
-/**
- * Compare two instances of proton.Data.Symbol for equality.
- * @method equals
- * @memberof! proton.Data.Symbol#
- * @param {proton.Data.Symbol} rhs the instance we wish to compare this instance with.
- * @returns {boolean} true iff the two compared instances are equal.
- */
-Data['Symbol'].prototype['equals'] = function(rhs) {
-    return this.toString() === rhs.toString();
-};
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/data-typed-number.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/data-typed-number.js b/proton-c/bindings/javascript/data-typed-number.js
deleted file mode 100644
index 034d4ec..0000000
--- a/proton-c/bindings/javascript/data-typed-number.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                             proton.Data.TypedNumber                       */
-/*                                                                           */
-/*****************************************************************************/
-
-// ---------------------- JavaScript Number Extensions ------------------------ 
-
-Number.prototype['ubyte'] = function() {
-    return new Data.TypedNumber('UBYTE', this);
-};
-
-Number.prototype['byte'] = function() {
-    return new Data.TypedNumber('BYTE', this);
-};
-
-Number.prototype['ushort'] = function() {
-    return new Data.TypedNumber('USHORT', this);
-};
-
-Number.prototype['short'] = function() {
-    return new Data.TypedNumber('SHORT', this);
-};
-
-Number.prototype['uint'] = function() {
-    return new Data.TypedNumber('UINT', this);
-};
-
-Number.prototype['int'] = function() {
-    return new Data.TypedNumber('INT', this);
-};
-
-Number.prototype['ulong'] = function() {
-    return new Data.TypedNumber('ULONG', this);
-};
-
-Number.prototype['long'] = function() {
-    return new Data.TypedNumber('LONG', this);
-};
-
-Number.prototype['float'] = function() {
-    return new Data.TypedNumber('FLOAT', this);
-};
-
-Number.prototype['double'] = function() {
-    return new Data.TypedNumber('DOUBLE', this);
-};
-
-Number.prototype['char'] = function() {
-    return new Data.TypedNumber('CHAR', this);
-};
-
-String.prototype['char'] = function() {
-    return new Data.TypedNumber('CHAR', this.charCodeAt(0));
-};
-
-// ------------------------- proton.Data.TypedNumber -------------------------- 
-/**
- * Create a proton.Data.TypedNumber.
- * @classdesc
- * This class is a simple wrapper class that allows a "type" to be recorded for
- * a number. The idea is that the JavaScript Number class is extended with extra
- * methods to allow numbers to be "modified" to TypedNumbers, so for example
- * 1.0.float() would modify 1.0 by returning a TypedNumber with type = FLOAT
- * and value = 1. The strings used for type correspond to the names of the Data
- * put* methods e.g. UBYTE, BYTE, USHORT, SHORT, UINT, INT, ULONG, LONG, FLOAT,
- * DOUBLE, CHAR so that the correct method to call can be derived from the type.
- * @constructor proton.Data.TypedNumber
- * @param {(string|number)} type the type of the Number either as a string or number.
- *        Stored internally as a string corresponding to one of the TypeNames.
- * @param {number} value the value of the Number.
- */
-// Use dot notation as it is a "protected" inner class not exported from the closure.
-Data.TypedNumber = function(type, value) { // Data.TypedNumber Constructor.
-    this.type  = (typeof type === 'number') ? Data['TypeNames'][type] : type;
-    this.value = value;
-};
-
-/**
- * @method toString
- * @memberof! proton.Data.TypedNumber#
- * @returns {string} the String form of a {@link proton.Data.TypedNumber}.
- */
-Data.TypedNumber.prototype.toString = Data.TypedNumber.prototype.valueOf = function() {
-    return +this.value;
-};
-
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/data-uuid.js
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/data-uuid.js b/proton-c/bindings/javascript/data-uuid.js
deleted file mode 100644
index 18bc96a..0000000
--- a/proton-c/bindings/javascript/data-uuid.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-/*****************************************************************************/
-/*                                                                           */
-/*                             proton.Data.Uuid                              */
-/*                                                                           */
-/*****************************************************************************/
-
-/**
- * Create a proton.Data.Uuid which is a type 4 UUID.
- * @classdesc
- * This class represents a type 4 UUID, which may use crypto libraries to generate
- * the UUID if supported by the platform (e.g. node.js or a modern browser)
- * @constructor proton.Data.Uuid
- * @param {number|Array|string} u a UUID. If null a type 4 UUID is generated wich may use crypto if
- *        supported by the platform. If u is an emscripten "pointer" we copy the
- *        data from that. If u is a JavaScript Array we use it as-is. If u is a
- *        String then we try to parse that as a UUID.
- * @property {Array} uuid is the compact array form of the UUID.
- */
-Data['Uuid'] = function(u) { // Data.Uuid Constructor.
-    // Helper to copy from emscripten allocated storage into JavaScript Array.
-    function _p2a(p) {
-        var uuid = new Array(16);
-        for (var i = 0; i < 16; i++) {
-            uuid[i] = getValue(p + i, 'i8') & 0xFF; // & 0xFF converts to unsigned.
-        }
-        return uuid;
-    };
-
-    if (!u) { // Generate UUID using emscripten's uuid_generate implementation.
-        var sp = Runtime.stackSave();
-        var p = allocate(16, 'i8', ALLOC_STACK); // Create temporary pointer storage.
-        _uuid_generate(p);      // Generate UUID into allocated pointer.
-        this['uuid'] = _p2a(p); // Copy from allocated storage into JavaScript Array.
-        Runtime.stackRestore(sp);
-    } else if (Data.isNumber(u)) { // Use pointer that has been passed in.
-        this['uuid'] = _p2a(u);    // Copy from allocated storage into JavaScript Array.
-    } else if (Data.isArray(u)) { // Use array that has been passed in.
-        this['uuid'] = u; // Just use the JavaScript Array.
-    } else if (Data.isString(u)) { // Parse String form UUID.
-        if (u.length === 36) {
-            var i = 0;
-            var uuid = new Array(16);
-            u.toLowerCase().replace(/[0-9a-f]{2}/g, function(byte) {
-                if (i < 16) {
-                    uuid[i++] = parseInt(byte, 16);
-                }
-            });
-            this['uuid'] = uuid;
-        }
-    }
-    this.string = null;
-};
-
-/**
- * Returns the string representation of the proton.Data.Uuid.
- * @method toString
- * @memberof! proton.Data.Uuid#
- * @returns {string} the String
- *          /[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}/
- *          form of a {@link proton.Data.Uuid}.
- */
-Data['Uuid'].prototype.toString = Data['Uuid'].prototype.valueOf = function() {
-    if (!this.string) { // Check if we've cached the string version.
-        var i = 0;
-        var uu = this['uuid'];
-        var uuid = 'xxxx-xx-xx-xx-xxxxxx'.replace(/[x]/g, function(c) {
-            var r = uu[i].toString(16);
-            r = (r.length === 1) ? '0' + r : r; // Zero pad single digit hex values
-            i++;
-            return r;
-        });
-        this.string = uuid;
-    }
-    return this.string;
-};
-
-/**
- * Compare two instances of proton.Data.Uuid for equality.
- * @method equals
- * @memberof! proton.Data.Uuid#
- * @param {proton.Data.Uuid} rhs the instance we wish to compare this instance with.
- * @returns {boolean} true iff the two compared instances are equal.
- */
-Data['Uuid'].prototype['equals'] = function(rhs) {
-    return this.toString() === rhs.toString();
-};
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[9/9] qpid-proton git commit: PROTON-1799: Remove deprecated bindings and APIs

Posted by jr...@apache.org.
PROTON-1799: Remove deprecated bindings and APIs


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

Branch: refs/heads/master
Commit: 0c9bb9ffc6af4cb197f524483df61e9a0bc05272
Parents: c82de9d
Author: Justin Ross <jr...@apache.org>
Authored: Tue Mar 20 11:32:48 2018 -0700
Committer: Justin Ross <jr...@apache.org>
Committed: Tue Mar 20 11:32:48 2018 -0700

----------------------------------------------------------------------
 .travis.yml                                     |    5 +-
 CMakeLists.txt                                  |    2 +-
 DEVELOPERS.md                                   |    2 +-
 INSTALL.md                                      |   20 +-
 appveyor.yml                                    |    2 +-
 bin/jenkins-proton-c-build.sh                   |    2 +-
 config.bat.in                                   |   12 -
 config.sh.in                                    |   14 -
 docs/markdown/index.md                          |    5 +-
 .../messenger/addressing-and-routing.md         |  210 ---
 docs/markdown/messenger/index.md                |   13 -
 docs/markdown/messenger/message-disposition.md  |  196 ---
 docs/markdown/messenger/quick-start-linux.md    |   73 -
 .../markdown/messenger/sending-and-receiving.md |  144 --
 proton-c/CMakeLists.txt                         |   10 -
 proton-c/bindings/CMakeLists.txt                |   39 +-
 proton-c/bindings/javascript/CMakeLists.txt     |  279 ---
 proton-c/bindings/javascript/LICENSE            |  203 ---
 proton-c/bindings/javascript/README             |  426 -----
 proton-c/bindings/javascript/TODO               |   49 -
 proton-c/bindings/javascript/binding-close.js   |   33 -
 proton-c/bindings/javascript/binding-open.js    |   21 -
 proton-c/bindings/javascript/binding.c          |   36 -
 proton-c/bindings/javascript/data-array.js      |  100 --
 proton-c/bindings/javascript/data-binary.js     |  181 --
 proton-c/bindings/javascript/data-described.js  |   74 -
 proton-c/bindings/javascript/data-long.js       |  191 ---
 proton-c/bindings/javascript/data-symbol.js     |   59 -
 .../bindings/javascript/data-typed-number.js    |  108 --
 proton-c/bindings/javascript/data-uuid.js       |  107 --
 proton-c/bindings/javascript/data.js            | 1582 ------------------
 proton-c/bindings/javascript/error.js           |  172 --
 proton-c/bindings/javascript/message.js         |  840 ----------
 proton-c/bindings/javascript/messenger.js       |  822 ---------
 proton-c/bindings/javascript/module.js          |  481 ------
 .../javascript/qpid-proton-messenger/LICENSE    |  203 ---
 .../javascript/qpid-proton-messenger/README.md  |   94 --
 .../qpid-proton-messenger/lib/.gitignore        |   21 -
 .../qpid-proton-messenger/package.json          |   18 -
 proton-c/bindings/javascript/subscription.js    |   81 -
 proton-c/bindings/node/CMakeLists.txt           |   71 -
 proton-c/bindings/node/binding.gyp.in           |   31 -
 proton-c/bindings/node/javascript.i             |   42 -
 proton-c/bindings/perl/CMakeLists.txt           |   74 -
 proton-c/bindings/perl/LICENSE                  |  203 ---
 proton-c/bindings/perl/MANIFEST                 |   10 -
 proton-c/bindings/perl/Makefile.PL              |   12 -
 proton-c/bindings/perl/README                   |   17 -
 proton-c/bindings/perl/TODO                     |    2 -
 proton-c/bindings/perl/lib/qpid/proton.pm       |   75 -
 .../bindings/perl/lib/qpid/proton/Constants.pm  |  172 --
 proton-c/bindings/perl/lib/qpid/proton/Data.pm  | 1276 --------------
 .../bindings/perl/lib/qpid/proton/Errors.pm     |   26 -
 .../perl/lib/qpid/proton/ExceptionHandling.pm   |   53 -
 .../bindings/perl/lib/qpid/proton/Mapping.pm    |  121 --
 .../bindings/perl/lib/qpid/proton/Message.pm    |  538 ------
 .../bindings/perl/lib/qpid/proton/Messenger.pm  |  353 ----
 .../bindings/perl/lib/qpid/proton/Tracker.pm    |   39 -
 .../perl/lib/qpid/proton/array_helper.pm        |  147 --
 proton-c/bindings/perl/lib/qpid/proton/utils.pm |   38 -
 proton-c/bindings/perl/lib/qpid_proton.pm       |   38 -
 proton-c/bindings/perl/perl.i                   |  216 ---
 proton-c/bindings/perl/tests/array_helper.t     |  232 ---
 proton-c/bindings/perl/tests/data.t             |  536 ------
 proton-c/bindings/perl/tests/hash_helper.t      |   74 -
 proton-c/bindings/perl/tests/message.t          |  254 ---
 proton-c/bindings/perl/tests/messenger.t        |  129 --
 proton-c/bindings/perl/tests/utils.pm           |   60 -
 proton-c/bindings/php/.gitignore                |    1 -
 proton-c/bindings/php/CMakeLists.txt            |  117 --
 proton-c/bindings/php/compat.swg                |   50 -
 proton-c/bindings/php/cproton.ini               |   21 -
 proton-c/bindings/php/get_include_dir.php       |   55 -
 proton-c/bindings/php/php.i                     |  229 ---
 proton-c/bindings/php/proton.ini.in             |   21 -
 proton-c/bindings/php/proton.php                | 1119 -------------
 proton-c/bindings/php/tests.php                 |   64 -
 proton-c/bindings/python/proton/__init__.py     |  615 -------
 .../bindings/ruby/lib/messenger/messenger.rb    |  703 --------
 .../bindings/ruby/lib/messenger/subscription.rb |   36 -
 proton-c/bindings/ruby/lib/messenger/tracker.rb |   37 -
 .../ruby/lib/messenger/tracker_status.rb        |   68 -
 proton-c/bindings/ruby/lib/qpid_proton.rb       |    7 -
 .../ruby/tests/old_examples/old_example_test.rb |    8 -
 .../bindings/ruby/tests/old_examples/recv.rb    |   23 -
 .../bindings/ruby/tests/old_examples/send.rb    |   21 -
 tests/javascript/codec.js                       |  569 -------
 tests/javascript/message.js                     |  359 ----
 tests/javascript/msgr-recv.js                   |  265 ---
 tests/javascript/msgr-send-common.js            |  245 ---
 tests/javascript/msgr-send.html                 |  123 --
 tests/javascript/msgr-send.js                   |  100 --
 tests/javascript/soak.js                        |   93 -
 tests/javascript/unittest.js                    |   45 -
 tests/python/proton_tests/__init__.py           |    1 -
 tests/python/proton_tests/common.py             |   13 -
 tests/python/proton_tests/messenger.py          | 1089 ------------
 tests/python/proton_tests/soak.py               |   34 -
 tests/python/proton_tests/ssl.py                |  122 --
 tests/smoke/recv.php                            |   27 -
 tests/smoke/recv.pl                             |   23 -
 tests/smoke/recv.py                             |   23 -
 tests/smoke/recv.rb                             |   24 -
 tests/smoke/send.php                            |   27 -
 tests/smoke/send.pl                             |   17 -
 tests/smoke/send.py                             |   24 -
 tests/smoke/send.rb                             |   24 -
 tests/tools/apps/python/msgr-recv.py            |  206 ---
 tests/tools/apps/python/msgr-send.py            |  205 ---
 tools/cmake/Modules/FindEmscripten.cmake        |   40 -
 tools/cmake/Modules/FindNodePackages.cmake      |   72 -
 tools/cmake/Modules/ProtonFindPerl.cmake        |   81 -
 112 files changed, 17 insertions(+), 18798 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 568d100..fe09339 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,7 +37,7 @@ matrix:
     env:
     - PKG_CONFIG_PATH='/usr/local/opt/openssl/lib/pkgconfig'
     - PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
-    - QPID_PROTON_CMAKE_ARGS='-DPROACTOR=libuv -DSASL_IMPL=none -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DBUILD_PERL=OFF -DBUILD_RUBY=OFF'
+    - QPID_PROTON_CMAKE_ARGS='-DPROACTOR=libuv -DSASL_IMPL=none -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DBUILD_RUBY=OFF'
     before_install:
     - brew update
     - brew upgrade cmake python openssl
@@ -48,7 +48,7 @@ matrix:
     env:
     - PKG_CONFIG_PATH='/usr/local/opt/openssl/lib/pkgconfig'
     - PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
-    - QPID_PROTON_CMAKE_ARGS='-DPROACTOR=libuv -DSASL_IMPL=none -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DBUILD_PERL=OFF -DBUILD_RUBY=OFF'
+    - QPID_PROTON_CMAKE_ARGS='-DPROACTOR=libuv -DSASL_IMPL=none -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DBUILD_RUBY=OFF'
     before_install:
     - brew update
     - brew upgrade cmake python openssl
@@ -69,7 +69,6 @@ addons:
     - ruby
     - ruby-dev
     - python3-dev
-    - php5
     - golang
     - lcov
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48e1d5f..4934451 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ set (BINDINGS_DIR ${LIB_INSTALL_DIR}/proton/bindings)
 
 set (SYSINSTALL_BINDINGS OFF CACHE BOOL "If SYSINSTALL_BINDINGS is OFF then proton bindings will be installed underneath ${BINDINGS_DIR} and each user will need to modify their interpreter configuration to load the appropriate binding. If SYSINSTALL_BINDINGS is ON, then each language interpreter will be queried for the appropriate directory and proton bindings will be installed and available system wide with no additional per user configuration.")
 
-set (BINDING_LANGS PERL PHP PYTHON RUBY)
+set (BINDING_LANGS PYTHON RUBY)
 
 foreach (LANG ${BINDING_LANGS})
   set (SYSINSTALL_${LANG} OFF CACHE BOOL "Install ${LANG} bindings into interpreter specified location.")

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/DEVELOPERS.md
----------------------------------------------------------------------
diff --git a/DEVELOPERS.md b/DEVELOPERS.md
index 5eaa235..65eee2c 100644
--- a/DEVELOPERS.md
+++ b/DEVELOPERS.md
@@ -15,7 +15,7 @@ the file config.sh from the CMake build directory.
     $ source config.sh
 
 This file sets the necessary environment variables for all supported
-dynamic languages (Python, Perl, Ruby, PHP) and for running the tests.
+dynamic languages (Python and Ruby) and for running the tests.
 
 Testing
 -------

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/INSTALL.md
----------------------------------------------------------------------
diff --git a/INSTALL.md b/INSTALL.md
index 2253816..430d648 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -46,8 +46,6 @@ language.
     $ yum install swig                                       # Required for all bindings
     $ yum install python-devel                               # Python
     $ yum install ruby-devel rubygem-minitest                # Ruby
-    $ yum install php-devel                                  # PHP
-    $ yum install perl-devel                                 # Perl
 
     # Dependencies needed to generate documentation
     $ yum install epydoc                                     # Python
@@ -68,7 +66,7 @@ language binding you can omit the dev package for that language.
     $ apt-get install libsasl2-2 libsasl2-dev libsasl2-modules
 
     # dependencies needed for bindings
-    $ apt-get install swig python-dev ruby-dev libperl-dev
+    $ apt-get install swig python-dev ruby-dev
 
     # dependencies needed for python docs
     $ apt-get install python-epydoc
@@ -169,7 +167,7 @@ libraries in order to place them in a default search path.
 
 When `SYSINSTALL_BINDINGS` is enabled (`ON`), the
 `CMAKE_INSTALL_PREFIX` does not affect the location for where the
-language bindings (Python, Perl, PHP, Ruby) are installed. For those
+language bindings (Python and Ruby) are installed. For those
 elements, the location is determined by the language interpreter
 itself; that is, each interpreter is queried for the proper location
 for extensions.
@@ -182,23 +180,21 @@ dynamic language bindings into a central, default location:
 In order to use these bindings, you'll need to configure your
 interpreter to load the bindings from the appropriate directory.
 
-  - Perl   - Add ${BINDINGS}/perl to PERL5LIB
-  - PHP    - Set the PHPRC envvar to point to ${BINDINGS}/php/proton.ini
   - Python - Add ${BINDINGS}/python to PYTHONPATH
   - Ruby   - Add ${BINDINGS}/ruby to RUBYLIB
 
 You can configure the build to install a specific binding to the
 location specified by the system interpreter with the
-SYSINSTALL_[LANGUAGE] options, where [LANGUAGE] is one of PERL,
-PHP, PYTHON, or RUBY.
+SYSINSTALL_[LANGUAGE] options, where [LANGUAGE] is one of PYTHON
+or RUBY.
 
-    $ cmake .. -DSYSINSTALL_PHP=ON
+    $ cmake .. -DSYSINSTALL_PYTHON=ON
 
 Disabling Language Bindings
 ---------------------------
 
 To disable any given language bindings, you can use the
-BUILD_[LANGUAGE] option where [LANGUAGE] is one of PERL, PHP,
-PYTHON or RUBY, for example:
+BUILD_[LANGUAGE] option where [LANGUAGE] is one of PYTHON
+or RUBY, for example:
 
-    $ cmake .. -DBUILD_PHP=OFF
+    $ cmake .. -DBUILD_PYTHON=OFF

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/appveyor.yml
----------------------------------------------------------------------
diff --git a/appveyor.yml b/appveyor.yml
index 712609f..80f1585 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -14,7 +14,7 @@ cache:
 before_build:
 - mkdir BLD
 - cd BLD
-- cmake -G "%CMAKE_GENERATOR%" -DBUILD_PERL=no  %QPID_PROTON_CMAKE_ARGS% ..
+- cmake -G "%CMAKE_GENERATOR%" %QPID_PROTON_CMAKE_ARGS% ..
 - cd ..
 build:
   project: BLD/Proton.sln

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/bin/jenkins-proton-c-build.sh
----------------------------------------------------------------------
diff --git a/bin/jenkins-proton-c-build.sh b/bin/jenkins-proton-c-build.sh
index 6ed22a9..8b710c1 100755
--- a/bin/jenkins-proton-c-build.sh
+++ b/bin/jenkins-proton-c-build.sh
@@ -30,7 +30,7 @@ echo Arch: `arch` Uname: `uname -a` lsb_release: `lsb_release -a` User: `whoami`
 echo =========================
 echo Listing installed packages
 dpkg -l | \
-  awk '/^ii  (cmake |maven |ruby |python |php |.*jdk |swig[0-9]*)/{print $2, $3}'| \
+  awk '/^ii  (cmake |maven |ruby |python |.*jdk |swig[0-9]*)/{print $2, $3}'| \
   sort
 echo =========================
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/config.bat.in
----------------------------------------------------------------------
diff --git a/config.bat.in b/config.bat.in
index d40f45d..d8c958e 100644
--- a/config.bat.in
+++ b/config.bat.in
@@ -40,22 +40,10 @@ set PYTHON_BINDINGS=%PROTON_BINDINGS%\python
 set COMMON_PYPATH=%PROTON_HOME%\tests\python;%PROTON_HOME%\proton-c\bindings\python
 set PYTHONPATH=%COMMON_PYPATH%;%PYTHON_BINDINGS%
 
-REM PHP
-set PHP_BINDINGS=%PROTON_BINDINGS%\php
-if EXIST %PHP_BINDINGS% (
-    echo include_path="%PHP_BINDINGS%;%PROTON_HOME%\proton-c\bindings\php" >  %PHP_BINDINGS%\php.ini
-    echo extension="%PHP_BINDINGS%\cproton.so"                             >> %PHP_BINDINGS%\php.ini
-    set PHPRC=%PHP_BINDINGS%\php.ini
-)
-
 REM Ruby
 set RUBY_BINDINGS=%PROTON_BINDINGS%\ruby
 set RUBYLIB=%RUBY_BINDINGS%;%PROTON_HOME%\proton-c\bindings\ruby\lib;%PROTON_HOME%\tests\ruby
 
-REM Perl
-set PERL_BINDINGS=%PROTON_BINDINGS%\perl
-set PERL5LIB=%PERL5LIB%;%PERL_BINDINGS%;%PROTON_HOME%\proton-c\bindings\perl\lib
-
 REM test applications
 set PATH=%PATH%;%PROTON_BUILD%\tests\tools\apps\c
 set PATH=%PATH%;%PROTON_HOME%\tests\tools\apps\python

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/config.sh.in
----------------------------------------------------------------------
diff --git a/config.sh.in b/config.sh.in
index d3f50ff..bcb7ede 100755
--- a/config.sh.in
+++ b/config.sh.in
@@ -34,30 +34,16 @@ PROTON_BUILD=@CMAKE_BINARY_DIR@
 PROTON_BINDINGS=$PROTON_BUILD/proton-c/bindings
 
 PYTHON_BINDINGS=$PROTON_BINDINGS/python
-PHP_BINDINGS=$PROTON_BINDINGS/php
-PERL_BINDINGS=$PROTON_BINDINGS/perl
 
 # Python
 COMMON_PYPATH=$PROTON_HOME/tests/python:$PROTON_HOME/proton-c/bindings/python:$PROTON_HOME/tools/py
 export PYTHONPATH=$COMMON_PYPATH:$PYTHON_BINDINGS
 
-# PHP
-if [ -d $PHP_BINDINGS ]; then
-    cat <<EOF > $PHP_BINDINGS/php.ini
-include_path="$PHP_BINDINGS:$PROTON_HOME/proton-c/bindings/php"
-extension="$PHP_BINDINGS/cproton.so"
-EOF
-    export PHPRC=$PHP_BINDINGS/php.ini
-fi
-
 # Ruby
 RUBY_BINDINGS=$PROTON_BINDINGS/ruby
 RUBY_SRC=$PROTON_HOME/proton-c/bindings/ruby
 export RUBYLIB=$RUBY_BINDINGS:$RUBY_SRC/lib:$RUBY_SRC/tests:$RUBY_SRC/spec
 
-# Perl
-export PERL5LIB=$PERL5LIB:$PERL_BINDINGS:$PROTON_HOME/proton-c/bindings/perl/lib
-
 # Go
 export GOPATH="$PROTON_BUILD/proton-c/bindings/go"
 # Help Go compiler find libraries and include files.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/docs/markdown/index.md
----------------------------------------------------------------------
diff --git a/docs/markdown/index.md b/docs/markdown/index.md
index 0f0a8e3..97ce4f2 100644
--- a/docs/markdown/index.md
+++ b/docs/markdown/index.md
@@ -1,8 +1,6 @@
 
 Proton is a library for speaking AMQP, including:
 
-- The AMQP [Messenger API](messenger/index.html), a simple but powerful interface to send and receive
-  messages over AMQP.
 - The [AMQP Protocol Engine](engine/engine.html), a succinct encapsulation of the full
   AMQP protocol machinery.
 
@@ -18,8 +16,7 @@ globally federated topologies
 
 Proton is multi-lingual:
 
-- Proton-C - a C implementation with language bindings in Python, Php, Perl,
-Ruby, and Java (via JNI).
+- Proton-C - a C implementation with language bindings in C++, Go, Python, and Ruby
 - Proton-J - a pure Java implementation
 
 Please see http://qpid.apache.org/proton for a more info.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/docs/markdown/messenger/addressing-and-routing.md
----------------------------------------------------------------------
diff --git a/docs/markdown/messenger/addressing-and-routing.md b/docs/markdown/messenger/addressing-and-routing.md
deleted file mode 100644
index 9714e1e..0000000
--- a/docs/markdown/messenger/addressing-and-routing.md
+++ /dev/null
@@ -1,210 +0,0 @@
-
-Messenger Addressing and Routing
-=================================================
-
-
-Addressing
--------------------------
-
-An address has the following form:
-
- [ amqp[s]:// ] [user[:password]@] domain [/[name]]
-
-Where domain can be one of:
-
- host | host:port | ip | ip:port | name
-
-The following are valid examples of addresses:
-
-    * example.org
-    * example.org:1234
-    * amqp://example.org
-    * amqps://example.org
-    * example.org/incoming
-    * amqps://example.org/outgoing
-    * amqps://fred:trustno1@example.org
-    * 127.0.0.1:1234
-    * amqps://127.0.0.1:1234
-
-The "/name" part of the address, that optionally follows
-the domain, is not used by the Messenger library.
-For example, if a receiver subscribes to 
-    
-        amqp://~0.0.0.0:5678
-
-Then it will receive messages sent to
-
-        amqp://~0.0.0.0:5678
-as well as
-        amqp://~0.0.0.0:5678/foo
-
-
-Likewise, if the receiver subscribes to
-
-        amqp://~0.0.0.0:5678/foo
-
-it will receive messages addressed to
-
-        amqp://~0.0.0.0:5678/foo
-        amqp://~0.0.0.0:5678
-
-and
-
-        amqp://~0.0.0.0:5678/bar
-
-
-
-
-<br/>
-
-Routing
-------------------------------
-
-### Pattern Matching, Address Translation, and Message Routing ###
-
-The Messenger library provides message routing capability
-with an address translation table.  Each entry in the table 
-consists of a *pattern* and a *translation*.
-
-You store a new route entry in the table with the call:
-
-        pn_messenger_route(messenger, pattern, translation);
-
-
-The address of each outgoing message is compared to the 
-table's patterns until the first matching pattern is found,
-or until all patterns have failed to match.
-
-If no pattern matches, then Messenger will send (or attempt
-to send) your message with the address as given.
-
-If a pattern does match your outgoing message's address, then
-Messenger will create a temporary address by transforming
-your message's address.  Your message will be sent to the 
-transformed address, but **(note!)** the address on your 
-outgoing message will not be changed.  The receiver will see 
-the original, not the transformed address.
-
-
-<br/>
-
-### Two Translation Mechanisms ###
-
-
-Messenger uses two mechanisms to translate addresses.
-The first is simple string substitution.
-
-
-        pattern:     COLOSSUS
-        translation: amqp://0.0.0.0:6666
-        input addr:  COLOSSUS
-        result:      amqp://0.0.0.0:6666
-
-
-The second mechanism is wildcard/variable substitution.
-A wildcard in the pattern matches all or part of your 
-input address.  The part of your input address that matched
-the wildcard is stored.  The matched value is then inserted
-into your translated address in place of numbered variables:
-$1, $2, and so on, up to a maximum of 64.
-
-There are two wildcards: * and % .
-The rules for matching are:
-
-        * matches anything
-        % matches anything but a /
-        other characters match themselves
-        the whole input addr must be matched
-
-
-Examples of wildcard matching:
-
-        pattern:      /%/%/%
-        translation:  $1x$2x$3
-        input addr:   /foo/bar/baz
-        result:       fooxbarxbaz
-
-        pattern:      *
-        translation:  $1
-        inout addr:   /foo/bar/baz
-        result:       /foo/bar/baz
-
-        pattern:      /*
-        translation:  $1
-        input addr:   /foo/bar/baz
-        result:       foo/bar/baz
-
-        pattern:      /*baz
-        translation:  $1
-        input addr:   /foo/bar/baz
-        result:       foo/bar/
-
-        pattern:      /%baz
-        translation:  $1
-        input addr:   /foo/bar/baz
-        result:       FAIL
-
-        pattern:      /%/baz
-        translation:  $1
-        input addr:   /foo/bar/baz
-        result:       FAIL
-
-        pattern:      /%/%/baz
-        translation:  $1
-        input addr:   /foo/bar/baz
-        result:       foo
-
-        pattern:      /*/baz
-        translation:  $1
-        input addr:   /foo/bar/baz
-        result:       foo/bar
-
-
-Examples of route translation usage:
-
-        pattern:     foo
-        translation: amqp://foo.com
-        explanation: Any message sent to "foo" will be routed to "amqp://foo.com"
-
-
-        pattern:     bar/*
-        translation: amqp://bar.com/$1
-        explanation: Any message sent to bar/<path> will be routed to the corresponding path within the amqp://bar.com domain.
-
-
-        pattern:     amqp:*
-        translation: amqps:$1
-        explanation: Route all messages over TLS.
-
-
-        pattern:     amqp://foo.com/*
-        translation: amqp://user:password@foo.com/$1
-        explanation: Supply credentials for foo.com.
-
-
-        pattern:     amqp://*
-        translation: amqp://user:password@$1
-        explanation: Supply credentials for all domains.
-
-
-        pattern:     amqp://%/*
-        translation: amqp://user:password@proxy/$1/$2
-        explanation: Route all addresses through a single proxy while preserving the
-         original destination.
-
-
-        pattern:     *
-        translation: amqp://user:password@broker/$1
-        explanation: Route any address through a single broker.
-
-
-
-<br/>
-
-### First Match Wins ###
-
-If you create multiple routing rules, each new rule is appended
-to your Messenger's list.  At send-time, Messenger looks down the 
-list, and the first rule that matches your outgoing message's 
-address wins.  Thus, when creating your routing rules, you should
-create them in order of most specific first, most general last.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/docs/markdown/messenger/index.md
----------------------------------------------------------------------
diff --git a/docs/markdown/messenger/index.md b/docs/markdown/messenger/index.md
deleted file mode 100644
index e8ccaa4..0000000
--- a/docs/markdown/messenger/index.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Proton Messenger Documentation
-==========================================
-
-Proton Messenger is a high-level API that lets you build simple but powerful messaging systems.
-
-- Use the [Linux Quick Start](quick-start-linux.html) to download, build, and run your first Messenger example in two minutes.
-
-- Examples and explanations of Messenger's [Sending and Receiving](sending-and-receiving.html) capabilities.
-
-- Use [Message Disposition](message-disposition.html) functionality to create reliable messaging systems.
-
-- Messenger's [Addressing and Routing](addressing-and-routing.html) capabilities allow you to separate application code from installation-specific configuration information.
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/docs/markdown/messenger/message-disposition.md
----------------------------------------------------------------------
diff --git a/docs/markdown/messenger/message-disposition.md b/docs/markdown/messenger/message-disposition.md
deleted file mode 100644
index 70d551f..0000000
--- a/docs/markdown/messenger/message-disposition.md
+++ /dev/null
@@ -1,196 +0,0 @@
-Message Disposition
-===============================
-
-
-Messenger disposition operations allow a receiver to accept or
-reject specific messages, or ranges of messages.  Senders can
-then detect the disposition of their messages.
-
-
-Message States
----------------------------
-
-Messages have one of four different states:  
-        `PN_STATUS_UNKNOWN`  
-        `PN_STATUS_PENDING`  
-        `PN_STATUS_ACCEPTED`  
-        `PN_STATUS_REJECTED`  
-
-<br/>
-
-
-Windows and Trackers
-----------------------------
-
-<br/>
-
-Messenger does not track the disposition of every message that
-it sends or receives.  To set (or get) the disposition of a 
-message, that message must be within your incoming (or outgoing)
-window.
-
-( I will use the incoming direction as the example.  The outgoing
-direction works similarly. )
-
-When you call
-  
-        pn_messenger_set_incoming_window(messenger, window_size);
-
-you have only declared the window size.  The window is not yet
-created.  The window will be created when you issue your first
-call to 
-
-        pn_messenger_get(messenger, msg);
-
-And the window will be further populated only by further calls to
-pn_messenger_get().
-
-
-
-
-
-
-
-### Receiving ###
-
-To explicitly set or get message dispositions, your messenger
-must set a positive size for its incoming window:
-
-        pn_messenger_set_incoming_window(messenger, N);
-
-You can implicitly accept messages by simply letting enough
-new messages arrive.  As older messages pass beyond the threshold
-of your incoming window size, they will be automatically
-accepted.  Thus, if you want to automatically accept all
-messages as they arrive, you can set your incoming window
-size to 0.
-
-To exercise *explicit* control over particular messages or ranges
-of messages, the receiver can use trackers. The call
-
-        pn_messenger_incoming_tracker(messenger);
-
-will return a tracker for the message most recently returned
-by a call to
-
-        pn_messenger_get(messenger, message);
-With a message that is being tracked, the messenger can accept
-(or reject) that individual message:
-
-        pn_messenger_accept(messenger, tracker, 0);
-        pn_messenger_reject(messenger, tracker, 0);
-
-Or it can accept (or reject) the tracked message as well as all older
-messages back to the limit of the incoming window:
-
-        pn_messenger_accept(messenger, tracker, PN_CUMULATIVE);
-        pn_messenger_reject(messenger, tracker, PN_CUMULATIVE);
-
-Once a message is accepted or rejected, its status can no longer
-be changed, even if you have a separate tracker associated with it.
-
-
-
-<br/>
-
-###When to Accept###
-
-Although you *can* accept messages implicitly by letting them fall 
-off the edge of your incoming window, you *shouldn't*.  Message
-disposition is an important form of communication to the sender.
-The best practice is to let the sender know your response, by 
-explicit acceptance or rejection, as soon as you can.  Implicitly 
-accepting messages by allowing them to fall off the edge of the 
-incoming window could delay your response to the sender for an 
-unpredictable amount of time.
-
-A nonzero window size places a limit on
-how much state your Messenger needs to track.
-
-<br/>
-
-###Accepting by Accident####
-
-If you allow a message to "fall off the edge" of your incoming 
-window before you have explicitly accepted or rejected it, then
-it will be accepted automatically.
-
-But since your incoming window is only filled by calls to 
-
-        pn_messenger_get(messenger, msg);
-
-messages cannot be forced to fall over the edge by simply 
-receiving more messages.  Messages will not be forced over the
-edge of the incoming window unless you make too many calls to
-`pn_messenger_get()` without explicitly accepting or rejecting 
-the messages.
-
-Your application should accept or reject each message as soon 
-as practical after getting and processing it.
-
-
-
-
-<br/>
-<br/>
-   
-
-
-### Sending ###
-
-A sender can learn how an individual message has been received
-if it has a positive outgoing window size:
-
-        pn_messenger_set_outgoing_window(messenger, N);
-
-and if a tracker has been associated with that message in question.  
-This call:
-
-        pn_messenger_outgoing_tracker(messenger);
-
-will return a tracker for the message most recently given to:
-
-        pn_messenger_put(messenger, message);
-
-To later find the status of the individual tracked message, you can call:
-
-        pn_messenger_status(messenger, tracker);
-
-The returned value will be one of
-
-* `PN_STATUS_ACCEPTED`
-* `PN_STATUS_REJECTED` , or
-* `PN_STATUS_PENDING` - If the receiver has not disposed the message yet.  
-
-
-If either the sender or the receiver simply declares the message (or range of messages) to
-be settled, with one of these calls:
-
-        pn_messenger_settle(messenger, tracker, 0);
-        pn_messenger_settle(messenger, tracker, PN_CUMULATIVE);
-
-then the sender will see `PN_STATUS_PENDING` as the status of any
-settled messages.
-
-<br/>
-
-
-### Message Rejection ###
-If a message is rejected by the receiver, it does not mean that
-the message was malformed.  Malformed messages cannot be sent.
-Even messages with no content are valid messages.
-Rejection by a receiver should be understood as the receiver
-saying "I don't want this." or possibly  "I don't want this *yet*." 
-depending on your application.
-The sender could decide to try sending the same message again later, 
-or to send the message to another receiver, or to discard it.
-
-The AMQP 1.0 specification permits a distinction
-between *rejecting* the message, and *releasing* the message,
-but the Proton library does not expose the *releasing* 
-disposition.
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/docs/markdown/messenger/quick-start-linux.md
----------------------------------------------------------------------
diff --git a/docs/markdown/messenger/quick-start-linux.md b/docs/markdown/messenger/quick-start-linux.md
deleted file mode 100644
index e8ef466..0000000
--- a/docs/markdown/messenger/quick-start-linux.md
+++ /dev/null
@@ -1,73 +0,0 @@
-Linux Proton Messenger Quick Start
-==============================================
-
-
-On a Linux system, these instructions take you from
-zero to running your first example code.  You will 
-need root privileges for one of the commands.
-
-
-
-
-Prerequisite Packages
----------------------------------
-
-For a minimum build, you will need packages installed on your
-box for :
-
-        subversion
-        gcc
-        cmake
-        libuuid-devel
-
-
-
-Quick Start Commands
----------------------------
-
-    svn co http://svn.apache.org/repos/asf/qpid/proton/trunk proton
-    cd ./proton
-    mkdir ./build
-    cd ./build
-    cmake ..
-    make all
-    # Become root and go to your build dir.
-    make install
-    # Stop being root.
-    # Now let's see if it works.
-    cd ./proton-c/examples/messenger/c
-    ./recv &
-    ./send
-    # You're done ! ( Kill that recv process. )
-    # The output you should see:
-
-        Address: amqp://0.0.0.0
-        Subject: (no subject)
-        Content: "Hello World!"
-
-
-
-
-
-Notes
-----------------------------
-
-1. If you will be editing and checking in code from this tree,
-   replace the "svn co" line with this:
-
-        svn co https://svn.apache.org/repos/asf/qpid/proton/trunk
-
-   You must check out through https, or you will not be able to
-   check in code changes from your tree.
-
-
-2. The recv application in the example defaults to the same port
-   as the qpid demon.  If you happen to have that demon running,
-   and using the default port, the recv app above will fail.
-
-
-3. If you don't have root privileges, you can still do the 
-   "make install" step by setting a non-standard prefix, thus:
-        cmake -DCMAKE_INSTALL_PREFIX=/my/path ..
-
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/docs/markdown/messenger/sending-and-receiving.md
----------------------------------------------------------------------
diff --git a/docs/markdown/messenger/sending-and-receiving.md b/docs/markdown/messenger/sending-and-receiving.md
deleted file mode 100644
index 555075e..0000000
--- a/docs/markdown/messenger/sending-and-receiving.md
+++ /dev/null
@@ -1,144 +0,0 @@
-Sending and Receiving Messages
-=======================================================
-
-The Proton Messenger API provides a mixture of synchronous
-and asynchronous operations to give you flexibility in
-deciding when you application should block waiting for I/O,
-and when it should not.
-
-
-When sending messages, you can:
-
-* send a message immediately,
-* enqueue a message to be sent later,
-* block until all enqueued messages are sent,
-* send enqueued messages until a timeout occurs, or
-* send all messages that can be sent without blocking.
-
-When receiving messages, you can:
-
-* receive messages that can be received without blocking,
-* block until at least one message is received,
-* receive no more than a fixed number of messages.
-
-
-
-Functions
-------------------------------
-
-* `pn_messenger_put(messenger)`
-
-    Stage message for later transmission, and possibly
-    transmit any messages currently staged that are not
-    blocked.
-    This function will not block.
-
-
-
-* `pn_messenger_send(messenger)`
-
-    If messenger timeout is negative (initial default),
-    block until all staged messages have been sent.
-
-    If messenger timeout is 0, send all messages that
-    can be sent without blocking.
-
-    If messenger timeout is positive, send all messages
-    that can be sent until timeout expires.
-
-    *note: If there are any messages that can be received
-    when `pn_messenger_send()` is called, they will
-    be received.*
-
-
-
-* `pn_messenger_get(messenger, msg)`
-
-    Dequeue the head of the incoming message queue to
-    your application.
-    This call does not block.
-
-
-
-* `pn_messenger_recv(messenger)`
-
-    If messenger timeout is negative(initial default),
-    block until at least one message is received.
-
-    If timeout is 0, receive whatever messages are available,
-    but do not block.
-
-    If timeout is positive, receive available messages until
-    timeout expires.
-
-    *note: If there are any unblocked outgoing messages,
-    they will be sent during this call.*
-
-
-
-
-
-Examples
-------------------------------
-
-* send a message immediately
-
-        pn_messenger_put(messenger, msg);
-        pn_messenger_send(messenger);
-
-
-
-* enqueue a message to be sent later
-
-        pn_messenger_put(messenger, msg);
-
-    *note:
-    The message will be sent whenever it is not blocked and
-    the Messenger code has other I/O work to be done.*
-
-
-
-* block until all enqueued messages are sent
-
-        pn_messenger_set_timeout(messenger, -1);
-        pn_messenger_send(messenger);
-
-    *note:
-    A negative timeout means 'forever'.  That is the initial
-    default for a messenger.*
-
-
-
-* send enqueued messages until a timeout occurs
-
-        pn_messenger_set_timeout(messenger, 100); /* 100 msec */
-        pn_messenger_send(messenger);
-
-
-
-* send all messages that can be sent without blocking
-
-        pn_messenger_set_timeout(messenger, 0);
-        pn_messenger_send(messenger);
-
-
-
-* receive messages that can be received without blocking
-
-        pn_messenger_set_timeout(messenger, 0);
-        pn_messenger_recv(messenger, -1);
-
-
-* block until at least one message is received
-
-        pn_messenger_set_timeout(messenger, -1);
-        pn_messenger_recv(messenger, -1);
-
-    *note: -1 is initial messenger default.*
-
-
-
-* receive no more than a fixed number of messages
-
-        pn_messenger_recv(messenger, 10);
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
index 381d533..a6c48ec 100644
--- a/proton-c/CMakeLists.txt
+++ b/proton-c/CMakeLists.txt
@@ -193,14 +193,9 @@ endif (PN_WINAPI)
 
 # Try to keep any platform specific overrides together here:
 
-# Until we can decide what to do with PHP support, turn it off by default
-# (We can't build with recent versions of PHP)
-set (NOBUILD_PHP ON)
-
 # MacOS has a bunch of differences in build tools and process and so we have to turn some things
 # off if building there:
 if (APPLE)
-  set (NOBUILD_PHP ON)
   set (NOENABLE_WARNING_ERROR ON)
   set (NOENABLE_UNDEFINED_ERROR ON)
 endif (APPLE)
@@ -814,8 +809,3 @@ if (BUILD_PYTHON)
   add_dependencies(quick_perf_py reactor-recv _cproton)
 
 endif (BUILD_PYTHON)
-
-if (BUILD_JAVASCRIPT)
-  add_test (javascript-codec ${env_py} node ${pn_test_root}/javascript/codec.js)
-  add_test (javascript-message ${env_py} node ${pn_test_root}/javascript/message.js)
-endif (BUILD_JAVASCRIPT)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/CMakeLists.txt b/proton-c/bindings/CMakeLists.txt
index 5362f92..233c09f 100644
--- a/proton-c/bindings/CMakeLists.txt
+++ b/proton-c/bindings/CMakeLists.txt
@@ -19,17 +19,7 @@
 
 # Add bindings that do not require swig here - the directory name must be the same as the binding name
 # See below for swig bindings
-set(BINDINGS javascript cpp go)
-
-# Prerequisites for javascript.
-#
-# It uses a C/C++ to JavaScript cross-compiler called emscripten (https://github.com/kripken/emscripten). Emscripten takes C/C++
-# and compiles it into a highly optimisable subset of JavaScript called asm.js (http://asmjs.org/) that can be
-# aggressively optimised and run at near-native speed (usually between 1.5 to 10 times slower than native C/C++).
-find_package(Emscripten)
-if (EMSCRIPTEN_FOUND)
-  set (DEFAULT_JAVASCRIPT ON)
-endif (EMSCRIPTEN_FOUND)
+set(BINDINGS cpp go)
 
 if (CMAKE_CXX_COMPILER)
   set (DEFAULT_CPP ON)
@@ -49,7 +39,7 @@ endif (GO_EXE)
 
 if(SWIG_FOUND)
   # Add any new swig bindings here - the directory name must be the same as the binding name
-  list(APPEND BINDINGS python ruby php perl)
+  list(APPEND BINDINGS python ruby)
 
   include(UseSWIG)
 
@@ -58,11 +48,6 @@ if(SWIG_FOUND)
   # All swig modules should include ${BINDING_DEPS} in swig_link_libraries
   set (BINDING_DEPS qpid-proton)
 
-  # If swig version is 3.0 or greater then we can build some additional bindings
-  if (${SWIG_VERSION} VERSION_GREATER 3.0 OR ${SWIG_VERSION} VERSION_EQUAL 3.0)
-    list(APPEND SWIG_BINDINGS node)
-  endif()
-
   # Add a block here to detect the prerequisites to build each language binding:
   #
   # If the prerequisites for the binding are present set a variable called
@@ -79,26 +64,6 @@ if(SWIG_FOUND)
   if (RUBY_FOUND)
     set (DEFAULT_RUBY ON)
   endif (RUBY_FOUND)
-
-  # Prerequites for PHP:
-  # For now, assume PHP support if the 'php-config' tool is present.
-  # @todo: allow user to specify which php-config if multiple PHP sources installed!
-  find_program(PHP_CONFIG_EXE php-config)
-  if (PHP_CONFIG_EXE)
-    find_program(PHP_EXE php)
-    mark_as_advanced (PHP_EXE)
-    if (PHP_EXE)
-      set (DEFAULT_PHP ON)
-    endif (PHP_EXE)
-  endif (PHP_CONFIG_EXE)
-  mark_as_advanced (PHP_CONFIG_EXE)
-
-  # Prerequisites for Perl:
-  include(ProtonFindPerl)
-  if (PERLLIBS_FOUND)
-    set (DEFAULT_PERL ON)
-  endif (PERLLIBS_FOUND)
-
 endif()
 
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/CMakeLists.txt b/proton-c/bindings/javascript/CMakeLists.txt
deleted file mode 100644
index c81a2ad..0000000
--- a/proton-c/bindings/javascript/CMakeLists.txt
+++ /dev/null
@@ -1,279 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
- 
-# This file allows cross-compiling of proton to JavaScript using emscripten
-# (https://github.com/kripken/emscripten). As it is really a cross-compilation
-# (as opposed to a binding like with swig) the approach is rather different and
-# somewhat replicates the main build in the proton-c/CMakeLists.txt using quite
-# a bit of "copy and paste reuse".
-# TODO refactor this file (and proton-c/CMakeLists.txt) to keep the main
-# compilation and cross-compilation consistent.
-
-message(STATUS "Found emscripten, using that to build JavaScript binding")
-
-# Find and install the node.js packages that we might need. We can assume that
-# node.js itself is installed because Emscripten has a dependency on it.
-find_package(NodePackages)
-
-# Describe the target OS we are building to - Emscripten mimics the Linux platform.
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_VERSION 1)
-set(CMAKE_CROSSCOMPILING TRUE)
-
-# Specify the compiler to use for cross-compilation.
-set(CMAKE_C_COMPILER "${EMCC}")
-
-# Don't do compiler autodetection, since we are cross-compiling.
-include(CMakeForceCompiler)
-CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" Clang)
-
-# The Proton default build type is RelWithDebInfo, but for JavaScript the C debug
-# mechanism is irrelevant. If Debug is explicitly set we turn off optimisations
-# and don't run the closure compiler so any error/profiling messages are readable.
-if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-    message(STATUS "JavaScript build type is \"Debug\"")
-else()
-    set(CMAKE_BUILD_TYPE Release)
-    message(STATUS "JavaScript build type is \"Release\"")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
-    set(EMSCRIPTEN_LINK_OPTIMISATIONS "-O2 --closure 1")
-endif()
-
-# From this point we should be using emscripten compilation tools.
-message(STATUS "emscripten compilation environment:")
-message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}")
-
-
-# Set this to the proton-c directory, we're cross-compiling code from there.
-set(PN_PATH ${CMAKE_SOURCE_DIR}/proton-c)
-
-
-# TODO the OpenSSL stuff won't work for emscripten by default. It might well be
-# possible to compile it from source using emscripten (that's the standard practice
-# for libraries with emscripten) see https://github.com/kripken/emscripten/wiki/FAQ
-# "Q. How do I link against system libraries like SDL, boost, etc.?"
-# Though it might be more natural to simply use a TLS protected wss:// WebSocket URL.
-#  set(pn_ssl_impl src/ssl/openssl.c)
-#  set(SSL_LIB ${OPENSSL_LIBRARIES})
-set(pn_ssl_impl ${PN_PATH}/src/ssl/ssl_stub.c)
-
-# emscripten is Linux like so use the posix impls.
-set(pn_io_impl ${PN_PATH}/src/posix/io.c)
-set(pn_selector_impl ${PN_PATH}/src/posix/selector.c)
-
-CHECK_LIBRARY_EXISTS (uuid uuid_generate "" UUID_GENERATE_IN_UUID)
-if (UUID_GENERATE_IN_UUID)
-  set (UUID_LIB uuid)
-endif (UUID_GENERATE_IN_UUID)
-
-# Generate encodings.h and protocol.h
-# It may be possible to use the ones generated for the main proton-c build but
-# qpid-proton-core has a dependency on the generated files, so I'm not sure if
-# it'll work without a command that can be run as a dependency. Probably best
-# do it this way when cross-compiling - though more copy'n'paste
-add_custom_command(
-  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/encodings.h
-  COMMAND python ${PN_PATH}/env.py PYTHONPATH=${PN_PATH} python ${PN_PATH}/src/codec/encodings.h.py > ${CMAKE_CURRENT_BINARY_DIR}/encodings.h
-  DEPENDS ${PN_PATH}/src/codec/encodings.h.py
-  )
-
-add_custom_command(
-  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/protocol.h
-  COMMAND python ${PN_PATH}/env.py PYTHONPATH=${PN_PATH} python ${PN_PATH}/src/protocol.h.py > ${CMAKE_CURRENT_BINARY_DIR}/protocol.h
-  DEPENDS ${PN_PATH}/src/protocol.h.py
-  )
-
-set(COMPILE_WARNING_FLAGS "-Werror -Wall -pedantic-errors -Wno-comment -Wno-warn-absolute-paths")
-
-# Explicitly set PLATFORM_DEFINITIONS to Linux ones for emscripten as we don't
-# want to inadvertently use Windows versions if we happen to be cross-compiling
-# from a Windows platform
-set(PLATFORM_DEFINITIONS "USE_CLOCK_GETTIME;USE_UUID_GENERATE;USE_STRERROR_R;USE_ATOLL")
-
-# The following is largely a copy from the the main proton-c/CMakeLists.txt.
-# The main difference is prefixing paths with ${PN_PATH}/ as we can't use a
-# relative path from this CMakeLists.txt.
-
-set(qpid-proton-platform
-  ${pn_io_impl}
-  ${pn_selector_impl}
-  ${PN_PATH}/src/platform.c
-  ${pn_ssl_impl}
-  )
-
-set(qpid-proton-core
-  ${PN_PATH}/src/object/object.c
-  ${PN_PATH}/src/object/list.c
-  ${PN_PATH}/src/object/map.c
-  ${PN_PATH}/src/object/string.c
-  ${PN_PATH}/src/object/iterator.c
-  ${PN_PATH}/src/object/record.c
-
-  ${PN_PATH}/src/log.c
-  ${PN_PATH}/src/util.c
-  ${PN_PATH}/src/url.c
-  ${PN_PATH}/src/error.c
-  ${PN_PATH}/src/buffer.c
-  ${PN_PATH}/src/parser.c
-  ${PN_PATH}/src/scanner.c
-  ${PN_PATH}/src/types.c
-
-  ${PN_PATH}/src/framing/framing.c
-
-  ${PN_PATH}/src/codec/codec.c
-  ${PN_PATH}/src/codec/decoder.c
-  ${PN_PATH}/src/codec/encoder.c
-
-  ${PN_PATH}/src/dispatcher/dispatcher.c
-  ${PN_PATH}/src/engine/engine.c
-  ${PN_PATH}/src/events/event.c
-  ${PN_PATH}/src/transport/autodetect.c
-  ${PN_PATH}/src/transport/transport.c
-  ${PN_PATH}/src/message/message.c
-  ${PN_PATH}/src/sasl/sasl.c
-  ${PN_PATH}/src/sasl/none_sasl.c
-
-  ${PN_PATH}/src/messenger/messenger.c
-  ${PN_PATH}/src/messenger/subscription.c
-  ${PN_PATH}/src/messenger/store.c
-  ${PN_PATH}/src/messenger/transform.c
-  ${PN_PATH}/src/selectable.c
-
-  ${CMAKE_CURRENT_BINARY_DIR}/encodings.h
-  ${CMAKE_CURRENT_BINARY_DIR}/protocol.h
-  )
-
-set_source_files_properties(
-  ${qpid-proton-core}
-  PROPERTIES
-  COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_LANGUAGE_FLAGS}"
-  )
-
-set_source_files_properties(
-  ${qpid-proton-platform}
-  PROPERTIES
-  COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_PLATFORM_FLAGS}"
-  COMPILE_DEFINITIONS "${PLATFORM_DEFINITIONS}"
-  )
-
-# Compile Proton into LLVM bitcode which will be used later in the linking stage
-# of add_executable for compilation into Javascript.
-add_library(
-  qpid-proton-bitcode SHARED
-
-  ${qpid-proton-core}
-  ${qpid-proton-platform}
-  )
-
-set_target_properties(
-  qpid-proton-bitcode
-  PROPERTIES
-  VERSION   "${PN_LIB_LEGACY_VERSION}"
-  SOVERSION "${PN_LIB_LEGACY_MAJOR_VERSION}"
-  LINK_FLAGS "${CATCH_UNDEFINED}"
-  )
-target_link_libraries(qpid-proton-bitcode)
-
-
-# Compile the send-async.c and recv-async.c examples into JavaScript
-include_directories(${Proton_SOURCE_DIR}/examples/c/include)
-add_executable(send-async.js ${Proton_SOURCE_DIR}/examples/c/messenger/send-async.c)
-target_link_libraries(send-async.js qpid-proton-bitcode)
-
-add_executable(recv-async.js ${Proton_SOURCE_DIR}/examples/c/messenger/recv-async.c)
-target_link_libraries(recv-async.js qpid-proton-bitcode)
-
-set_target_properties(
-  send-async.js recv-async.js
-  PROPERTIES
-  COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_PLATFORM_FLAGS}"
-  RUNTIME_OUTPUT_DIRECTORY examples
-  DEPENDS ws
-
-  LINK_FLAGS "-s \"WEBSOCKET_SUBPROTOCOL='AMQPWSB10'\" -${EMSCRIPTEN_LINK_OPTIMISATIONS}"
-  )
-
-# Build the main JavaScript library called proton-messenger.js
-add_executable(proton-messenger.js binding.c)
-target_link_libraries(proton-messenger.js qpid-proton-bitcode ${UUID_LIB})
-
-set_target_properties(
-  proton-messenger.js
-  PROPERTIES
-  COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_PLATFORM_FLAGS}"
-
-  # The --memory-init-file 0 stops emscripten emitting a separate memory
-  # initialization file, if this was enabled it makes packaging harder as
-  # applications would expect proton-messenger.js.mem to be served too. It's even
-  # more fiddly with node.js packages. This behaviour might be reinstated if the
-  # packaging mechanism improves.
-
-  LINK_FLAGS "-s \"EXPORT_NAME='proton'\" -s \"WEBSOCKET_SUBPROTOCOL='AMQPWSB10'\" ${EMSCRIPTEN_LINK_OPTIMISATIONS} --memory-init-file 0 --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/binding-open.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/module.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/error.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/messenger.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/subscription.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/message.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-uuid.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-symbol.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-described.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-array.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-typed-number.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-long.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-binary.js --post-js ${CMAKE_CURRENT_SOURCE_DIR}/binding-close.js -s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=\"[]\" -s EXPORTED_FUNCTIONS=\"['_pn_get_version_major', '_
 pn_get_version_minor', '_pn_uuid_generate', '_pn_bytes', '_pn_error_text', '_pn_code', '_pn_messenger', '_pn_messenger_name', '_pn_messenger_set_blocking', '_pn_messenger_free', '_pn_messenger_errno', '_pn_messenger_error', '_pn_messenger_get_outgoing_window', '_pn_messenger_set_outgoing_window', '_pn_messenger_get_incoming_window', '_pn_messenger_set_incoming_window', '_pn_messenger_start', '_pn_messenger_stop', '_pn_messenger_stopped', '_pn_messenger_subscribe', '_pn_messenger_put', '_pn_messenger_status', '_pn_messenger_buffered', '_pn_messenger_settle', '_pn_messenger_outgoing_tracker', '_pn_messenger_recv', '_pn_messenger_receiving', '_pn_messenger_get', '_pn_messenger_incoming_tracker', '_pn_messenger_incoming_subscription', '_pn_messenger_accept', '_pn_messenger_reject', '_pn_messenger_outgoing', '_pn_messenger_incoming',  '_pn_messenger_route', '_pn_messenger_rewrite', '_pn_messenger_set_passive', '_pn_messenger_selectable', '_pn_subscription_get_context', '_pn_subscription_
 set_context', '_pn_subscription_address', '_pn_message', '_pn_message_id', '_pn_message_correlation_id', '_pn_message_free', '_pn_message_errno', '_pn_message_error', '_pn_message_clear', '_pn_message_is_inferred', '_pn_message_set_inferred', '_pn_message_is_durable', '_pn_message_set_durable', '_pn_message_get_priority', '_pn_message_set_priority', '_pn_message_get_ttl', '_pn_message_set_ttl', '_pn_message_is_first_acquirer', '_pn_message_set_first_acquirer', '_pn_message_get_delivery_count', '_pn_message_set_delivery_count', '_pn_message_get_user_id', '_pn_message_set_user_id', '_pn_message_get_address', '_pn_message_set_address', '_pn_message_get_subject', '_pn_message_set_subject', '_pn_message_get_reply_to', '_pn_message_set_reply_to', '_pn_message_get_content_type', '_pn_message_set_content_type', '_pn_message_get_content_encoding', '_pn_message_set_content_encoding', '_pn_message_get_expiry_time', '_pn_message_set_expiry_time', '_pn_message_get_creation_time', '_pn_message_se
 t_creation_time', '_pn_message_get_group_id', '_pn_message_set_group_id', '_pn_message_get_group_sequence', '_pn_message_set_group_sequence', '_pn_message_get_reply_to_group_id', '_pn_message_set_reply_to_group_id', '_pn_message_encode', '_pn_message_decode', '_pn_message_instructions', '_pn_message_annotations', '_pn_message_properties', '_pn_message_body', '_pn_data', '_pn_data_free', '_pn_data_error', '_pn_data_errno', '_pn_data_clear', '_pn_data_rewind', '_pn_data_next', '_pn_data_prev', '_pn_data_enter', '_pn_data_exit', '_pn_data_lookup', '_pn_data_narrow', '_pn_data_widen', '_pn_data_type', '_pn_data_encode', '_pn_data_decode', '_pn_data_put_list', '_pn_data_put_map', '_pn_data_put_array', '_pn_data_put_described', '_pn_data_put_null', '_pn_data_put_bool', '_pn_data_put_ubyte', '_pn_data_put_byte', '_pn_data_put_ushort', '_pn_data_put_short', '_pn_data_put_uint', '_pn_data_put_int', '_pn_data_put_char', '_pn_data_put_ulong', '_pn_data_put_long', '_pn_data_put_timestamp', '_pn
 _data_put_float', '_pn_data_put_double', '_pn_data_put_decimal32', '_pn_data_put_decimal64', '_pn_data_put_decimal128', '_pn_data_put_uuid', '_pn_data_put_binary', '_pn_data_put_string', '_pn_data_put_symbol', '_pn_data_get_list', '_pn_data_get_map', '_pn_data_get_array', '_pn_data_is_array_described', '_pn_data_get_array_type', '_pn_data_is_described', '_pn_data_is_null', '_pn_data_get_bool', '_pn_data_get_ubyte', '_pn_data_get_byte', '_pn_data_get_ushort', '_pn_data_get_short', '_pn_data_get_uint', '_pn_data_get_int', '_pn_data_get_char', '_pn_data_get_ulong', '_pn_data_get_long', '_pn_data_get_timestamp', '_pn_data_get_float', '_pn_data_get_double', '_pn_data_get_decimal32', '_pn_data_get_decimal64', '_pn_data_get_decimal128', '_pn_data_get_uuid', '_pn_data_get_binary', '_pn_data_get_string', '_pn_data_get_symbol', '_pn_data_copy', '_pn_data_format', '_pn_data_dump', '_pn_selectable_readable', '_pn_selectable_is_reading', '_pn_selectable_writable', '_pn_selectable_is_writing', '_
 pn_selectable_is_terminal', '_pn_selectable_get_fd', '_pn_selectable_free']\""
-  )
-
-# This command packages up the compiled proton-messenger.js into a node.js package
-# called qpid-proton-messenger and copies it to the <proton>/node_modules directory.
-# This allows the node.js test and example programs to do:
-# var proton = require("qpid-proton-messenger");
-add_custom_command(
-    TARGET proton-messenger.js
-    COMMAND ${CMAKE_COMMAND}
-            -E copy_directory 
-            ${CMAKE_CURRENT_SOURCE_DIR}/qpid-proton-messenger
-            ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton-messenger
-    COMMAND ${CMAKE_COMMAND}
-            -E copy
-            ${CMAKE_CURRENT_BINARY_DIR}/proton-messenger.js
-            ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton-messenger/lib
-   COMMENT "Building qpid-proton-messenger package for node.js"
-)
-
-# The cleanall target removes the qpid-proton-messenger package from <proton>/node_modules
-add_custom_target(
-    cleanall
-    COMMAND echo "CLEAN NODE MODULES"
-    COMMAND ${CMAKE_COMMAND}
-            -E remove_directory
-            ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton-messenger
-)
-
-# If the docs target is specified and the jsdoc3 package for node.js has been
-# installed then build the JavaScript API documentation.
-if (NODE_JSDOC_FOUND)
-    set(JSDOC_EXE ${PROJECT_SOURCE_DIR}/node_modules/.bin/jsdoc)
-
-    message(STATUS "Documentation Enabled. Using ${JSDOC_EXE} to build JavaScript docs")
-    add_custom_target(docs-js COMMAND ${JSDOC_EXE}
-                      -d ${CMAKE_CURRENT_BINARY_DIR}/html
-                      ${CMAKE_CURRENT_SOURCE_DIR}/module.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/error.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/messenger.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/subscription.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/message.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/data.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/data-uuid.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/data-symbol.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/data-described.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/data-array.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/data-typed-number.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/data-long.js
-                      ${CMAKE_CURRENT_SOURCE_DIR}/data-binary.js)
-    add_dependencies(docs docs-js)
-endif (NODE_JSDOC_FOUND)
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/LICENSE
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/LICENSE b/proton-c/bindings/javascript/LICENSE
deleted file mode 100644
index 6b0b127..0000000
--- a/proton-c/bindings/javascript/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c9bb9ff/proton-c/bindings/javascript/README
----------------------------------------------------------------------
diff --git a/proton-c/bindings/javascript/README b/proton-c/bindings/javascript/README
deleted file mode 100644
index 9ec37d0..0000000
--- a/proton-c/bindings/javascript/README
+++ /dev/null
@@ -1,426 +0,0 @@
-Qpid Proton JavaScript Language Bindings
-========================================
-
-The code contained herein provides JavaScript language bindings for working
-with the Qpid Proton AMQP 1.0 protocol engine and messenger library.
-
-Important Note - Modern Browser Needed
-======================================
-
-The JavaScript binding requires ArrayBuffer/TypedArray and WebSocket support.
-Both of these are available in most "modern" browser versions. The author has
-only tried running on FireFox and Chrome, though recent Safari, Opera and IE10+
-*should* work too - YMMV. It might be possible to polyfill for older browsers
-but the author hasn't tried this.
-
-Important Note - WebSocket Transport!!!
-=======================================
-
-Before going any further it is really important to realise that the JavaScript
-bindings to Proton are somewhat different to the bindings for other languages
-because of the restrictions of the execution environment. In particular it is
-very important to note that the JavaScript bindings by default use a WebSocket
-transport and not a TCP transport, so whilst it's possible to create Server style
-applications that clients can connect to (e.g. recv.js and send.js) note that:
-
-JavaScript clients cannot *directly* talk to "normal" AMQP applications such as
-qpidd or (by default) the Java Broker because they use a standard TCP transport.
-
-This is a slightly irksome issue, but there's no getting away from it because
-it's a security restriction imposed by the browser environment.
-
-
-At the moment even for Node.js we are limited to using a WebSocket transport, but
-it is on the author's "TODO" list to look at providing a means to use either a
-WebSocket transport or a native TCP transport (via node's net library). It should
-also be possible to use native TCP for Chrome "packaged apps", but again this is
-only on the TODO list so if you want to talk to a "normal" AMQP application you
-must live with the WebSocket constraints.
-
-Option 1. proxy from WebSockets to TCP sockets. The application
-<proton>/examples/messenger/javascript/proxy.js
-is a simple Node.js WebSocket<->TCP Socket proxy, simply doing:
-
-node proxy.js
-
-will stand up a proxy listening by default on WebSocket port 5673 and forwarding
-to TCP port 5672 (this is configurable, for options do: node proxy.js -h)
-
-Rather than using a stand-alone proxy it is possible to have applications stand
-up their own proxy (where lport = listen port, thost = target host and
-tport = target port):
-
-var proxy = require('./ws2tcp.js');
-proxy.ws2tcp(lport, thost, tport);
-
-For talking to the C++ broker unfortunately proxying is currently the only option
-as qpidd does not have a WebSocket transport.
-
-Option 2. The Java Broker's WebSocket transport.
-Recent releases of the Qpid Java Broker provide a native WebSocket transport which
-means that the JavaScript binding can talk to it with no additional requirements.
-It is necessary to configure the Java Broker as the WebSocket transport is not
-enabled by default. In <qpid-work>/config.json in the "ports" array you need to add:
-
-{
-    "authenticationProvider" : "passwordFile",
-    "name" : "AMQP-WS",
-    "port" : "5673",
-    "transports" : [ "WS" ]
-}
-
-This sets the JavaBroker to listen on WebSocket port 5673 similar to the proxy.
-
-
-One gotcha that still bites the author *** DO NOT FORGET *** that you will be
-using ports that you are not used to!! If you are not connecting check that the
-proxy is running and that you are specifying the right ports. I still mess up :-(
-
-WebRTC Transport
-================
-
-A WebRTC Transport is supported by emscripten, though the author has not tried it.
-If you wan to play with this you are very much on your own at the moment YMMV.
-
-This is configured by adding to the LINK_FLAGS in CMakeLists.txt
--s \"SOCKET_WEBRTC=1\"
-
-  /* WebRTC sockets supports several options on the Module object.
-
-     * Module['host']: true if this peer is hosting, false otherwise
-     * Module['webrtc']['broker']: hostname for the p2p broker that this peer should use
-     * Module['webrtc']['session']: p2p session for that this peer will join, or undefined if this peer is hosting
-     * Module['webrtc']['hostOptions']: options to pass into p2p library if this peer is hosting
-     * Module['webrtc']['onpeer']: function(peer, route), invoked when this peer is ready to connect
-     * Module['webrtc']['onconnect']: function(peer), invoked when a new peer connection is ready
-     * Module['webrtc']['ondisconnect']: function(peer), invoked when an existing connection is closed
-     * Module['webrtc']['onerror']: function(error), invoked when an error occurs
-   */
-
-If you wanted to play with these you'd likely have to tweak the module.js code in
-<proton>/proton-c/bindings/javascript
-
-The emscripten documentation is a bit light on the WebRTC Transport too, though
-
-emscripten/tests/test_sockets.py
-emscripten/tests/sockets/webrtc_host.c
-emscripten/tests/sockets/webrtc_peer.c
-emscripten/tests/sockets/p2p/broker/p2p-broker.js
-emscripten/tests/sockets/p2p/client/p2p-client.js
-
-Look like they provide a starting point.
-Very much TODO......
-
-
-Creating The Bindings
-=====================
-
-To generate the JavaScript bindings we actually cross-compile from proton-c
-
-You will need to have emscripten (https://github.com/kripken/emscripten) installed
-to do the cross-compilation and in addition you will require a few things that
-emscripten itself depends upon.
-
-http://kripken.github.io/emscripten-site/docs/building_from_source/index.html#installing-from-source
-http://kripken.github.io/emscripten-site/docs/building_from_source/toolchain_what_is_needed.html
-provide instructions for installing emscripten and the "fastcomp" LLVM backend.
-This approach lets users use the "bleeding edge" version of emscripten on the
-"incoming" branch (pretty much analogous to building qpid/proton off svn trunk).
-This is the approach that the author of the JavaScript Bindings tends to use.
-
-
-http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html
-provides some fairly easy to follow instructions for getting started on several
-platforms the main dependencies are as follows (on Windows the SDK includes these):
-
-* The Emscripten code, from github (git clone git://github.com/kripken/emscripten.git).
-* LLVM with Clang. Emscripten uses LLVM and Clang, but at the moment the JavaScript
-  back-end for LLVM is off on a branch so you can't use a stock LLVM/Clang.
-  http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
-  http://kripken.github.io/emscripten-site/docs/building_from_source/building_fastcomp_manually_from_source.html#building-fastcomp-from-source
-  has lots of explanation and some easy to follow instructions for downloading
-  and building fastcomp
-* Node.js (0.8 or above; 0.10.17 or above to run websocket-using servers in node)
-* Python 2.7.3
-* Java is required in order to use the Closure Compiler to minify the code.
-  
-
-If you haven't run Emscripten before it's a good idea to have a play with the
-tutorial here:
-http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html
-
-
-
-when you are all set up with emscripten and have got the basic tests in the
-tutorial running building Proton should be simple, simply go to the Proton root
-directory and follow the main instructions in the README there, in precis (from
-the root directory) it's:
-
-  mkdir build
-  cd build
-  cmake ..
-  make
-
-and you should be all set, to test it's all working do (from the build directory):
-  cd proton-c/bindings/javascript/examples
-
-  node recv-async.js
-
-in one window and
-
-  node send-async.js
-
-in another.
-
-These examples are actually JavaScript applications that have been directly
-compiled from recv-async.c and send-async.c in <proton>/examples/messenger/c
-if you'd prefer to write applications in C and compile them to JavaScript that
-is a perfectly valid approach and these examples provide a reasonable starting
-point for doing so.
-
-Documentation
-=============
-
-When you've successfully got a working build do:
-
-  make docs
-
-Which will make all of the proton documentation including the JavaScript docs.
-If successful the JSDoc generated documentation should be found here:
-
-<proton>/build/proton-c/bindings/javascript/html/index.html
-
-
-Using "native" JavaScript
-=========================
-
-The examples in <proton>/examples/messenger/javascript are the best starting point.
-
-In practice the examples follow a fairly similar pattern to the Python bindings
-the most important thing to bear in mind though is that JavaScript is completely
-asynchronous/non-blocking, which can catch the unwary.
-
-An application follows the following (rough) steps:
-
-1. (optional) Set the heap size.
-It's important to realise that most of the library code is compiled C code and
-the runtime uses a "virtual heap" to support the underlying malloc/free. This is
-implemented internally as an ArrayBuffer with a default size of 16777216.
-
-To allocate a larger heap an application must set the PROTON_TOTAL_MEMORY global.
-In Node.js this would look like (see send.js):
-PROTON_TOTAL_MEMORY = 50000000; // Note no var - it needs to be global.
-
-In a browser it would look like (see send.html):
-<script type="text/javascript">PROTON_TOTAL_MEMORY = 50000000;</script>
-
-2. Load the library and create a message and messenger.
-In Node.js this would look like (see send.js):
-var proton = require("qpid-proton-messenger");
-var message = new proton.Message();
-var messenger = new proton.Messenger();
-
-In a browser it would look like (see send.html):
-<script type="text/javascript" src="../../../node_modules/qpid-proton-messenger/lib/proton-messenger.js"></script>
-
-<script type="text/javascript">
-var message = new proton.Message();
-var messenger = new proton.Messenger();
-....
-
-3. Set up event handlers as necessary.
-
-messenger.on('error', <error callback>);
-messenger.on('work', <work callback>);
-messenger.on('subscription', <subscription callback>);
-
-
-The work callback is triggered on WebSocket events, so in general you would use
-this to send and receive messages, for example in recv.js we have:
-
-var pumpData = function() {
-    while (messenger.incoming()) {
-        var t = messenger.get(message);
-
-        console.log("Address: " + message.getAddress());
-        console.log("Subject: " + message.getSubject());
-
-        // body is the body as a native JavaScript Object, useful for most real cases.
-        //console.log("Content: " + message.body);
-
-        // data is the body as a proton.Data Object, used in this case because
-        // format() returns exactly the same representation as recv.c
-        console.log("Content: " + message.data.format());
-
-        messenger.accept(t);
-    }
-};
-
-messenger.on('work', pumpData);
-
-
-The subscription callback is triggered when the address provided in a call to
-messenger.subscribe(<address>);
-
-Gets resolved. An example of its usage can be found in qpid-config.js which is
-a fully functioning and complete port of the python qpid-config tool. It also
-illustrates how to do asynchronous request/response based applications.
-
-Aside from the asynchronous aspects the rest of the API is essentially the same
-as the Python binding aside from minor things such as camel casing method names etc.
-
-Serialisation/Deserialization, Types etc.
-=========================================
-
-The JavaScript binding tries to be as simple, intuitive and natural as possible
-so when sending a message all native JavaScript types including Object literals
-and Arrays are transparently supported, for example.
-
-var message = new proton.Message();
-message.setAddress('amqp://localhost');
-message.setSubject('UK.NEWS');
-message.body = ['Rod', 'Jane', 'Freddy', {cat: true, donkey: 'hee haw'}];
-
-
-The main thing to bear in mind is that (particularly for sending messages) we
-may need to use "adapters" to make sure values are correctly interpreted and
-encoded to the correct type in the AMQP type system. This is especially important
-when interoperating with a peer written in a strongly typed language (C/C++/Java).
-
-Some examples of available types follow:
-
-// UUID
-message.body = new proton.Data.Uuid();
-
-// AMQP Symbol
-message.body = new proton.Data.Symbol("My Symbol");
-
-// Binary data (created from a gibberish String in this case).
-message.body = new proton.Data.Binary("Monkey Bathпогромзхцвбнм");
-
-// Binary data (Get a Uint8Array view of the data and directly access that).
-message.body = new proton.Data.Binary(4);
-var buffer = message.body.getBuffer();
-buffer[0] = 65;
-buffer[1] = 77;
-buffer[2] = 81;
-buffer[3] = 80;
-
-// Binary Data (Created from an Array, you can use an ArrayBuffer/TypedArray too).
-message.body = new proton.Data.Binary([65, 77, 81, 80]);
-
-
-Note that the implementation of proton.Data.Binary tries to minimise copying so
-it accesses the internal emscripten heap *directly* this requires memory management
-which is mostly handled transparently, but users need to be aware that the
-underlying memory is "owned" by the Message Object, so if Binary data needs to
-be maintained after the next call to messenger.get(message); it must be
-*explicitly* copied. For more detail do "make docs" and see:
-<proton>/build/proton-c/bindings/javascript/html/proton.Data.Binary.html
-
-
-// AMQP Described (value, descriptor)
-message.body = new proton.Data.Described('persian, 'com.cheezburger.icanhas');
-
-// AMQP Timestamp maps to native JavaScript Date.
-message.body = new Date();
-
-// Various AMQP Array examples.
-message.body = new proton.Data.Array('INT', [1, 3, 5, 7], "odd numbers");
-message.body = new proton.Data.Array('UINT', [1, 3, 5, 7], "odd");
-message.body = new proton.Data.Array('ULONG', [1, 3, 5, 7], "odd");
-message.body = new proton.Data.Array('FLOAT', [1, 3, 5, 7], "odd");
-message.body = new proton.Data.Array('STRING', ["1", "3", "5", "7"], "odd");
-
-// A JavaScript TypedArray will map directly to and from an AMQP Array of the
-// appropriate type (Internally sets a descriptor of 'TypedArray').
-message.body = new Uint8Array([1, 3, 5, 7]);
-
-// UUID Array
-message.body = new proton.Data.Array('UUID', [new proton.Data.Uuid(), new proton.Data.Uuid(), new proton.Data.Uuid(), new proton.Data.Uuid()], "unique");
-
-// Null
-message.body = null;
-
-// Boolean
-message.body = true;
-
-// Native JavaScript Array maps to an AMQP List
-message.body = ['Rod', 'Jane', 'Freddy'];
-
-// Native JavaScript Object maps to an AMQP Map
-message.body = ['Rod', 'Jane', 'Freddy', {cat: true, donkey: 'hee haw'}];
-
-// JavaScript only has a "number" type so the binding provides "decorator"
-// methods added to the JavaScript Number class. To access this from number
-// primitives it is necessary to either use braces or use a "double dot" so that
-// the interpreter can disambiguate from a simple decimal point. The binding will
-// attempt to use the correct type such that message.body = 2147483647; would be
-// sent as an AMQP integer, but because of the way JavaScript coerces integers
-// message.body = 2147483647.0; would also be sent as an AMQP integer because
-// 2147483647.0 gets transparently converted to 2147483647 by the interpreter, so
-// to explicitly send this as an AMQP float we'd need to do:
-// message.body = 2147483647.0.float();
-
-// Some more number examples:
-message.body = 66..char();  // char - note double dot. (66).char(); works too.
-message.body = 2147483647;  // int
-message.body = -2147483649; // long
-message.body = 12147483649; // long
-message.body = (12147483649).long(); // long
-message.body = (17223372036854778000).ulong(); // ulong
-message.body = (121474.836490).float(); // float
-message.body = 12147483649.0.float(); // float
-message.body = (4294967296).uint(); // uint
-message.body = (255).ubyte(); // ubyte
-
-Note too that floats are subject to a loss of precision
-
-
-Fortunately most of these quirks only affect serialisation.when the binding
-receives a message it will attempt to decode it into the most "natural" native
-JavaScript type.
-
-
-One additional decoding "quirk" can be caused by C++ qpid::messaging clients. It
-is unfortunately quite common for C++ clients to incorrectly encode Strings as
-AMQP Binary by neglecting to provide an encoding. The QMF Management Agent is one
-such culprit. This is a bit of a pain, especially because of proton.Data.Binary
-memory management quirks and having to remember to explicitly copy the data
-on each call to messenger.get(message); In order to cater for this an overloaded
-messenger.get(message, true); has been provided. Setting the second parameter to
-true forces any received Binary payloads to be decoded as Strings. If you know
-that producers might behave in this way and you are not expecting any "real"
-Binary data from the producer this convenience mechanism results in nice clean
-JavaScript Objects being received and is extremely useful for things like QMF.
-
-JSON
-====
-
-As well as allowing native JavaScript Objects and Arrays to be transparently
-serialised and deserialized via the AMQP type system it is also possible to
-serialise/deserialize as JSON.
-
-message.setAddress('amqp://localhost');
-message.setContentType('application/json');
-message.body = {array: [1, 2, 3, 4], object: {name: "John Smith", age: 65}};
-
-On the wire the above will be encoded as an opaque binary in an AMQP data section
-but will be deserialized into a JavaScript Object in exactly the same was as the
-previous examples that use the AMQP type system.
-
-SUPPORT
-=======
-
-To report bugs in the bindings, or to request an enhancement, please file
-a tracker request:
-
-    https://issues.apache.org/jira/browse/PROTON
-
-The main support channel is the qpid-users mailing list, see:
-
-    http://qpid.apache.org/discussion.html#mailing-lists
-
-You can also directly interact with the development team and other users
-in the #qpid channel on irc.freenode.net.
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org