You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by fa...@apache.org on 2014/09/27 16:23:02 UTC

svn commit: r1627970 [1/6] - in /qpid/proton/branches/fadams-javascript-binding: ./ contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/ examples/include/pncompat/ proton-c/ proton-c/bindings/javascript/ proton-c/bindings/perl/ proton-c/binding...

Author: fadams
Date: Sat Sep 27 14:23:00 2014
New Revision: 1627970

URL: http://svn.apache.org/r1627970
Log:
Sync with proton trunk revision 1627945 and update CMakeLists.txt

Added:
    qpid/proton/branches/fadams-javascript-binding/.mailmap
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cid.h   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/url.h   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/events/
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/events/event.c   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/object/iterator.c   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/object/list.c   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/object/map.c   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/object/string.c   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/url.c   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/windows/schannel.c   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/resources/cobject.py   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/resources/curl.py   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/test/java/org/apache/qpid/proton/amqp/BinaryTest.java   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/test/java/org/apache/qpid/proton/codec/StringTypeTest.java   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/test/java/org/apache/qpid/proton/systemtests/EngineTestBase.java   (with props)
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/test/java/org/apache/qpid/proton/systemtests/FreeTest.java   (with props)
    qpid/proton/branches/fadams-javascript-binding/tests/python/proton_tests/scratch.py   (with props)
    qpid/proton/branches/fadams-javascript-binding/tests/python/proton_tests/url.py   (with props)
Removed:
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/util.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/engine/event.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/engine/event.h
Modified:
    qpid/proton/branches/fadams-javascript-binding/.gitignore
    qpid/proton/branches/fadams-javascript-binding/CMakeLists.txt
    qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/AutoOutboundTransformer.java
    qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/JMSMappingOutboundTransformer.java
    qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/OutboundTransformer.java
    qpid/proton/branches/fadams-javascript-binding/examples/include/pncompat/misc_funcs.inc
    qpid/proton/branches/fadams-javascript-binding/pom.xml
    qpid/proton/branches/fadams-javascript-binding/proton-c/CMakeLists.txt
    qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/CMakeLists.txt
    qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/messenger.js
    qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/perl/perl.i
    qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/php/php.i
    qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/cproton.i
    qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/proton.py
    qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/lib/qpid_proton/version.rb
    qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/ruby.i
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/connection.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cproton.i
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/driver.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/event.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/link.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/messenger.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/object.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/sasl.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/ssl.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/transport.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/codec/codec.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/codec/data.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/codec/decoder.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/codec/encoder.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/dispatcher/dispatcher.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/dispatcher/dispatcher.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/engine/engine-internal.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/engine/engine.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/message/message.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/messenger/messenger.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/messenger/store.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/messenger/subscription.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/messenger/transform.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/messenger/transform.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/object/object.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/platform.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/posix/driver.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/posix/io.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/posix/selector.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/proton.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/sasl/sasl.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/selectable.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/ssl/openssl.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/ssl/ssl_stub.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/tests/object.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/tests/parse-url.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/transport/transport.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/util.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/util.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/windows/driver.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/windows/io.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/windows/iocp.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/windows/iocp.h
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/windows/selector.c
    qpid/proton/branches/fadams-javascript-binding/proton-c/src/windows/write_pipeline.c
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/amqp/Binary.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/codec/EncoderImpl.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/codec/StringType.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/engine/Event.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/engine/Link.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/engine/Transport.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/EventImpl.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/LinkImpl.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/SessionImpl.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/java/org/apache/qpid/proton/messenger/impl/Address.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/resources/cengine.py
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/main/resources/cproton.py
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/test/java/org/apache/qpid/proton/messenger/impl/AddressTest.java
    qpid/proton/branches/fadams-javascript-binding/proton-j/src/test/java/org/apache/qpid/proton/systemtests/ProtonEngineExampleTest.java
    qpid/proton/branches/fadams-javascript-binding/tests/python/proton_tests/__init__.py
    qpid/proton/branches/fadams-javascript-binding/tests/python/proton_tests/engine.py

Modified: qpid/proton/branches/fadams-javascript-binding/.gitignore
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/.gitignore?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/.gitignore (original)
+++ qpid/proton/branches/fadams-javascript-binding/.gitignore Sat Sep 27 14:23:00 2014
@@ -23,6 +23,7 @@ target
 .settings
 .cproject
 eclipse-classes
+.pydevproject
 # End of Eclipse IDE files
 
 # The usual location for proton-c build files

Added: qpid/proton/branches/fadams-javascript-binding/.mailmap
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/.mailmap?rev=1627970&view=auto
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/.mailmap (added)
+++ qpid/proton/branches/fadams-javascript-binding/.mailmap Sat Sep 27 14:23:00 2014
@@ -0,0 +1,2 @@
+Clifford Jansen <cl...@apache.org>
+Ken Giusti <kg...@apache.org>

Modified: qpid/proton/branches/fadams-javascript-binding/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/CMakeLists.txt?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/CMakeLists.txt (original)
+++ qpid/proton/branches/fadams-javascript-binding/CMakeLists.txt Sat Sep 27 14:23:00 2014
@@ -85,12 +85,7 @@ mark_as_advanced (INCLUDE_INSTALL_DIR LI
 # system specified locations.
 set (BINDINGS_DIR ${LIB_INSTALL_DIR}/proton/bindings)
 
-set (SYSINSTALL_BINDINGS "*UNSPECIFIED*" 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.")
-
-if (SYSINSTALL_BINDINGS STREQUAL "*UNSPECIFIED*")
-  message(WARNING "SYSINSTALL_BINDINGS is unspecified, defaulting it to OFF. Please note that the default install behaviour of proton has changed. Proton bindings by default will now be installed under ${BINDINGS_DIR} and will no longer be found by system interpreters. This means that every user will be required to manually configure their interpreters to locate the proton bindings. If you wish proton bindings to be installed into the interpreter specified locations as was the default in prior releases, please specify -DSYSINSTALL_BINDINGS=ON")
-  set (SYSINSTALL_BINDINGS OFF)
-endif ()
+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)
 
@@ -145,12 +140,14 @@ install (FILES examples/messenger/c/CMak
                examples/messenger/c/recv.c
          DESTINATION ${EXAMPLES_INSTALL_DIR}/messenger)
 
+install (FILES examples/include/pncompat/misc_defs.h
+               examples/include/pncompat/misc_funcs.inc
+         DESTINATION ${EXAMPLES_INSTALL_DIR}/messenger/pncompat)
+
 install (FILES examples/include/pncompat/internal/LICENSE
                examples/include/pncompat/internal/getopt.c
                examples/include/pncompat/internal/getopt.h
-               examples/include/pncompat/misc_defs.h
-               examples/include/pncompat/misc_funcs.inc
-         DESTINATION ${EXAMPLES_INSTALL_DIR}/messenger/pncompat)
+         DESTINATION ${EXAMPLES_INSTALL_DIR}/messenger/pncompat/internal)
 
 # add relevant CTest support
 find_program (MAVEN_EXE mvn DOC "Location of the maven program")

Modified: qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/AutoOutboundTransformer.java
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/AutoOutboundTransformer.java?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/AutoOutboundTransformer.java (original)
+++ qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/AutoOutboundTransformer.java Sat Sep 27 14:23:00 2014
@@ -24,8 +24,11 @@ import javax.jms.Message;
 */
 public class AutoOutboundTransformer extends JMSMappingOutboundTransformer {
 
+    private final JMSMappingOutboundTransformer transformer;
+
     public AutoOutboundTransformer(JMSVendor vendor) {
         super(vendor);
+        transformer = new JMSMappingOutboundTransformer(vendor);
     }
 
     @Override
@@ -39,7 +42,7 @@ public class AutoOutboundTransformer ext
                 return null;
             }
         } else {
-            return JMSMappingOutboundTransformer.transform(this, msg);
+            return transformer.transform(msg);
         }
     }
 

Modified: qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/JMSMappingOutboundTransformer.java
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/JMSMappingOutboundTransformer.java?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/JMSMappingOutboundTransformer.java (original)
+++ qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/JMSMappingOutboundTransformer.java Sat Sep 27 14:23:00 2014
@@ -36,14 +36,10 @@ import java.util.Enumeration;
 import java.util.HashMap;
 
 /**
-* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
-*/
+ * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
+ */
 public class JMSMappingOutboundTransformer extends OutboundTransformer {
 
-    String prefixDeliveryAnnotations = "DA_";
-    String prefixMessageAnnotations= "MA_";
-    String prefixFooter = "FT_";
-
     public JMSMappingOutboundTransformer(JMSVendor vendor) {
         super(vendor);
     }
@@ -59,30 +55,37 @@ public class JMSMappingOutboundTransform
         } catch (MessageFormatException e) {
             return null;
         }
-        return transform(this, msg);
-    }
-
-    static EncodedMessage transform(JMSMappingOutboundTransformer options, Message msg) throws JMSException, UnsupportedEncodingException {
-        final JMSVendor vendor = options.vendor;
-
-        final String messageFormatKey = options.prefixVendor + "MESSAGE_FORMAT";
-        final String nativeKey = options.prefixVendor + "NATIVE";
-        final String firstAcquirerKey = options.prefixVendor + "FirstAcquirer";
-        final String prefixDeliveryAnnotationsKey = options.prefixVendor + options.prefixDeliveryAnnotations;
-        final String prefixMessageAnnotationsKey = options.prefixVendor + options.prefixMessageAnnotations;
-        final String subjectKey =  options.prefixVendor +"Subject";
-        final String contentTypeKey = options.prefixVendor +"ContentType";
-        final String contentEncodingKey = options.prefixVendor +"ContentEncoding";
-        final String replyToGroupIDKey = options.prefixVendor +"ReplyToGroupID";
-        final String prefixFooterKey = options.prefixVendor + options.prefixFooter;
+        ProtonJMessage amqp = convert(msg);
 
         long messageFormat;
         try {
-            messageFormat = msg.getLongProperty(messageFormatKey);
+            messageFormat = msg.getLongProperty(this.messageFormatKey);
         } catch (MessageFormatException e) {
             return null;
         }
 
+        ByteBuffer buffer = ByteBuffer.wrap(new byte[1024 * 4]);
+        final DroppingWritableBuffer overflow = new DroppingWritableBuffer();
+        int c = amqp.encode(new CompositeWritableBuffer(
+                new WritableBuffer.ByteBufferWrapper(buffer), overflow));
+        if( overflow.position() > 0 ) {
+            buffer = ByteBuffer.wrap(new byte[1024 * 4 + overflow.position()]);
+            c = amqp.encode(new WritableBuffer.ByteBufferWrapper(buffer));
+        }
+
+        return new EncodedMessage(messageFormat, buffer.array(), 0, c);
+    }
+
+    /**
+     * Perform the conversion between JMS Message and Proton Message without re-encoding it to array.
+     * This is needed because some frameworks may elect to do this on their own way (Netty for instance using Nettybuffers)
+     *
+     * @param msg
+     * @return
+     * @throws Exception
+     */
+    public ProtonJMessage convert(Message msg)
+            throws JMSException, UnsupportedEncodingException {
         Header header = new Header();
         Properties props=new Properties();
         HashMap<Symbol, Object> daMap = null;
@@ -213,17 +216,7 @@ public class JMSMappingOutboundTransform
         Footer footer=null;
         if( footerMap!=null ) footer = new Footer(footerMap);
 
-        ProtonJMessage amqp = (ProtonJMessage) org.apache.qpid.proton.message.Message.Factory.create(header, da, ma, props, ap, body, footer);
-
-        ByteBuffer buffer = ByteBuffer.wrap(new byte[1024*4]);
-        final DroppingWritableBuffer overflow = new DroppingWritableBuffer();
-        int c = amqp.encode(new CompositeWritableBuffer(new WritableBuffer.ByteBufferWrapper(buffer), overflow));
-        if( overflow.position() > 0 ) {
-            buffer = ByteBuffer.wrap(new byte[1024*4+overflow.position()]);
-            c = amqp.encode(new WritableBuffer.ByteBufferWrapper(buffer));
-        }
-
-        return new EncodedMessage(messageFormat, buffer.array(), 0, c);
+        return (ProtonJMessage) org.apache.qpid.proton.message.Message.Factory.create(header, da, ma, props, ap, body, footer);
     }
 
     private static String destinationAttributes(Destination destination) {

Modified: qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/OutboundTransformer.java
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/OutboundTransformer.java?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/OutboundTransformer.java (original)
+++ qpid/proton/branches/fadams-javascript-binding/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/OutboundTransformer.java Sat Sep 27 14:23:00 2014
@@ -26,10 +26,28 @@ import javax.jms.Message;
 public abstract class OutboundTransformer {
 
     JMSVendor vendor;
-    String prefixVendor = "JMS_AMQP_";
+    String prefixVendor;
 
-    public OutboundTransformer(JMSVendor vendor) {
+    String prefixDeliveryAnnotations = "DA_";
+    String prefixMessageAnnotations= "MA_";
+    String prefixFooter = "FT_";
+
+    String messageFormatKey;
+    String nativeKey;
+    String firstAcquirerKey;
+    String prefixDeliveryAnnotationsKey;
+    String prefixMessageAnnotationsKey;
+    String subjectKey;
+    String contentTypeKey;
+    String contentEncodingKey;
+    String replyToGroupIDKey;
+    String prefixFooterKey;
+
+
+
+   public OutboundTransformer(JMSVendor vendor) {
         this.vendor = vendor;
+        this.setPrefixVendor("JMS_AMQP_");
     }
 
     public abstract EncodedMessage transform(Message jms) throws Exception;
@@ -40,6 +58,18 @@ public abstract class OutboundTransforme
 
     public void setPrefixVendor(String prefixVendor) {
         this.prefixVendor = prefixVendor;
+
+        messageFormatKey = prefixVendor + "MESSAGE_FORMAT";
+        nativeKey = prefixVendor + "NATIVE";
+        firstAcquirerKey = prefixVendor + "FirstAcquirer";
+        prefixDeliveryAnnotationsKey = prefixVendor + prefixDeliveryAnnotations;
+        prefixMessageAnnotationsKey = prefixVendor + prefixMessageAnnotations;
+        subjectKey =  prefixVendor +"Subject";
+        contentTypeKey = prefixVendor +"ContentType";
+        contentEncodingKey = prefixVendor +"ContentEncoding";
+        replyToGroupIDKey = prefixVendor +"ReplyToGroupID";
+        prefixFooterKey = prefixVendor + prefixFooter;
+
     }
 
     public JMSVendor getVendor() {

Modified: qpid/proton/branches/fadams-javascript-binding/examples/include/pncompat/misc_funcs.inc
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/examples/include/pncompat/misc_funcs.inc?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/examples/include/pncompat/misc_funcs.inc (original)
+++ qpid/proton/branches/fadams-javascript-binding/examples/include/pncompat/misc_funcs.inc Sat Sep 27 14:23:00 2014
@@ -55,13 +55,14 @@ pn_timestamp_t time_now(void)
   return t.QuadPart / 10000 - 11644473600000;
 }
 #else
-#include <proton/util.h>
 #include <sys/time.h>
 #include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
 pn_timestamp_t time_now(void)
 {
   struct timeval now;
-  if (gettimeofday(&now, NULL)) pn_fatal("gettimeofday failed\n");
+  if (gettimeofday(&now, NULL)) {fprintf(stderr, "gettimeofday failed\n"); abort();}
   return ((pn_timestamp_t)now.tv_sec) * 1000 + (now.tv_usec / 1000);
 }
 #endif

Modified: qpid/proton/branches/fadams-javascript-binding/pom.xml
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/pom.xml?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/pom.xml (original)
+++ qpid/proton/branches/fadams-javascript-binding/pom.xml Sat Sep 27 14:23:00 2014
@@ -78,29 +78,28 @@
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <id>proton-j</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <modules>
-        <module>proton-j</module>
-        <module>tests</module>
-        <module>examples/messenger/java</module>
-      </modules>
-    </profile>
-    <profile>
-      <id>proton-jni</id>
-      <modules>
-        <module>proton-j/proton-api</module>
-        <!--proton-j-impl is required so we can use its EncoderImpl and DecoderImpl to generate test data -->
-        <module>proton-j/proton</module>
-        <module>tests</module>
-        <module>examples/messenger/java</module>
-      </modules>
-    </profile>
-  </profiles>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <version>1.9.5</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <modules>
+    <module>proton-j</module>
+    <module>contrib/proton-jms</module>
+    <module>contrib/proton-hawtdispatch</module>
+    <module>tests</module>
+    <module>examples/messenger/java</module>
+  </modules>
 
   <url>http://qpid.apache.org/proton</url>
   <scm>
@@ -112,4 +111,27 @@
   <ciManagement>
     <url>https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-proton-j/</url>
   </ciManagement>
+
+  <profiles>
+    <profile>
+      <id>sources</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+            <version>2.2.1</version>
+            <executions>
+              <execution>
+                <id>attach-sources</id>
+                <goals>
+                  <goal>jar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/CMakeLists.txt?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/CMakeLists.txt (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/CMakeLists.txt Sat Sep 27 14:23:00 2014
@@ -46,11 +46,17 @@ find_package(OpenSSL)
 
 find_package (PythonInterp REQUIRED)
 
-set(ssl_impl, none)
+if(PN_WINAPI)
+  set(ssl_impl schannel)
+  set(ssl_providers "'none','schannel','openssl'")
+else(PN_WINAPI)
+  set(ssl_impl, none)
+  set(ssl_providers "'none','openssl'")
+endif(PN_WINAPI)
 if (OPENSSL_FOUND)
   set(ssl_impl openssl)
-endif(OPENSSL_FOUND)
-set(SSL_IMPL ${ssl_impl} CACHE STRING "Library to use for SSL/TLS support. Valid values: 'none','openssl'")
+endif (OPENSSL_FOUND)
+set(SSL_IMPL ${ssl_impl} CACHE STRING "Library to use for SSL/TLS support. Valid values: ${ssl_providers}")
 mark_as_advanced (SSL_IMPL)
 
 configure_file (
@@ -96,7 +102,12 @@ if (SSL_IMPL STREQUAL openssl)
   include_directories ("${OPENSSL_INCLUDE_DIR}")
   set (SSL_LIB ${OPENSSL_LIBRARIES})
 else (SSL_IMPL STREQUAL openssl)
-  set (pn_driver_ssl_impl src/ssl/ssl_stub.c)
+  if (SSL_IMPL STREQUAL schannel)
+    set (pn_driver_ssl_impl src/windows/schannel.c)
+    set (SSL_LIB Crypt32.lib Secur32.lib)
+  else (SSL_IMPL STREQUAL schannel)
+    set (pn_driver_ssl_impl src/ssl/ssl_stub.c)
+  endif (SSL_IMPL STREQUAL schannel)
 endif (SSL_IMPL STREQUAL openssl)
 
 # First check whether we get clock_gettime without any special library linked
@@ -277,8 +288,13 @@ set (qpid-proton-platform
 
 set (qpid-proton-core
   src/object/object.c
+  src/object/list.c
+  src/object/map.c
+  src/object/string.c
+  src/object/iterator.c
 
   src/util.c
+  src/url.c
   src/error.c
   src/buffer.c
   src/parser.c
@@ -293,7 +309,7 @@ set (qpid-proton-core
 
   src/dispatcher/dispatcher.c
   src/engine/engine.c
-  src/engine/event.c
+  src/events/event.c
   src/transport/transport.c
   src/message/message.c
   src/sasl/sasl.c

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/CMakeLists.txt?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/CMakeLists.txt (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/CMakeLists.txt Sat Sep 27 14:23:00 2014
@@ -117,8 +117,13 @@ set(qpid-proton-platform
 
 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/util.c
+  ${PN_PATH}/src/url.c
   ${PN_PATH}/src/error.c
   ${PN_PATH}/src/buffer.c
   ${PN_PATH}/src/parser.c
@@ -133,7 +138,7 @@ set(qpid-proton-core
 
   ${PN_PATH}/src/dispatcher/dispatcher.c
   ${PN_PATH}/src/engine/engine.c
-  ${PN_PATH}/src/engine/event.c
+  ${PN_PATH}/src/events/event.c
   ${PN_PATH}/src/transport/transport.c
   ${PN_PATH}/src/message/message.c
   ${PN_PATH}/src/sasl/sasl.c

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/messenger.js
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/messenger.js?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/messenger.js (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/javascript/messenger.js Sat Sep 27 14:23:00 2014
@@ -29,7 +29,69 @@
  * 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 This class is
+ * @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 conjuction 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.
  */
@@ -111,7 +173,7 @@ var _Messenger_ = Module['Messenger'].pr
  * 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 code the error code to check.
+ * @param {number} code the error code to check.
  */
 _Messenger_._check = function(code) {
     if (code < 0) {
@@ -155,7 +217,9 @@ _Messenger_._emit = function(event, para
  * 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?
+ * 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.
@@ -466,7 +530,7 @@ _Messenger_['subscribe'] = function(sour
  * @returns {proton.Data.Long} a tracker.
  */
 _Messenger_['put'] = function(message, flush) {
-    flush = flush === false ? false : true;
+    flush = flush === false ? false : true; // Defaults to true if not explicitly specified.
     message._preEncode();
     this._checkErrors = true; // TODO improve error handling mechanism.
     this._check(_pn_messenger_put(this._messenger, message._message));
@@ -493,7 +557,7 @@ _Messenger_['put'] = function(message, f
  * @returns {proton.Status} one of None, PENDING, REJECTED, or ACCEPTED.
  */
 _Messenger_['status'] = function(tracker) {
-    if (tracker == null) {
+    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);
@@ -510,7 +574,7 @@ _Messenger_['status'] = function(tracker
  * @returns {boolean} true if delivery is still buffered.
  */
 _Messenger_['isBuffered'] = function(tracker) {
-    if (tracker == null) {
+    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);
@@ -533,7 +597,7 @@ _Messenger_['settle'] = function(tracker
     // 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) {
+    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);
@@ -625,7 +689,6 @@ _Messenger_['get'] = function(message, d
     // 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);
 };
 
@@ -661,7 +724,7 @@ _Messenger_['accept'] = function(tracker
     // 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) {
+    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);
@@ -685,7 +748,7 @@ _Messenger_['reject'] = function(tracker
     // 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) {
+    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);

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/perl/perl.i
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/perl/perl.i?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/perl/perl.i (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/perl/perl.i Sat Sep 27 14:23:00 2014
@@ -8,6 +8,7 @@
 #include <proton/messenger.h>
 #include <proton/ssl.h>
 #include <proton/driver_extras.h>
+#include <proton/url.h>
 %}
 
 %include <cstring.i>

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/php/php.i
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/php/php.i?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/php/php.i (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/php/php.i Sat Sep 27 14:23:00 2014
@@ -29,11 +29,16 @@
 %header %{
 /* Include the headers needed by the code in this wrapper file */
 #include <proton/types.h>
-#include <proton/message.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/message.h>
 #include <proton/messenger.h>
-#include <proton/ssl.h>
+#include <proton/session.h>
+#include <proton/url.h>
 
 #define zend_error_noreturn zend_error
 %}

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/cproton.i
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/cproton.i?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/cproton.i (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/cproton.i Sat Sep 27 14:23:00 2014
@@ -23,6 +23,7 @@
 #include <winsock2.h>
 #endif
 #include <proton/engine.h>
+#include <proton/url.h>
 #include <proton/message.h>
 #include <proton/sasl.h>
 #include <proton/driver.h>
@@ -184,154 +185,6 @@ ssize_t pn_transport_push(pn_transport_t
 %}
 %ignore pn_message_data;
 
-%rename(pn_listener_set_context) wrap_pn_listener_set_context;
-%inline {
-  void wrap_pn_listener_set_context(pn_listener_t *l, PyObject *context) {
-    // don't incref context: we 'borrow' the reference - prevents
-    // reference loops.  Should be safe as the Python object must
-    // outlive the C object.
-    pn_listener_set_context(l, context);
-  }
-}
-%ignore pn_listener_set_context;
-
-%rename(pn_listener_context) wrap_pn_listener_context;
-%inline {
-  PyObject *wrap_pn_listener_context(pn_listener_t *l) {
-    PyObject *result = (PyObject *) pn_listener_context(l);
-    // incref the returned context, as the caller expects this
-    if (result) {
-      Py_INCREF(result);
-      return result;
-    } else {
-      Py_RETURN_NONE;
-    }
-  }
-}
-%ignore pn_listener_context;
-
-%rename(pn_connector_set_context) wrap_pn_connector_set_context;
-%inline {
-  void wrap_pn_connector_set_context(pn_connector_t *c, PyObject *context) {
-    // don't incref context: we 'borrow' the reference - prevents
-    // reference loops.  Should be safe as the Python object must
-    // outlive the C object.
-    pn_connector_set_context(c, context);
-  }
-}
-%ignore pn_connector_set_context;
-
-%rename(pn_connector_context) wrap_pn_connector_context;
-%inline {
-  PyObject *wrap_pn_connector_context(pn_connector_t *c) {
-    PyObject *result = (PyObject *) pn_connector_context(c);
-    // incref the returned context, as the caller expects this
-    if (result) {
-      Py_INCREF(result);
-      return result;
-    } else {
-      Py_RETURN_NONE;
-    }
-  }
-}
-%ignore pn_connector_context;
-
-%rename(pn_connection_get_context) wrap_pn_connection_get_context;
-%inline {
-  PyObject *wrap_pn_connection_get_context(pn_connection_t *c) {
-    PyObject *result = (PyObject *) pn_connection_get_context(c);
-    // incref the returned context, as the caller expects this
-    if (result) {
-      Py_INCREF(result);
-      return result;
-    } else {
-      Py_RETURN_NONE;
-    }
-  }
-}
-%ignore pn_connection_get_context;
-
-%rename(pn_connection_set_context) wrap_pn_connection_set_context;
-%inline {
-  void wrap_pn_connection_set_context(pn_connection_t *c, PyObject *context) {
-    // don't incref context: we 'borrow' the reference
-    pn_connection_set_context(c, context);
-  }
-}
-%ignore pn_connection_set_context;
-
-%rename(pn_session_get_context) wrap_pn_session_get_context;
-%inline {
-  PyObject *wrap_pn_session_get_context(pn_session_t *s) {
-    PyObject *result = (PyObject *) pn_session_get_context(s);
-    // incref the returned context, as the caller expects this
-    if (result) {
-      Py_INCREF(result);
-      return result;
-    } else {
-      Py_RETURN_NONE;
-    }
-  }
-}
-%ignore pn_session_get_context;
-
-%rename(pn_session_set_context) wrap_pn_session_set_context;
-%inline {
-  void wrap_pn_session_set_context(pn_session_t *s, PyObject *context) {
-    // don't incref context: we 'borrow' the reference
-    pn_session_set_context(s, context);
-  }
-}
-%ignore pn_session_set_context;
-
-%rename(pn_link_get_context) wrap_pn_link_get_context;
-%inline {
-  PyObject *wrap_pn_link_get_context(pn_link_t *l) {
-    PyObject *result = (PyObject *) pn_link_get_context(l);
-    // incref the returned context, as the caller expects this
-    if (result) {
-      Py_INCREF(result);
-      return result;
-    } else {
-      Py_RETURN_NONE;
-    }
-  }
-}
-%ignore pn_link_get_context;
-
-%rename(pn_link_set_context) wrap_pn_link_set_context;
-%inline {
-  void wrap_pn_link_set_context(pn_link_t *l, PyObject *context) {
-    // don't incref context: we 'borrow' the reference
-    pn_link_set_context(l, context);
-  }
-}
-%ignore pn_link_set_context;
-
-%rename(pn_delivery_get_context) wrap_pn_delivery_get_context;
-%inline {
-  PyObject *wrap_pn_delivery_get_context(pn_delivery_t *d) {
-    PyObject *result = (PyObject *) pn_delivery_get_context(d);
-    // incref the returned context, as the caller expects this
-    if (result) {
-      Py_INCREF(result);
-      return result;
-    } else {
-      Py_RETURN_NONE;
-    }
-  }
-}
-%ignore pn_delivery_get_context;
-
-%rename(pn_delivery_set_context) wrap_pn_delivery_set_context;
-%inline {
-  void wrap_pn_delivery_set_context(pn_delivery_t *d, PyObject *context) {
-    // don't incref context: we 'borrow' the reference
-    pn_delivery_set_context(d, context);
-  }
-}
-%ignore pn_delivery_set_context;
-
 ssize_t pn_data_decode(pn_data_t *data, char *STRING, size_t LENGTH);
 %ignore pn_data_decode;
 
@@ -375,5 +228,57 @@ bool pn_ssl_get_protocol_name(pn_ssl_t *
 int pn_ssl_get_peer_hostname(pn_ssl_t *ssl, char *OUTPUT, size_t *OUTPUT_SIZE);
 %ignore pn_ssl_get_peer_hostname;
 
+%immutable PN_PYREF;
+%inline %{
+  extern const pn_class_t *PN_PYREF;
+
+  #define CID_pn_pyref CID_pn_void
+  #define pn_pyref_new NULL
+  #define pn_pyref_initialize NULL
+  #define pn_pyref_finalize NULL
+  #define pn_pyref_free NULL
+  #define pn_pyref_hashcode pn_void_hashcode
+  #define pn_pyref_compare pn_void_compare
+  #define pn_pyref_inspect pn_void_inspect
+
+  static void pn_pyref_incref(void *object) {
+    PyObject* p = (PyObject*) object;
+    Py_XINCREF(p);
+  }
+
+  static void pn_pyref_decref(void *object) {
+    PyObject* p = (PyObject*) object;
+    Py_XDECREF(p);
+  }
+
+  static int pn_pyref_refcount(void *object) {
+    return 1;
+  }
+
+  static const pn_class_t *pn_pyref_reify(void *object) {
+    return PN_PYREF;
+  }
+
+  const pn_class_t PNI_PYREF = PN_METACLASS(pn_pyref);
+  const pn_class_t *PN_PYREF = &PNI_PYREF;
+
+  void *pn_py2void(PyObject *object) {
+    return object;
+  }
+
+  PyObject *pn_void2py(void *object) {
+    if (object) {
+      PyObject* p = (PyObject*) object;
+      Py_INCREF(p);
+      return p;
+    } else {
+      Py_RETURN_NONE;
+    }
+  }
+
+  PyObject *pn_cast_pn_void(void *object) {
+    return pn_void2py(object);
+  }
+%}
 
 %include "proton/cproton.i"

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/proton.py
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/proton.py?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/proton.py (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/python/proton.py Sat Sep 27 14:23:00 2014
@@ -31,7 +31,8 @@ The proton APIs consist of the following
 """
 
 from cproton import *
-import weakref
+
+import weakref, re, socket
 try:
   import uuid
 except ImportError:
@@ -89,6 +90,8 @@ try:
 except NameError:
   bytes = str
 
+VERSION_MAJOR = PN_VERSION_MAJOR
+VERSION_MINOR = PN_VERSION_MINOR
 API_LANGUAGE = "C"
 IMPLEMENTATION_LANGUAGE = "C"
 
@@ -866,7 +869,7 @@ class Message(object):
   def _set_inferred(self, value):
     self._check(pn_message_set_inferred(self._msg, bool(value)))
 
-  inferred = property(_is_inferred, _set_inferred,"""
+  inferred = property(_is_inferred, _set_inferred, doc="""
 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
@@ -2215,6 +2218,9 @@ class Condition:
                                         (self.name, self.description, self.info)
                                         if x])
 
+  def __str__(self):
+    return ": ".join(filter(None, [self.name, self.description, self.info]))
+
   def __eq__(self, o):
     if not isinstance(o, Condition): return False
     return self.name == o.name and \
@@ -2260,7 +2266,7 @@ class Connection(Endpoint):
     reference to the python instance in the context field of the C object.
     """
     if not c_conn: return None
-    py_conn = pn_connection_get_context(c_conn)
+    py_conn = pn_void2py(pn_connection_get_context(c_conn))
     if py_conn: return py_conn
     wrapper = Connection(_conn=c_conn)
     return wrapper
@@ -2271,7 +2277,7 @@ class Connection(Endpoint):
       self._conn = _conn
     else:
       self._conn = pn_connection()
-    pn_connection_set_context(self._conn, self)
+    pn_connection_set_context(self._conn, pn_py2void(self))
     self.offered_capabilities = None
     self.desired_capabilities = None
     self.properties = None
@@ -2404,7 +2410,7 @@ class Session(Endpoint):
     exists in the C Engine.
     """
     if c_ssn is None: return None
-    py_ssn = pn_session_get_context(c_ssn)
+    py_ssn = pn_void2py(pn_session_get_context(c_ssn))
     if py_ssn: return py_ssn
     wrapper = Session(c_ssn)
     return wrapper
@@ -2412,7 +2418,7 @@ class Session(Endpoint):
   def __init__(self, ssn):
     Endpoint.__init__(self)
     self._ssn = ssn
-    pn_session_set_context(self._ssn, self)
+    pn_session_set_context(self._ssn, pn_py2void(self))
     self._links = set()
     self.connection._sessions.add(self)
 
@@ -2501,7 +2507,7 @@ class Link(Endpoint):
     exists in the C Engine.
     """
     if c_link is None: return None
-    py_link = pn_link_get_context(c_link)
+    py_link = pn_void2py(pn_link_get_context(c_link))
     if py_link: return py_link
     if pn_link_is_sender(c_link):
       wrapper = Sender(c_link)
@@ -2512,7 +2518,7 @@ class Link(Endpoint):
   def __init__(self, c_link):
     Endpoint.__init__(self)
     self._link = c_link
-    pn_link_set_context(self._link, self)
+    pn_link_set_context(self._link, pn_py2void(self))
     self._deliveries = set()
     self.session._links.add(self)
 
@@ -2642,6 +2648,9 @@ class Link(Endpoint):
   def drained(self):
     return pn_link_drained(self._link)
 
+  def detach(self):
+    return pn_link_detach(self._link)
+
 class Terminus(object):
 
   UNSPECIFIED = PN_UNSPECIFIED
@@ -2879,25 +2888,27 @@ class Delivery(object):
     exists in the C Engine.
     """
     if not c_dlv: return None
-    py_dlv = pn_delivery_get_context(c_dlv)
+    py_dlv = pn_void2py(pn_delivery_get_context(c_dlv))
     if py_dlv: return py_dlv
     wrapper = Delivery(c_dlv)
     return wrapper
 
   def __init__(self, dlv):
     self._dlv = dlv
-    pn_delivery_set_context(self._dlv, self)
+    pn_delivery_set_context(self._dlv, pn_py2void(self))
     self.local = Disposition(pn_delivery_local(self._dlv), True)
     self.remote = Disposition(pn_delivery_remote(self._dlv), False)
     self.link._deliveries.add(self)
 
   def __del__(self):
-    pn_delivery_set_context(self._dlv, None)
+    self._release()
 
   def _release(self):
     """Release the underlying C Engine resource."""
     if self._dlv:
+      pn_delivery_set_context(self._dlv, pn_py2void(None))
       pn_delivery_settle(self._dlv)
+      self._dlv = None
 
   @property
   def tag(self):
@@ -3125,6 +3136,10 @@ The idle timeout of the connection (floa
       self._ssl = SSL(self, domain, session_details)
     return self._ssl
 
+  @property
+  def condition(self):
+    return cond2obj(pn_transport_condition(self._trans))
+
 class SASLException(TransportException):
   pass
 
@@ -3319,29 +3334,33 @@ class SSLSessionDetails(object):
     return self._session_id
 
 
+wrappers = {
+  "pn_void": lambda x: pn_void2py(x),
+  "pn_pyref": lambda x: pn_void2py(x),
+  "pn_connection": lambda x: Connection._wrap_connection(pn_cast_pn_connection(x)),
+  "pn_session": lambda x: Session._wrap_session(pn_cast_pn_session(x)),
+  "pn_link": lambda x: Link._wrap_link(pn_cast_pn_link(x)),
+  "pn_delivery": lambda x: Delivery._wrap_delivery(pn_cast_pn_delivery(x)),
+  "pn_transport": lambda x: Transport(pn_cast_pn_transport(x))
+}
+
 class Collector:
 
   def __init__(self):
     self._impl = pn_collector()
     self._contexts = set()
 
+  def put(self, obj, etype):
+    pn_collector_put(self._impl, PN_PYREF, pn_py2void(obj), etype)
+
   def peek(self):
     event = pn_collector_peek(self._impl)
     if event is None:
       return None
 
-    tpi = pn_event_transport(event)
-    if tpi:
-      tp = Transport(tpi)
-    else:
-      tp = None
-    return Event(type=pn_event_type(event),
-                 category=pn_event_category(event),
-                 connection=Connection._wrap_connection(pn_event_connection(event)),
-                 session=Session._wrap_session(pn_event_session(event)),
-                 link=Link._wrap_link(pn_event_link(event)),
-                 delivery=Delivery._wrap_delivery(pn_event_delivery(event)),
-                 transport=tp)
+    clazz = pn_class_name(pn_event_class(event))
+    context = wrappers[clazz](pn_event_context(event))
+    return Event(clazz, context, pn_event_type(event))
 
   def pop(self):
     ev = self.peek()
@@ -3354,13 +3373,9 @@ class Collector:
 
 class Event:
 
-  CATEGORY_CONNECTION = PN_EVENT_CATEGORY_CONNECTION
-  CATEGORY_SESSION = PN_EVENT_CATEGORY_SESSION
-  CATEGORY_LINK = PN_EVENT_CATEGORY_LINK
-  CATEGORY_DELIVERY = PN_EVENT_CATEGORY_DELIVERY
-  CATEGORY_TRANSPORT = PN_EVENT_CATEGORY_TRANSPORT
-
   CONNECTION_INIT = PN_CONNECTION_INIT
+  CONNECTION_BOUND = PN_CONNECTION_BOUND
+  CONNECTION_UNBOUND = PN_CONNECTION_UNBOUND
   CONNECTION_OPEN = PN_CONNECTION_OPEN
   CONNECTION_CLOSE = PN_CONNECTION_CLOSE
   CONNECTION_REMOTE_OPEN = PN_CONNECTION_REMOTE_OPEN
@@ -3377,42 +3392,34 @@ class Event:
   LINK_INIT = PN_LINK_INIT
   LINK_OPEN = PN_LINK_OPEN
   LINK_CLOSE = PN_LINK_CLOSE
+  LINK_DETACH = PN_LINK_DETACH
   LINK_REMOTE_OPEN = PN_LINK_REMOTE_OPEN
   LINK_REMOTE_CLOSE = PN_LINK_REMOTE_CLOSE
+  LINK_REMOTE_DETACH = PN_LINK_REMOTE_DETACH
   LINK_FLOW = PN_LINK_FLOW
   LINK_FINAL = PN_LINK_FINAL
 
   DELIVERY = PN_DELIVERY
-  TRANSPORT = PN_TRANSPORT
 
-  def __init__(self, type, category,
-               connection, session, link, delivery, transport):
+  TRANSPORT = PN_TRANSPORT
+  TRANSPORT_ERROR = PN_TRANSPORT_ERROR
+  TRANSPORT_HEAD_CLOSED = PN_TRANSPORT_HEAD_CLOSED
+  TRANSPORT_TAIL_CLOSED = PN_TRANSPORT_TAIL_CLOSED
+  TRANSPORT_CLOSED = PN_TRANSPORT_CLOSED
+
+  def __init__(self, clazz, context, type):
+    self.clazz = clazz
+    self.context = context
     self.type = type
-    self.category = category
-    self.connection = connection
-    self.session = session
-    self.link = link
-    self.delivery = delivery
-    self.transport = transport
 
   def _popped(self, collector):
-    if self.type == Event.LINK_FINAL:
-      ctx = self.link
-    elif self.type == Event.SESSION_FINAL:
-      ctx = self.session
-    elif self.type == Event.CONNECTION_FINAL:
-      ctx = self.connection
-    else:
-      return
-
-    collector._contexts.remove(ctx)
-    ctx._released()
+    if self.type in (Event.LINK_FINAL, Event.SESSION_FINAL,
+                     Event.CONNECTION_FINAL):
+      collector._contexts.remove(self.context)
+      self.context._released()
 
   def __repr__(self):
-    objects = [self.connection, self.session, self.link, self.delivery,
-               self.transport]
-    return "%s(%s)" % (pn_event_type_name(self.type),
-                       ", ".join([str(o) for o in objects if o is not None]))
+    return "%s(%s)" % (pn_event_type_name(self.type), self.context)
 
 ###
 # Driver
@@ -3432,7 +3439,7 @@ class Connector(object):
     exists in the C Driver.
     """
     if not c_cxtr: return None
-    py_cxtr = pn_connector_context(c_cxtr)
+    py_cxtr = pn_void2py(pn_connector_context(c_cxtr))
     if py_cxtr: return py_cxtr
     wrapper = Connector(_cxtr=c_cxtr, _py_driver=py_driver)
     return wrapper
@@ -3441,14 +3448,14 @@ class Connector(object):
     self._cxtr = _cxtr
     assert(_py_driver)
     self._driver = weakref.ref(_py_driver)
-    pn_connector_set_context(self._cxtr, self)
+    pn_connector_set_context(self._cxtr, pn_py2void(self))
     self._connection = None
     self._driver()._connectors.add(self)
 
   def _release(self):
     """Release the underlying C Engine resource."""
     if self._cxtr:
-      pn_connector_set_context(self._cxtr, None)
+      pn_connector_set_context(self._cxtr, pn_py2void(None))
       pn_connector_free(self._cxtr)
       self._cxtr = None
 
@@ -3519,7 +3526,7 @@ class Listener(object):
     exists in the C Driver.
     """
     if not c_lsnr: return None
-    py_lsnr = pn_listener_context(c_lsnr)
+    py_lsnr = pn_void2py(pn_listener_context(c_lsnr))
     if py_lsnr: return py_lsnr
     wrapper = Listener(_lsnr=c_lsnr, _py_driver=py_driver)
     return wrapper
@@ -3528,13 +3535,13 @@ class Listener(object):
     self._lsnr = _lsnr
     assert(_py_driver)
     self._driver = weakref.ref(_py_driver)
-    pn_listener_set_context(self._lsnr, self)
+    pn_listener_set_context(self._lsnr, pn_py2void(self))
     self._driver()._listeners.add(self)
 
   def _release(self):
     """Release the underlying C Engine resource."""
     if self._lsnr:
-      pn_listener_set_context(self._lsnr, None);
+      pn_listener_set_context(self._lsnr, pn_py2void(None));
       pn_listener_free(self._lsnr)
       self._lsnr = None
 
@@ -3638,8 +3645,8 @@ __all__ = [
            "Messenger",
            "MessengerException",
            "ProtonException",
-           "PN_VERSION_MAJOR",
-           "PN_VERSION_MINOR",
+           "VERSION_MAJOR",
+           "VERSION_MINOR",
            "Receiver",
            "SASL",
            "Sender",
@@ -3659,3 +3666,106 @@ __all__ = [
            "timestamp",
            "ulong"
            ]
+
+
+class Url(object):
+  """
+  Simple URL parser/constructor, handles URLs of the form:
+
+    <scheme>://<user>:<password>@<host>:<port>/<path>
+
+  All components can be None if not specifeid in the URL string.
+
+  The port can be specified as a service name, e.g. 'amqp' in the
+  URL string but Url.port always gives the integer value.
+
+  @ivar scheme: Url scheme e.g. 'amqp' or 'amqps'
+  @ivar user: Username
+  @ivar password: Password
+  @ivar host: Host name, ipv6 literal or ipv4 dotted quad.
+  @ivar port: Integer port.
+  @ivar host_port: Returns host:port
+  """
+
+  AMQPS = "amqps"
+  AMQP = "amqp"
+
+  class Port(int):
+    """An integer port number that can be constructed from a service name string"""
+
+    def __new__(cls, value):
+      """@param value: integer port number or string service name."""
+      port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
+      setattr(port, 'name', str(value))
+      return port
+
+    def __eq__(self, x): return str(self) == x or int(self) == x
+    def __ne__(self, x): return not self == x
+    def __str__(self): return str(self.name)
+
+    @staticmethod
+    def _port_int(value):
+      """Convert service, an integer or a service name, into an integer port number."""
+      try:
+        return int(value)
+      except ValueError:
+        try:
+          return socket.getservbyname(value)
+        except socket.error:
+          raise ValueError("Not a valid port number or service name: '%s'" % value)
+
+  def __init__(self, url=None, **kwargs):
+    """
+    @param url: URL string to parse.
+    @param kwargs: scheme, user, password, host, port, path.
+      If specified, replaces corresponding part in url string.
+    """
+    if url:
+      self._url = pn_url_parse(str(url))
+      if not self._url: raise ValueError("Invalid URL '%s'" % url)
+    else:
+      self._url = pn_url()
+    for k in kwargs:            # Let kwargs override values parsed from url
+      getattr(self, k)          # Check for invalid kwargs
+      setattr(self, k, kwargs[k])
+
+  class PartDescriptor(object):
+    def __init__(self, part):
+      self.getter = globals()["pn_url_get_%s" % part]
+      self.setter = globals()["pn_url_set_%s" % part]
+    def __get__(self, obj, type=None): return self.getter(obj._url)
+    def __set__(self, obj, value): return self.setter(obj._url, str(value))
+
+  scheme = PartDescriptor('scheme')
+  username = PartDescriptor('username')
+  password = PartDescriptor('password')
+  host = PartDescriptor('host')
+  path = PartDescriptor('path')
+
+  def _get_port(self):
+    portstr = pn_url_get_port(self._url)
+    return portstr and Url.Port(portstr)
+
+  def _set_port(self, value):
+    if value is None: pn_url_set_port(self._url, None)
+    else: pn_url_set_port(self._url, str(Url.Port(value)))
+
+  port = property(_get_port, _set_port)
+
+  def __str__(self): return pn_url_str(self._url)
+
+  def __repr__(self): return "Url(%r)" % str(self)
+
+  def __del__(self):
+    pn_url_free(self._url);
+    self._url = None
+
+  def defaults(self):
+    """
+    Fill in missing values (scheme, host or port) with defaults
+    @return: self
+    """
+    self.scheme = self.scheme or self.AMQP
+    self.host = self.host or '0.0.0.0'
+    self.port = self.port or self.Port(self.scheme)
+    return self

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/lib/qpid_proton/version.rb
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/lib/qpid_proton/version.rb?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/lib/qpid_proton/version.rb (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/lib/qpid_proton/version.rb Sat Sep 27 14:23:00 2014
@@ -21,8 +21,8 @@ module Qpid
 
   module Proton
 
-    PN_VERSION_MAJOR = Cproton::PN_VERSION_MAJOR
-    PN_VERSION_MINOR = Cproton::PN_VERSION_MINOR
+    VERSION_MAJOR = Cproton::PN_VERSION_MAJOR
+    VERSION_MINOR = Cproton::PN_VERSION_MINOR
 
   end
 

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/ruby.i
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/ruby.i?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/ruby.i (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/bindings/ruby/ruby.i Sat Sep 27 14:23:00 2014
@@ -26,8 +26,8 @@
 #include <proton/messenger.h>
 #include <proton/ssl.h>
 #include <proton/driver_extras.h>
-
 #include <proton/types.h>
+#include <proton/url.h>
 
 #include <uuid/uuid.h>
 %}

Added: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cid.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cid.h?rev=1627970&view=auto
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cid.h (added)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cid.h Sat Sep 27 14:23:00 2014
@@ -0,0 +1,56 @@
+#ifndef PROTON_CID_H
+#define PROTON_CID_H 1
+/*
+ *
+ * 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.
+ *
+ */
+
+typedef enum {
+  CID_pn_object = 1,
+  CID_pn_void,
+  CID_pn_weakref,
+
+  CID_pn_string,
+  CID_pn_list,
+  CID_pn_map,
+  CID_pn_hash,
+
+  CID_pn_collector,
+  CID_pn_event,
+
+  CID_pn_encoder,
+  CID_pn_decoder,
+  CID_pn_data,
+
+  CID_pn_connection,
+  CID_pn_session,
+  CID_pn_link,
+  CID_pn_delivery,
+  CID_pn_transport,
+
+  CID_pn_message,
+
+  CID_pn_io,
+  CID_pn_selector,
+  CID_pn_selectable,
+
+  CID_pn_url
+} pn_cid_t;
+
+#endif /* cid.h */

Propchange: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cid.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cid.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/connection.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/connection.h?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/connection.h (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/connection.h Sat Sep 27 14:23:00 2014
@@ -23,7 +23,12 @@
  */
 
 #include <proton/import_export.h>
+#include <proton/codec.h>
+#include <proton/condition.h>
+#include <proton/error.h>
 #include <proton/type_compat.h>
+#include <proton/types.h>
+
 #include <stddef.h>
 #include <sys/types.h>
 

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cproton.i
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cproton.i?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cproton.i (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/cproton.i Sat Sep 27 14:23:00 2014
@@ -26,6 +26,7 @@ typedef unsigned long int uint32_t;
 typedef long int int32_t;
 typedef unsigned long long int uint64_t;
 typedef long long int int64_t;
+typedef unsigned long int uintptr_t;
 
 /* Parse these interface header files to generate APIs for script languages */
 
@@ -53,6 +54,9 @@ typedef long long int int64_t;
 %include "proton/types.h"
 %ignore pn_string_vformat;
 %ignore pn_string_vaddf;
+%immutable PN_OBJECT;
+%immutable PN_VOID;
+%immutable PN_WEAKREF;
 %include "proton/object.h"
 
 %ignore pn_error_format;
@@ -1382,3 +1386,14 @@ typedef long long int int64_t;
 %ignore pn_data_vscan;
 
 %include "proton/codec.h"
+
+%inline %{
+  pn_connection_t *pn_cast_pn_connection(void *x) { return (pn_connection_t *) x; }
+  pn_session_t *pn_cast_pn_session(void *x) { return (pn_session_t *) x; }
+  pn_link_t *pn_cast_pn_link(void *x) { return (pn_link_t *) x; }
+  pn_delivery_t *pn_cast_pn_delivery(void *x) { return (pn_delivery_t *) x; }
+  pn_transport_t *pn_cast_pn_transport(void *x) { return (pn_transport_t *) x; }
+%}
+
+%include "proton/url.h"
+

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/driver.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/driver.h?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/driver.h (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/driver.h Sat Sep 27 14:23:00 2014
@@ -24,10 +24,11 @@
 
 #include <proton/import_export.h>
 #include <proton/error.h>
-#include <proton/engine.h>
 #include <proton/sasl.h>
 #include <proton/selectable.h>
 #include <proton/ssl.h>
+#include <proton/transport.h>
+#include <proton/types.h>
 
 #ifdef __cplusplus
 extern "C" {

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/event.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/event.h?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/event.h (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/event.h Sat Sep 27 14:23:00 2014
@@ -77,19 +77,6 @@ extern "C" {
 typedef struct pn_event_t pn_event_t;
 
 /**
- * Related events are grouped into categories
- */
-typedef enum {
-    PN_EVENT_CATEGORY_NONE   = 0,
-    PN_EVENT_CATEGORY_CONNECTION = 0x00010000,
-    PN_EVENT_CATEGORY_SESSION = 0x00020000,
-    PN_EVENT_CATEGORY_LINK = 0x00030000,
-    PN_EVENT_CATEGORY_DELIVERY = 0x00040000,
-    PN_EVENT_CATEGORY_TRANSPORT = 0x00050000,
-    PN_EVENT_CATEGORY_COUNT = 6
-} pn_event_category_t;
-
-/**
  * An event type.
  */
 typedef enum {
@@ -104,130 +91,160 @@ typedef enum {
    * will ever be issued for a connection. Events of this type point
    * to the relevant connection.
    */
-  PN_CONNECTION_INIT = PN_EVENT_CATEGORY_CONNECTION + 1,
+  PN_CONNECTION_INIT,
+
+  /**
+   * The connection has been bound to a transport.
+   */
+  PN_CONNECTION_BOUND,
+
+  /**
+   * The connection has been unbound from its transport.
+   */
+  PN_CONNECTION_UNBOUND,
 
   /**
    * The local connection endpoint has been closed. Events of this
    * type point to the relevant connection.
    */
-  PN_CONNECTION_OPEN = PN_EVENT_CATEGORY_CONNECTION + 2,
+  PN_CONNECTION_OPEN,
 
   /**
    * The remote endpoint has opened the connection. Events of this
    * type point to the relevant connection.
    */
-  PN_CONNECTION_REMOTE_OPEN = PN_EVENT_CATEGORY_CONNECTION + 3,
+  PN_CONNECTION_REMOTE_OPEN,
 
   /**
    * The local connection endpoint has been closed. Events of this
    * type point to the relevant connection.
    */
-  PN_CONNECTION_CLOSE = PN_EVENT_CATEGORY_CONNECTION + 4,
+  PN_CONNECTION_CLOSE,
 
   /**
    *  The remote endpoint has closed the connection. Events of this
    *  type point to the relevant connection.
    */
-  PN_CONNECTION_REMOTE_CLOSE = PN_EVENT_CATEGORY_CONNECTION + 5,
+  PN_CONNECTION_REMOTE_CLOSE,
 
   /**
    * The connection has been freed and any outstanding processing has
    * been completed. This is the final event that will ever be issued
    * for a connection.
    */
-  PN_CONNECTION_FINAL = PN_EVENT_CATEGORY_CONNECTION + 6,
+  PN_CONNECTION_FINAL,
 
   /**
    * The session has been created. This is the first event that will
    * ever be issued for a session.
    */
-  PN_SESSION_INIT = PN_EVENT_CATEGORY_SESSION + 1,
+  PN_SESSION_INIT,
 
   /**
    * The local session endpoint has been opened. Events of this type
    * point ot the relevant session.
    */
-  PN_SESSION_OPEN = PN_EVENT_CATEGORY_SESSION + 2,
+  PN_SESSION_OPEN,
 
   /**
    * The remote endpoint has opened the session. Events of this type
    * point to the relevant session.
    */
-  PN_SESSION_REMOTE_OPEN = PN_EVENT_CATEGORY_SESSION + 3,
+  PN_SESSION_REMOTE_OPEN,
 
   /**
    * The local session endpoint has been closed. Events of this type
    * point ot the relevant session.
    */
-  PN_SESSION_CLOSE = PN_EVENT_CATEGORY_SESSION + 4,
+  PN_SESSION_CLOSE,
 
   /**
    * The remote endpoint has closed the session. Events of this type
    * point to the relevant session.
    */
-  PN_SESSION_REMOTE_CLOSE = PN_EVENT_CATEGORY_SESSION + 5,
+  PN_SESSION_REMOTE_CLOSE,
 
   /**
    * The session has been freed and any outstanding processing has
    * been completed. This is the final event that will ever be issued
    * for a session.
    */
-  PN_SESSION_FINAL = PN_EVENT_CATEGORY_SESSION + 6,
+  PN_SESSION_FINAL,
 
   /**
    * The link has been created. This is the first event that will ever
    * be issued for a link.
    */
-  PN_LINK_INIT = PN_EVENT_CATEGORY_LINK + 1,
+  PN_LINK_INIT,
 
   /**
    * The local link endpoint has been opened. Events of this type
    * point ot the relevant link.
    */
-  PN_LINK_OPEN = PN_EVENT_CATEGORY_LINK + 2,
+  PN_LINK_OPEN,
 
   /**
    * The remote endpoint has opened the link. Events of this type
    * point to the relevant link.
    */
-  PN_LINK_REMOTE_OPEN = PN_EVENT_CATEGORY_LINK + 3,
+  PN_LINK_REMOTE_OPEN,
 
   /**
    * The local link endpoint has been closed. Events of this type
    * point ot the relevant link.
    */
-  PN_LINK_CLOSE = PN_EVENT_CATEGORY_LINK + 4,
+  PN_LINK_CLOSE,
 
   /**
    * The remote endpoint has closed the link. Events of this type
    * point to the relevant link.
    */
-  PN_LINK_REMOTE_CLOSE = PN_EVENT_CATEGORY_LINK + 5,
+  PN_LINK_REMOTE_CLOSE,
+
+  /**
+   * The local link endpoint has been detached. Events of this type
+   * point to the relevant link.
+   */
+  PN_LINK_DETACH,
+
+  /**
+   * The remote endpoint has detached the link. Events of this type
+   * point to the relevant link.
+   */
+  PN_LINK_REMOTE_DETACH,
 
   /**
    * The flow control state for a link has changed. Events of this
    * type point to the relevant link.
    */
-  PN_LINK_FLOW = PN_EVENT_CATEGORY_LINK + 6,
+  PN_LINK_FLOW,
 
   /**
    * The link has been freed and any outstanding processing has been
    * completed. This is the final event that will ever be issued for a
    * link. Events of this type point to the relevant link.
    */
-  PN_LINK_FINAL = PN_EVENT_CATEGORY_LINK + 7,
+  PN_LINK_FINAL,
 
   /**
    * A delivery has been created or updated. Events of this type point
    * to the relevant delivery.
    */
-  PN_DELIVERY = PN_EVENT_CATEGORY_DELIVERY + 1,
+  PN_DELIVERY,
 
   /**
    * The transport has new data to read and/or write. Events of this
    * type point to the relevant transport.
    */
-  PN_TRANSPORT = PN_EVENT_CATEGORY_TRANSPORT + 1
+  PN_TRANSPORT,
+
+  PN_TRANSPORT_ERROR,
+
+  PN_TRANSPORT_HEAD_CLOSED,
+
+  PN_TRANSPORT_TAIL_CLOSED,
+
+  PN_TRANSPORT_CLOSED
 
 } pn_event_type_t;
 
@@ -257,6 +274,26 @@ PN_EXTERN pn_collector_t *pn_collector(v
 PN_EXTERN void pn_collector_free(pn_collector_t *collector);
 
 /**
+ * Place a new event on a collector.
+ *
+ * This operation will create a new event of the given type and
+ * context and return a pointer to the newly created event. In some
+ * cases an event of the given type and context can be elided. When
+ * this happens, this operation will return a NULL pointer.
+ *
+ * @param[in] collector a collector object
+ * @param[in] type the event type
+ * @param[in] context the event context
+ *
+ * @return a pointer to the newly created event or NULL if the event
+ *         was elided
+ */
+
+PN_EXTERN pn_event_t *pn_collector_put(pn_collector_t *collector,
+                                       const pn_class_t *clazz, void *context,
+                                       pn_event_type_t type);
+
+/**
  * Access the head event contained by a collector.
  *
  * This operation will continue to return the same event until it is
@@ -286,12 +323,12 @@ PN_EXTERN bool pn_collector_pop(pn_colle
 PN_EXTERN pn_event_type_t pn_event_type(pn_event_t *event);
 
 /**
- * Get the category an event belongs to.
+ * Get the class associated with the event context.
  *
  * @param[in] event an event object
- * @return the category the event belongs to
+ * @return the class associated with the event context
  */
-PN_EXTERN pn_event_category_t pn_event_category(pn_event_t *event);
+PN_EXTERN const pn_class_t *pn_event_class(pn_event_t *event);
 
 /**
  * Get the context associated with an event.

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/link.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/link.h?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/link.h (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/link.h Sat Sep 27 14:23:00 2014
@@ -249,6 +249,13 @@ PN_EXTERN void pn_link_open(pn_link_t *l
 PN_EXTERN void pn_link_close(pn_link_t *link);
 
 /**
+ * Detach a link.
+ *
+ * @param[in] link a link object
+ */
+PN_EXTERN void pn_link_detach(pn_link_t *link);
+
+/**
  * Access the locally defined source definition for a link.
  *
  * The pointer returned by this operation is valid until the link

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/messenger.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/messenger.h?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/messenger.h (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/messenger.h Sat Sep 27 14:23:00 2014
@@ -25,6 +25,11 @@
 #include <proton/import_export.h>
 #include <proton/message.h>
 #include <proton/selectable.h>
+#include <proton/condition.h>
+#include <proton/terminus.h>
+#include <proton/link.h>
+#include <proton/transport.h>
+#include <proton/ssl.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -468,6 +473,32 @@ PN_EXTERN bool pn_messenger_stopped(pn_m
 PN_EXTERN pn_subscription_t *pn_messenger_subscribe(pn_messenger_t *messenger, const char *source);
 
 /**
+ * Subscribes a messenger to messages from the specified source with the given
+ * timeout for the subscription's lifetime.
+ *
+ * @param[in] messenger the messenger to subscribe
+ * @param[in] source
+ * @param[in] timeout the maximum time to keep the subscription alive once the
+ *            link is closed.
+ * @return a subscription
+ */
+PN_EXTERN pn_subscription_t *
+pn_messenger_subscribe_ttl(pn_messenger_t *messenger, const char *source,
+                           pn_seconds_t timeout);
+
+/**
+ * Get a link based on link name and whether the link is a sender or receiver
+ *
+ * @param[in] messenger the messenger to get the link from
+ * @param[in] address the link address that identifies the link to receive
+ * @param[in] sender true if the link is a sender, false if the link is a
+ *            receiver
+ * @return a link, or NULL if no link matches the address / sender parameters
+ */
+PN_EXTERN pn_link_t *pn_messenger_get_link(pn_messenger_t *messenger,
+                                           const char *address, bool sender);
+
+/**
  * Get a subscription's application context.
  *
  * See ::pn_subscription_set_context().
@@ -519,6 +550,20 @@ PN_EXTERN int pn_messenger_put(pn_messen
 PN_EXTERN pn_status_t pn_messenger_status(pn_messenger_t *messenger, pn_tracker_t tracker);
 
 /**
+ * Get delivery information about a delivery.
+ *
+ * Returns the delivery information associated with the supplied tracker.
+ * This may return NULL if the tracker has fallen outside the
+ * incoming/outgoing tracking windows of the messenger.
+ *
+ * @param[in] messenger the messenger
+ * @param[in] tracker the tracker identifying the delivery
+ * @return a pn_delivery_t representing the delivery.
+ */
+PN_EXTERN pn_delivery_t *pn_messenger_delivery(pn_messenger_t *messenger,
+                                               pn_tracker_t tracker);
+
+/**
  * Check if the delivery associated with a given tracker is still
  * waiting to be sent.
  *
@@ -752,6 +797,16 @@ PN_EXTERN int pn_messenger_accept(pn_mes
 PN_EXTERN int pn_messenger_reject(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
 
 /**
+ * Get  link for the message referenced by the given tracker.
+ *
+ * @param[in] messenger a messenger object
+ * @param[in] tracker a tracker object
+ * @return a pn_link_t or NULL if the link could not be determined.
+ */
+PN_EXTERN pn_link_t *pn_messenger_tracker_link(pn_messenger_t *messenger,
+                                               pn_tracker_t tracker);
+
+/**
  * Get the number of messages in the outgoing message queue of a
  * messenger.
  *
@@ -900,6 +955,79 @@ PN_EXTERN pn_timestamp_t pn_messenger_de
  * @}
  */
 
+#define PN_FLAGS_CHECK_ROUTES                                                  \
+  (0x1) /** Messenger flag to indicate that a call                             \
+            to pn_messenger_start should check that                            \
+            any defined routes are valid */
+
+/** Sets control flags to enable additional function for the Messenger.
+ *
+ * @param[in] messenger the messenger
+ * @param[in] flags 0 or PN_FLAGS_CHECK_ROUTES
+ *
+ * @return an error code of zero if there is no error
+ */
+PN_EXTERN int pn_messenger_set_flags(pn_messenger_t *messenger,
+                                     const int flags);
+
+/** Gets the flags for a Messenger.
+ *
+ * @param[in] messenger the messenger
+ * @return The flags set for the messenger
+ */
+PN_EXTERN int pn_messenger_get_flags(pn_messenger_t *messenger);
+
+/**
+ * Set the local sender settle mode for the underlying link.
+ *
+ * @param[in] messenger the messenger
+ * @param[in] mode the sender settle mode
+ */
+PN_EXTERN int pn_messenger_set_snd_settle_mode(pn_messenger_t *messenger,
+                                               const pn_snd_settle_mode_t mode);
+
+/**
+ * Set the local receiver settle mode for the underlying link.
+ *
+ * @param[in] messenger the messenger
+ * @param[in] mode the receiver settle mode
+ */
+PN_EXTERN int pn_messenger_set_rcv_settle_mode(pn_messenger_t *messenger,
+                                               const pn_rcv_settle_mode_t mode);
+
+/**
+ * Set the tracer associated with a messenger.
+ *
+ * @param[in] messenger a messenger object
+ * @param[in] tracer the tracer callback
+ */
+PN_EXTERN void pn_messenger_set_tracer(pn_messenger_t *messenger,
+                                       pn_tracer_t tracer);
+
+/**
+ * Gets the remote idle timeout for the specified remote service address
+ *
+ * @param[in] messenger a messenger object
+ * @param[in] address of remote service whose idle timeout is required
+ * @return the timeout in milliseconds or -1 if an error occurs
+ */
+PN_EXTERN pn_millis_t
+    pn_messenger_get_remote_idle_timeout(pn_messenger_t *messenger,
+                                         const char *address);
+
+/**
+ * Sets the SSL peer authentiacation mode required when a trust
+ * certificate is used.
+ *
+ * @param[in] messenger a messenger object
+ * @param[in] mode the mode required (see pn_ssl_verify_mode_t
+ *             enum for valid values)
+ * @return 0 if successful or -1 if an error occurs
+ */
+PN_EXTERN int
+pn_messenger_set_ssl_peer_authentication_mode(pn_messenger_t *messenger,
+                                              const pn_ssl_verify_mode_t mode);
+
 #ifdef __cplusplus
 }
 #endif

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/object.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/object.h?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/object.h (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/object.h Sat Sep 27 14:23:00 2014
@@ -22,6 +22,7 @@
  *
  */
 
+#include <proton/cid.h>
 #include <proton/types.h>
 #include <stdarg.h>
 #include <proton/type_compat.h>
@@ -35,40 +36,93 @@ extern "C" {
 typedef uintptr_t pn_handle_t;
 typedef intptr_t pn_shandle_t;
 
+typedef struct pn_class_t pn_class_t;
+typedef struct pn_string_t pn_string_t;
 typedef struct pn_list_t pn_list_t;
 typedef struct pn_map_t pn_map_t;
 typedef struct pn_hash_t pn_hash_t;
-typedef struct pn_string_t pn_string_t;
 typedef void *(*pn_iterator_next_t)(void *state);
 typedef struct pn_iterator_t pn_iterator_t;
 
-typedef struct {
+struct pn_class_t {
   const char *name;
+  const pn_cid_t cid;
+  void *(*newinst)(const pn_class_t *, size_t);
   void (*initialize)(void *);
+  void (*incref)(void *);
+  void (*decref)(void *);
+  int (*refcount)(void *);
   void (*finalize)(void *);
+  void (*free)(void *);
+  const pn_class_t *(*reify)(void *);
   uintptr_t (*hashcode)(void *);
   intptr_t (*compare)(void *, void *);
   int (*inspect)(void *, pn_string_t *);
-} pn_class_t;
+};
+
+PN_EXTERN extern const pn_class_t *PN_OBJECT;
+PN_EXTERN extern const pn_class_t *PN_VOID;
+PN_EXTERN extern const pn_class_t *PN_WEAKREF;
 
 #define PN_CLASS(PREFIX) {                      \
     #PREFIX,                                    \
+    CID_ ## PREFIX,                             \
+    pn_object_new,                              \
+    PREFIX ## _initialize,                      \
+    pn_object_incref,                           \
+    pn_object_decref,                           \
+    pn_object_refcount,                         \
+    PREFIX ## _finalize,                        \
+    pn_object_free,                             \
+    pn_object_reify,                            \
+    PREFIX ## _hashcode,                        \
+    PREFIX ## _compare,                         \
+    PREFIX ## _inspect                          \
+}
+
+#define PN_METACLASS(PREFIX) {                  \
+    #PREFIX,                                    \
+    CID_ ## PREFIX,                             \
+    PREFIX ## _new,                             \
     PREFIX ## _initialize,                      \
+    PREFIX ## _incref,                          \
+    PREFIX ## _decref,                          \
+    PREFIX ## _refcount,                        \
     PREFIX ## _finalize,                        \
+    PREFIX ## _free,                            \
+    PREFIX ## _reify,                           \
     PREFIX ## _hashcode,                        \
     PREFIX ## _compare,                         \
     PREFIX ## _inspect                          \
 }
 
-PN_EXTERN void *pn_new(size_t size, const pn_class_t* clazz);
-PN_EXTERN void *pn_new2(size_t size, const pn_class_t* clazz, void *from);
-PN_EXTERN void pn_initialize(void *object, const pn_class_t *clazz);
+PN_EXTERN pn_cid_t pn_class_id(const pn_class_t *clazz);
+PN_EXTERN const char *pn_class_name(const pn_class_t *clazz);
+PN_EXTERN void *pn_class_new(const pn_class_t *clazz, size_t size);
+PN_EXTERN void *pn_class_incref(const pn_class_t *clazz, void *object);
+PN_EXTERN int pn_class_refcount(const pn_class_t *clazz, void *object);
+PN_EXTERN int pn_class_decref(const pn_class_t *clazz, void *object);
+PN_EXTERN void pn_class_free(const pn_class_t *clazz, void *object);
+PN_EXTERN const pn_class_t *pn_class_reify(const pn_class_t *clazz, void *object);
+PN_EXTERN uintptr_t pn_class_hashcode(const pn_class_t *clazz, void *object);
+PN_EXTERN intptr_t pn_class_compare(const pn_class_t *clazz, void *a, void *b);
+PN_EXTERN bool pn_class_equals(const pn_class_t *clazz, void *a, void *b);
+PN_EXTERN int pn_class_inspect(const pn_class_t *clazz, void *object, pn_string_t *dst);
+
+PN_EXTERN uintptr_t pn_void_hashcode(void *object);
+PN_EXTERN intptr_t pn_void_compare(void *a, void *b);
+PN_EXTERN int pn_void_inspect(void *object, pn_string_t *dst);
+
+PN_EXTERN void *pn_object_new(const pn_class_t *clazz, size_t size);
+PN_EXTERN const pn_class_t *pn_object_reify(void *object);
+PN_EXTERN void pn_object_incref(void *object);
+PN_EXTERN int pn_object_refcount(void *object);
+PN_EXTERN void pn_object_decref(void *object);
+PN_EXTERN void pn_object_free(void *object);
+
 PN_EXTERN void *pn_incref(void *object);
-PN_EXTERN void *pn_incref2(void *object, void *from);
-PN_EXTERN void pn_decref(void *object);
-PN_EXTERN void pn_decref2(void *object, void *from);
+PN_EXTERN int pn_decref(void *object);
 PN_EXTERN int pn_refcount(void *object);
-PN_EXTERN void pn_finalize(void *object);
 PN_EXTERN void pn_free(void *object);
 PN_EXTERN const pn_class_t *pn_class(void* object);
 PN_EXTERN uintptr_t pn_hashcode(void *object);
@@ -78,7 +132,7 @@ PN_EXTERN int pn_inspect(void *object, p
 
 #define PN_REFCOUNT (0x1)
 
-PN_EXTERN pn_list_t *pn_list(size_t capacity, int options);
+PN_EXTERN pn_list_t *pn_list(const pn_class_t *clazz, size_t capacity);
 PN_EXTERN size_t pn_list_size(pn_list_t *list);
 PN_EXTERN void *pn_list_get(pn_list_t *list, int index);
 PN_EXTERN void pn_list_set(pn_list_t *list, int index, void *value);
@@ -92,7 +146,8 @@ PN_EXTERN void pn_list_iterator(pn_list_
 #define PN_REFCOUNT_KEY (0x2)
 #define PN_REFCOUNT_VALUE (0x4)
 
-PN_EXTERN pn_map_t *pn_map(size_t capacity, float load_factor, int options);
+PN_EXTERN pn_map_t *pn_map(const pn_class_t *key, const pn_class_t *value,
+                           size_t capacity, float load_factor);
 PN_EXTERN size_t pn_map_size(pn_map_t *map);
 PN_EXTERN int pn_map_put(pn_map_t *map, void *key, void *value);
 PN_EXTERN void *pn_map_get(pn_map_t *map, void *key);
@@ -102,7 +157,7 @@ PN_EXTERN pn_handle_t pn_map_next(pn_map
 PN_EXTERN void *pn_map_key(pn_map_t *map, pn_handle_t entry);
 PN_EXTERN void *pn_map_value(pn_map_t *map, pn_handle_t entry);
 
-PN_EXTERN pn_hash_t *pn_hash(size_t capacity, float load_factor, int options);
+PN_EXTERN pn_hash_t *pn_hash(const pn_class_t *clazz, size_t capacity, float load_factor);
 PN_EXTERN size_t pn_hash_size(pn_hash_t *hash);
 PN_EXTERN int pn_hash_put(pn_hash_t *hash, uintptr_t key, void *value);
 PN_EXTERN void *pn_hash_get(pn_hash_t *hash, uintptr_t key);

Modified: qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/sasl.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/sasl.h?rev=1627970&r1=1627969&r2=1627970&view=diff
==============================================================================
--- qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/sasl.h (original)
+++ qpid/proton/branches/fadams-javascript-binding/proton-c/include/proton/sasl.h Sat Sep 27 14:23:00 2014
@@ -25,7 +25,7 @@
 #include <proton/import_export.h>
 #include <sys/types.h>
 #include <proton/type_compat.h>
-#include <proton/engine.h>
+#include <proton/types.h>
 
 #ifdef __cplusplus
 extern "C" {



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