You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2014/05/06 19:15:05 UTC

svn commit: r1592808 - in /qpid/dispatch/trunk: doc/ doc/api/ include/qpid/dispatch/ src/ tests/

Author: aconway
Date: Tue May  6 17:15:04 2014
New Revision: 1592808

URL: http://svn.apache.org/r1592808
Log:
NO-JIRA: Doxygen documentation improvements

- Added lots of doxygen comments.
- Replace doxygen-wrapper.sh with portable python script.
- Common configuration file for generating user and dev doxygen.
- Enable JAVADOC_AUTOBRIEF: no need for @brief.
- Use @ consistently for doc tags instead of mixing @ and \
- added tests/config_build.sh.in: make it easy to run tests against the build
- minor updates to system_tests_broker.py

Added:
    qpid/dispatch/trunk/doc/api/doxygen-wrapper.py   (contents, props changed)
      - copied, changed from r1591389, qpid/dispatch/trunk/doc/api/doxygen-wrapper.sh
    qpid/dispatch/trunk/doc/api/doxygen.in
      - copied, changed from r1591389, qpid/dispatch/trunk/doc/api/user.doxygen.in
    qpid/dispatch/trunk/tests/config_build.sh.in
      - copied, changed from r1591389, qpid/dispatch/trunk/doc/api/dev.doxygen.in
Removed:
    qpid/dispatch/trunk/doc/api/dev.doxygen.in
    qpid/dispatch/trunk/doc/api/doxygen-wrapper.sh
    qpid/dispatch/trunk/doc/api/user.doxygen.in
Modified:
    qpid/dispatch/trunk/doc/README
    qpid/dispatch/trunk/doc/api/CMakeLists.txt
    qpid/dispatch/trunk/include/qpid/dispatch/agent.h
    qpid/dispatch/trunk/include/qpid/dispatch/alloc.h
    qpid/dispatch/trunk/include/qpid/dispatch/amqp.h
    qpid/dispatch/trunk/include/qpid/dispatch/buffer.h
    qpid/dispatch/trunk/include/qpid/dispatch/compose.h
    qpid/dispatch/trunk/include/qpid/dispatch/config.h
    qpid/dispatch/trunk/include/qpid/dispatch/connection_manager.h
    qpid/dispatch/trunk/include/qpid/dispatch/container.h
    qpid/dispatch/trunk/include/qpid/dispatch/dispatch.h
    qpid/dispatch/trunk/include/qpid/dispatch/iterator.h
    qpid/dispatch/trunk/include/qpid/dispatch/message.h
    qpid/dispatch/trunk/include/qpid/dispatch/parse.h
    qpid/dispatch/trunk/include/qpid/dispatch/router.h
    qpid/dispatch/trunk/include/qpid/dispatch/server.h
    qpid/dispatch/trunk/include/qpid/dispatch/timer.h
    qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h
    qpid/dispatch/trunk/src/container.c
    qpid/dispatch/trunk/src/message_private.h
    qpid/dispatch/trunk/src/router_private.h
    qpid/dispatch/trunk/src/server_private.h
    qpid/dispatch/trunk/src/waypoint_private.h
    qpid/dispatch/trunk/tests/CMakeLists.txt
    qpid/dispatch/trunk/tests/system_test.py
    qpid/dispatch/trunk/tests/system_tests_broker.py

Modified: qpid/dispatch/trunk/doc/README
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/README?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/README (original)
+++ qpid/dispatch/trunk/doc/README Tue May  6 17:15:04 2014
@@ -7,3 +7,5 @@ This directory contains different kinds 
 
   notes/  - Developer notes: project information, design notes, or
             anything else that's primarily of developer interest.
+
+  api/    - Generated API documentation.

Modified: qpid/dispatch/trunk/doc/api/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/api/CMakeLists.txt?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/api/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/doc/api/CMakeLists.txt Tue May  6 17:15:04 2014
@@ -23,21 +23,28 @@ if (DOXYGEN_FOUND)
 endif (DOXYGEN_FOUND)
 
 if (BUILD_DOCS)
-  configure_file(user.doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/user.doxygen)
-  configure_file(dev.doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/dev.doxygen)
-  # This is not ideal: if files are added/removed it won't be detected
-  # until we re-run cmake.
+  # Create doxygen configuration files.
+  function(configure_doxygen DOXYGEN_OUTPUT_DIRECTORY DOXYGEN_INPUT DOXYGEN_MORE)
+    configure_file(
+      ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in
+      ${CMAKE_CURRENT_BINARY_DIR}/${DOXYGEN_OUTPUT_DIRECTORY}.doxygen)
+  endfunction(configure_doxygen)
+  configure_doxygen(user "${CMAKE_SOURCE_DIR}/include" "")
+  configure_doxygen(dev "${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src"
+    "ENABLED_SECTIONS=INTERNAL\nINTERNAL_DOCS=yes")
+
+  # This is not ideal: if files are added/removed it won't be detected til we re-run cmake.
   file(GLOB_RECURSE API_SOURCES
     ${CMAKE_SOURCE_DIR}/include/*.h
     ${CMAKE_SOURCE_DIR}/src/*.h
     ${CMAKE_SOURCE_DIR}/src/*.c)
 
   add_custom_command (OUTPUT user
-    COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-wrapper.sh user.doxygen
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/user.doxygen.in ${API_SOURCES})
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-wrapper.py ${DOXYGEN_EXECUTABLE} user.doxygen
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in ${API_SOURCES})
   add_custom_command (OUTPUT dev
-    COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-wrapper.sh dev.doxygen
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dev.doxygen.in ${API_SOURCES})
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-wrapper.py ${DOXYGEN_EXECUTABLE} dev.doxygen
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in ${API_SOURCES})
 
   add_custom_target(apidocs ALL DEPENDS user dev)
 

Copied: qpid/dispatch/trunk/doc/api/doxygen-wrapper.py (from r1591389, qpid/dispatch/trunk/doc/api/doxygen-wrapper.sh)
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/api/doxygen-wrapper.py?p2=qpid/dispatch/trunk/doc/api/doxygen-wrapper.py&p1=qpid/dispatch/trunk/doc/api/doxygen-wrapper.sh&r1=1591389&r2=1592808&rev=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/api/doxygen-wrapper.sh (original)
+++ qpid/dispatch/trunk/doc/api/doxygen-wrapper.py Tue May  6 17:15:04 2014
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env python
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -7,9 +7,9 @@
 # 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
@@ -18,4 +18,11 @@
 # under the License.
 #
 
-doxygen $1 >$1.output 2>&1
+import sys, subprocess;
+
+doxygen, config = sys.argv[1:3]
+outfile = config+".output"
+with open(outfile, 'w') as output:
+    status = subprocess.call([doxygen, config], stdout=output, stderr=subprocess.STDOUT)
+    if status != 0: print "Error in %s %s: see %s"%(doxygen, config, outfile)
+    sys.exit(status)

Propchange: qpid/dispatch/trunk/doc/api/doxygen-wrapper.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: qpid/dispatch/trunk/doc/api/doxygen-wrapper.py
------------------------------------------------------------------------------
    svn:executable = *

Copied: qpid/dispatch/trunk/doc/api/doxygen.in (from r1591389, qpid/dispatch/trunk/doc/api/user.doxygen.in)
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/api/doxygen.in?p2=qpid/dispatch/trunk/doc/api/doxygen.in&p1=qpid/dispatch/trunk/doc/api/user.doxygen.in&r1=1591389&r2=1592808&rev=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/api/user.doxygen.in (original)
+++ qpid/dispatch/trunk/doc/api/doxygen.in Tue May  6 17:15:04 2014
@@ -18,6 +18,8 @@
 #
 
 PROJECT_NAME           = "Dispatch"
-OUTPUT_DIRECTORY       = user
-INPUT                  = ${CMAKE_SOURCE_DIR}/include
+OUTPUT_DIRECTORY       = ${DOXYGEN_OUTPUT_DIRECTORY}
+INPUT                  = ${DOXYGEN_INPUT}
 RECURSIVE              = yes
+JAVADOC_AUTOBRIEF      = yes
+${DOXYGEN_MORE}

Modified: qpid/dispatch/trunk/include/qpid/dispatch/agent.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/agent.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/agent.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/agent.h Tue May  6 17:15:04 2014
@@ -25,7 +25,10 @@
 #include <stdint.h>
 
 /**
- * \defgroup Container Management Agent
+ * @defgroup agent
+ *
+ * Container Management Agent
+ * 
  * @{
  */
 
@@ -33,7 +36,7 @@ typedef struct qd_agent_class_t qd_agent
 
 
 /**
- * \brief Get Schema Data Handler
+ * Get Schema Data Handler
  *
  * @param context The handler context supplied in qd_agent_register.
  */
@@ -41,7 +44,7 @@ typedef void (*qd_agent_schema_cb_t)(voi
 
 
 /**
- * \brief Query Handler
+ * Query Handler
  *
  * @param context The handler context supplied in qd_agent_register.
  * @param id The identifier of the instance being queried or NULL for all instances.
@@ -51,7 +54,7 @@ typedef void (*qd_agent_query_cb_t)(void
 
 
 /**
- * \brief Register a class/object-type with the agent.
+ * Register a class/object-type with the agent.
  */
 qd_agent_class_t *qd_agent_register_class(qd_dispatch_t        *qd,
                                           const char           *fqname,
@@ -60,16 +63,13 @@ qd_agent_class_t *qd_agent_register_clas
                                           qd_agent_query_cb_t   query_handler);
 
 /**
- * \brief Register an event-type with the agent.
+ * Register an event-type with the agent.
  */
 qd_agent_class_t *qd_agent_register_event(qd_dispatch_t        *qd,
                                           const char           *fqname,
                                           void                 *context,
                                           qd_agent_schema_cb_t  schema_handler);
 
-/**
- *
- */
 void qd_agent_value_string(void *correlator, const char *key, const char *value);
 void qd_agent_value_uint(void *correlator, const char *key, uint64_t value);
 void qd_agent_value_null(void *correlator, const char *key);

Modified: qpid/dispatch/trunk/include/qpid/dispatch/alloc.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/alloc.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/alloc.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/alloc.h Tue May  6 17:15:04 2014
@@ -23,6 +23,15 @@
 #include <stdint.h>
 #include <qpid/dispatch/threading.h>
 
+/**
+ * @file
+ * Memory Allocation
+ *
+ * Allocate memory in per-thread, per-type memory pools.
+
+ * @internal
+ */
+
 typedef struct qd_alloc_pool_t qd_alloc_pool_t;
 
 typedef struct {
@@ -52,11 +61,14 @@ typedef struct {
     uint32_t           trailer;
 } qd_alloc_type_desc_t;
 
-
+/** Allocate in a thread pool. Use via ALLOC_DECLARE */
 void *qd_alloc(qd_alloc_type_desc_t *desc, qd_alloc_pool_t **tpool);
+/** De-allocate from a thread pool. Use via ALLOC_DECLARE */
 void qd_dealloc(qd_alloc_type_desc_t *desc, qd_alloc_pool_t **tpool, void *p);
 
-
+/**
+ * Declare functions new_T and alloc_T
+ */
 #define ALLOC_DECLARE(T) \
     T *new_##T(void);    \
     void free_##T(T *p)
@@ -68,7 +80,9 @@ void qd_dealloc(qd_alloc_type_desc_t *de
     void free_##T(T *p) { qd_dealloc(&__desc_##T, &__local_pool_##T, (void*) p); } \
     qd_alloc_stats_t *alloc_stats_##T(void) { return __desc_##T.stats; }
 
+/**
+ * Define functions new_T and alloc_T
+ */
 #define ALLOC_DEFINE(T) ALLOC_DEFINE_CONFIG(T, sizeof(T), 0, 0)
 
-
 #endif

Modified: qpid/dispatch/trunk/include/qpid/dispatch/amqp.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/amqp.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/amqp.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/amqp.h Tue May  6 17:15:04 2014
@@ -19,80 +19,92 @@
  * under the License.
  */
 
-/**
- * AMQP Performative Tags
+/** @defgroup amqp AMQP
+ * 
+ * AMQP related constant definitions.
  */
-#define QD_PERFORMATIVE_HEADER                  0x70
-#define QD_PERFORMATIVE_DELIVERY_ANNOTATIONS    0x71
-#define QD_PERFORMATIVE_MESSAGE_ANNOTATIONS     0x72  
-#define QD_PERFORMATIVE_PROPERTIES              0x73
-#define QD_PERFORMATIVE_APPLICATION_PROPERTIES  0x74
-#define QD_PERFORMATIVE_BODY_DATA               0x75
-#define QD_PERFORMATIVE_BODY_AMQP_SEQUENCE      0x76
-#define QD_PERFORMATIVE_BODY_AMQP_VALUE         0x77
-#define QD_PERFORMATIVE_FOOTER                  0x78
+/// @{
 
 
 /**
- * AMQP Type Tags
+ * AMQP Performative Tags
  */
-#define QD_AMQP_NULL        0x40
-#define QD_AMQP_BOOLEAN     0x56
-#define QD_AMQP_TRUE        0x41
-#define QD_AMQP_FALSE       0x42
-#define QD_AMQP_UBYTE       0x50
-#define QD_AMQP_USHORT      0x60
-#define QD_AMQP_UINT        0x70
-#define QD_AMQP_SMALLUINT   0x52
-#define QD_AMQP_UINT0       0x43
-#define QD_AMQP_ULONG       0x80
-#define QD_AMQP_SMALLULONG  0x53
-#define QD_AMQP_ULONG0      0x44
-#define QD_AMQP_BYTE        0x51
-#define QD_AMQP_SHORT       0x61
-#define QD_AMQP_INT         0x71
-#define QD_AMQP_SMALLINT    0x54
-#define QD_AMQP_LONG        0x81
-#define QD_AMQP_SMALLLONG   0x55
-#define QD_AMQP_FLOAT       0x72
-#define QD_AMQP_DOUBLE      0x82
-#define QD_AMQP_DECIMAL32   0x74
-#define QD_AMQP_DECIMAL64   0x84
-#define QD_AMQP_DECIMAL128  0x94
-#define QD_AMQP_UTF32       0x73
-#define QD_AMQP_TIMESTAMP   0x83
-#define QD_AMQP_UUID        0x98
-#define QD_AMQP_VBIN8       0xa0
-#define QD_AMQP_VBIN32      0xb0
-#define QD_AMQP_STR8_UTF8   0xa1
-#define QD_AMQP_STR32_UTF8  0xb1
-#define QD_AMQP_SYM8        0xa3
-#define QD_AMQP_SYM32       0xb3
-#define QD_AMQP_LIST0       0x45
-#define QD_AMQP_LIST8       0xc0
-#define QD_AMQP_LIST32      0xd0
-#define QD_AMQP_MAP8        0xc1
-#define QD_AMQP_MAP32       0xd1
-#define QD_AMQP_ARRAY8      0xe0
-#define QD_AMQP_ARRAY32     0xf0
+typedef enum {
+    QD_PERFORMATIVE_HEADER = 0x70,
+    QD_PERFORMATIVE_DELIVERY_ANNOTATIONS = 0x71,
+    QD_PERFORMATIVE_MESSAGE_ANNOTATIONS = 0x72  ,
+    QD_PERFORMATIVE_PROPERTIES = 0x73,
+    QD_PERFORMATIVE_APPLICATION_PROPERTIES = 0x74,
+    QD_PERFORMATIVE_BODY_DATA = 0x75,
+    QD_PERFORMATIVE_BODY_AMQP_SEQUENCE = 0x76,
+    QD_PERFORMATIVE_BODY_AMQP_VALUE = 0x77,
+    QD_PERFORMATIVE_FOOTER = 0x78,
+} qd_amqp_performative_t;
 
 /**
- * Delivery Annotation Headers
+ * AMQP Type Tags
  */
-const char * const QD_DA_INGRESS;  // Ingress Router
-const char * const QD_DA_TRACE;    // Trace
-const char * const QD_DA_TO;       // To-Override
+enum {
+    QD_AMQP_NULL = 0x40,
+    QD_AMQP_BOOLEAN = 0x56,
+    QD_AMQP_TRUE = 0x41,
+    QD_AMQP_FALSE = 0x42,
+    QD_AMQP_UBYTE = 0x50,
+    QD_AMQP_USHORT = 0x60,
+    QD_AMQP_UINT = 0x70,
+    QD_AMQP_SMALLUINT = 0x52,
+    QD_AMQP_UINT0 = 0x43,
+    QD_AMQP_ULONG = 0x80,
+    QD_AMQP_SMALLULONG = 0x53,
+    QD_AMQP_ULONG0 = 0x44,
+    QD_AMQP_BYTE = 0x51,
+    QD_AMQP_SHORT = 0x61,
+    QD_AMQP_INT = 0x71,
+    QD_AMQP_SMALLINT = 0x54,
+    QD_AMQP_LONG = 0x81,
+    QD_AMQP_SMALLLONG = 0x55,
+    QD_AMQP_FLOAT = 0x72,
+    QD_AMQP_DOUBLE = 0x82,
+    QD_AMQP_DECIMAL32 = 0x74,
+    QD_AMQP_DECIMAL64 = 0x84,
+    QD_AMQP_DECIMAL128 = 0x94,
+    QD_AMQP_UTF32 = 0x73,
+    QD_AMQP_TIMESTAMP = 0x83,
+    QD_AMQP_UUID = 0x98,
+    QD_AMQP_VBIN8 = 0xa0,
+    QD_AMQP_VBIN32 = 0xb0,
+    QD_AMQP_STR8_UTF8 = 0xa1,
+    QD_AMQP_STR32_UTF8 = 0xb1,
+    QD_AMQP_SYM8 = 0xa3,
+    QD_AMQP_SYM32 = 0xb3,
+    QD_AMQP_LIST0 = 0x45,
+    QD_AMQP_LIST8 = 0xc0,
+    QD_AMQP_LIST32 = 0xd0,
+    QD_AMQP_MAP8 = 0xc1,
+    QD_AMQP_MAP32 = 0xd1,
+    QD_AMQP_ARRAY8 = 0xe0,
+    QD_AMQP_ARRAY32 = 0xf0,
+} qd_amqp_type_t;
+
+/** @name Delivery Annotation Headers */
+/// @{
+const char * const QD_DA_INGRESS;  ///< Ingress Router
+const char * const QD_DA_TRACE;    ///< Trace
+const char * const QD_DA_TO;       ///< To-Override
+/// @}
 
-/**
- * Link Terminus Capabilities
- */
+/** @name Link Terminus Capabilities */
+/// @{
 const char * const QD_CAPABILITY_ROUTER;
+/// @}
 
-/**
- * Miscellaneous Strings
- */
+/** @name Miscellaneous Strings */
+/// @{
 const char * const QD_INTERNODE_LINK_NAME_1;
 const char * const QD_INTERNODE_LINK_NAME_2;
+/// @}
+
+/// @}
 
 #endif
 

Modified: qpid/dispatch/trunk/include/qpid/dispatch/buffer.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/buffer.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/buffer.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/buffer.h Tue May  6 17:15:04 2014
@@ -19,6 +19,11 @@
  * under the License.
  */
 
+/** @file
+ * Buffer chains.
+ * @internal
+ */
+
 #include <qpid/dispatch/ctools.h>
 
 typedef struct qd_buffer_t qd_buffer_t;
@@ -27,41 +32,49 @@ DEQ_DECLARE(qd_buffer_t, qd_buffer_list_
 
 struct qd_buffer_t {
     DEQ_LINKS(qd_buffer_t);
-    unsigned int size;
+    unsigned int size;          ///< Size of data content
 };
 
 /**
+ * Set the initial buffer capacity to be allocated by future calls to qp_buffer.
  */
 void qd_buffer_set_size(size_t size);
 
 /**
+ * Create a buffer with capacity set by last call to qd_buffer_set_size(), and data
+ * content size of 0 bytes.
  */
 qd_buffer_t *qd_buffer(void);
 
 /**
+ * Free a buffer
  * @param buf A pointer to an allocated buffer
  */
 void qd_buffer_free(qd_buffer_t *buf);
 
 /**
+ * Return a pointer to the start of the buffer.
  * @param buf A pointer to an allocated buffer
  * @return A pointer to the first octet in the buffer
  */
 unsigned char *qd_buffer_base(qd_buffer_t *buf);
 
 /**
+ * Return a pointer to the first unused byte in the buffer.
  * @param buf A pointer to an allocated buffer
  * @return A pointer to the first free octet in the buffer, the insert point for new data.
  */
 unsigned char *qd_buffer_cursor(qd_buffer_t *buf);
 
 /**
+ * Return remaining capacity at end of buffer.
  * @param buf A pointer to an allocated buffer
  * @return The number of octets in the buffer's free space, how many octets may be inserted.
  */
 size_t qd_buffer_capacity(qd_buffer_t *buf);
 
 /**
+ * Return the size of the buffers data content.
  * @param buf A pointer to an allocated buffer
  * @return The number of octets of data in the buffer
  */

Modified: qpid/dispatch/trunk/include/qpid/dispatch/compose.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/compose.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/compose.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/compose.h Tue May  6 17:15:04 2014
@@ -22,11 +22,21 @@
 #include <qpid/dispatch/buffer.h>
 #include <qpid/dispatch/iterator.h>
 
+/** A linked list of buffers composing a sequence of AMQP data objects. */
 typedef struct qd_composed_field_t qd_composed_field_t;
 
 /**
- * Begin composing a new field for a message.  The new field can be standalone or
- * appended onto an existing field.
+ * @defgroup compose
+ *
+ * Compose a tree-structure representing an AMQP datatype that can
+ * be serialized into a message.
+ * @{
+ */
+
+/**
+ * Begin composing a new field for a message.
+ *
+ * The new field can be standalone or appended onto an existing field.
  *
  * @param performative The performative for the message section being composed.
  * @param extend An existing field onto which to append the new field or NULL to

Modified: qpid/dispatch/trunk/include/qpid/dispatch/config.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/config.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/config.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/config.h Tue May  6 17:15:04 2014
@@ -19,6 +19,12 @@
  * under the License.
  */
 
+/**
+ * @defgroup configuration 
+ * 
+ * Get configuration values from a dispatch instance.
+ *@{
+ */
 #include <qpid/dispatch/dispatch.h>
 #include <stdint.h>
 
@@ -26,5 +32,5 @@ int qd_config_item_count(const qd_dispat
 const char *qd_config_item_value_string(const qd_dispatch_t *dispatch, const char *section, int index, const char* key);
 uint32_t qd_config_item_value_int(const qd_dispatch_t *dispatch, const char *section, int index, const char* key);
 int qd_config_item_value_bool(const qd_dispatch_t *dispatch, const char *section, int index, const char* key);
-
+///@}
 #endif

Modified: qpid/dispatch/trunk/include/qpid/dispatch/connection_manager.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/connection_manager.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/connection_manager.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/connection_manager.h Tue May  6 17:15:04 2014
@@ -26,7 +26,7 @@ typedef struct qd_config_connector_t qd_
 typedef struct qd_config_listener_t qd_config_listener_t;
 
 /**
- * \brief Allocate a connection manager
+ * Allocate a connection manager
  *
  * @param qd The dispatch handle returned by qd_dispatch.
  */
@@ -34,7 +34,7 @@ qd_connection_manager_t *qd_connection_m
 
 
 /**
- * \brief Free all the resources associated with the connection manager
+ * Free all the resources associated with the connection manager
  *
  * @param cm The connection manager handle returned by qd_connection_manager.
  */
@@ -42,7 +42,7 @@ void qd_connection_manager_free(qd_conne
 
 
 /**
- * \brief Load the Listeners and Connections from the configuration file.
+ * Load the Listeners and Connections from the configuration file.
  *
  * @param qd The dispatch handle returned by qd_dispatch.
  */
@@ -50,7 +50,7 @@ void qd_connection_manager_configure(qd_
 
 
 /**
- * \brief Start the configured Listeners and Connectors
+ * Start the configured Listeners and Connectors
  *
  * Note that on-demand connectors are not started by this function.
  *
@@ -60,7 +60,7 @@ void qd_connection_manager_start(qd_disp
 
 
 /**
- * \brief Given a connector-name, find and return a pointer to the on-demand connector.
+ * Given a connector-name, find and return a pointer to the on-demand connector.
  *
  * @param qd The dispatch handle returned by qd_dispatch.
  * @param name The name that uniquely identifies the on-demand connector.
@@ -70,7 +70,7 @@ qd_config_connector_t *qd_connection_man
 
 
 /**
- * \brief Start an on-demand connector.
+ * Start an on-demand connector.
  *
  * @param od The pointer to an on-demand connector returned by qd_connections_find_on_demand.
  */
@@ -78,7 +78,7 @@ void qd_connection_manager_start_on_dema
 
 
 /**
- * \brief Stop an on-demand connector.
+ * Stop an on-demand connector.
  *
  * @param od The pointer to an on-demand connector returned by qd_connections_find_on_demand.
  */
@@ -86,7 +86,7 @@ void qd_connection_manager_stop_on_deman
 
 
 /**
- * \brief Get the user context for a configured connector.
+ * Get the user context for a configured connector.
  *
  * @param cc Connector handle returned by qd_connection_manager_find_on_demand
  * @return User context for the configured connector.
@@ -95,7 +95,7 @@ void *qd_config_connector_context(qd_con
 
 
 /**
- * \brief Set the user context for a configured connector.
+ * Set the user context for a configured connector.
  *
  * @param cc Connector handle returned by qd_connection_manager_find_on_demand
  * @param context User context to be stored with the configured connector

Modified: qpid/dispatch/trunk/include/qpid/dispatch/container.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/container.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/container.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/container.h Tue May  6 17:15:04 2014
@@ -19,6 +19,12 @@
  * under the License.
  */
 
+/** @defgroup container
+ *
+ * Container for nodes, links and deliveries.
+ * @{
+ */
+
 #include <proton/engine.h>
 #include <qpid/dispatch/dispatch.h>
 #include <qpid/dispatch/server.h>
@@ -61,73 +67,55 @@ typedef int  (*qd_container_link_detach_
 typedef void (*qd_container_node_handler_t)        (void *type_context, qd_node_t *node);
 typedef void (*qd_container_conn_handler_t)        (void *type_context, qd_connection_t *conn, void *context);
 
+/**
+ * A set  of Node handlers for deliveries, links and container events.
+ */
 typedef struct {
     char *type_name;
     void *type_context;
     int   allow_dynamic_creation;
 
-    //=======================
-    // Node-Instance Handlers
-    //=======================
-
-    //
-    // rx_handler - Invoked when a new received delivery is avaliable for processing.
-    //
+    /** @name Node-Instance Handlers
+     * @{
+     */
+
+    /** Invoked when a new received delivery is avaliable for processing. */
     qd_container_delivery_handler_t rx_handler;
 
-    //
-    // disp_handler - Invoked when an existing delivery changes disposition
-    //                or settlement state.
-    //
+    /** Invoked when an existing delivery changes disposition or settlement state. */
     qd_container_delivery_handler_t disp_handler;
 
-    //
-    // incoming_handler - Invoked when an attach for a new incoming link is received.
-    //
+    /** Invoked when an attach for a new incoming link is received. */
     qd_container_link_handler_t incoming_handler;
 
-    //
-    // outgoing_handler - Invoked when an attach for a new outgoing link is received.
-    //
+    /** Invoked when an attach for a new outgoing link is received. */
     qd_container_link_handler_t outgoing_handler;
 
-    //
-    // writable_handler - Invoked when an outgoing link is available for sending either
-    //                    deliveries or disposition changes.  The handler must check the
-    //                    link's credit to determine whether (and how many) message
-    //                    deliveries may be sent.
-    //
+    /**
+     * Invoked when an outgoing link is available for sending either deliveries
+     * or disposition changes.  The handler must check the link's credit to
+     * determine whether (and how many) message deliveries may be sent.
+     */
     qd_container_link_handler_t writable_handler;
 
-    //
-    // link_detach_handler - Invoked when a link is detached.
-    //
+    /** Invoked when a link is detached. */
     qd_container_link_detach_handler_t link_detach_handler;
+    ///@}
+
+    /** @name Node-Type Handlers
+     * @{
+     */
 
-    //===================
-    // Node-Type Handlers
-    //===================
-
-    //
-    // node_created_handler - Invoked when a new instance of the node-type is created.
-    //
+    /** Invoked when a new instance of the node-type is created. */
     qd_container_node_handler_t  node_created_handler;
 
-    //
-    // node_destroyed_handler - Invoked when an instance of the node type is destroyed.
-    //
+    /** Invoked when an instance of the node type is destroyed. */
     qd_container_node_handler_t  node_destroyed_handler;
 
-    //
-    // inbound_conn_open_handler - Invoked when an incoming connection (via listener)
-    //                             is established.
-    //
+    /** Invoked when an incoming connection (via listener) is established. */
     qd_container_conn_handler_t  inbound_conn_open_handler;
 
-    //
-    // outbound_conn_open_handler - Invoked when an outgoing connection (via connector)
-    //                              is established.
-    //
+    /** Invoked when an outgoing connection (via connector) is established. */
     qd_container_conn_handler_t  outbound_conn_open_handler;
 } qd_node_type_t;
 
@@ -210,4 +198,5 @@ struct qd_link_item_t {
 ALLOC_DECLARE(qd_link_item_t);
 DEQ_DECLARE(qd_link_item_t, qd_link_list_t);
 
+///@}
 #endif

Modified: qpid/dispatch/trunk/include/qpid/dispatch/dispatch.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/dispatch.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/dispatch.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/dispatch.h Tue May  6 17:15:04 2014
@@ -20,14 +20,16 @@
  */
 
 /**
- * \defgroup General Dispatch Definitions
+ * @defgroup dispatch
+ *
+ * Configure and prepare a dispatch instance.
  * @{
  */
 
 typedef struct qd_dispatch_t qd_dispatch_t;
 
 /**
- * \brief Initialize the Dispatch library and prepare it for operation.
+ * Initialize the Dispatch library and prepare it for operation.
  *
  * @param python_pkgdir The path to the Python files.
  * @return A handle to be used in API calls for this instance.
@@ -36,14 +38,14 @@ qd_dispatch_t *qd_dispatch(const char *p
 
 
 /**
- * \brief Finalize the Dispatch library after it has stopped running.
+ * Finalize the Dispatch library after it has stopped running.
  *
  * @param dispatch The dispatch handle returned by qd_dispatch
  */
 void qd_dispatch_free(qd_dispatch_t *dispatch);
 
 /**
- * \brief Extend the schema for the configuration file prior to loading and
+ * Extend the schema for the configuration file prior to loading and
  *        parsing the file.
  *
  * @param dispatch The dispatch handle returned by qd_dispatch
@@ -52,7 +54,7 @@ void qd_dispatch_free(qd_dispatch_t *dis
 void qd_dispatch_extend_config_schema(qd_dispatch_t *dispatch, const char* text);
 
 /**
- * \brief Load the configuration file.
+ * Load the configuration file.
  *
  * @param dispatch The dispatch handle returned by qd_dispatch
  * @param config_path The path to the configuration file.
@@ -60,7 +62,7 @@ void qd_dispatch_extend_config_schema(qd
 void qd_dispatch_load_config(qd_dispatch_t *dispatch, const char *config_path);
 
 /**
- * \brief Configure the AMQP container from the parsed configuration file.
+ * Configure the AMQP container from the parsed configuration file.
  *        If this is not called, the container will take on default settings.
  *
  * @param dispatch The dispatch handle returned by qd_dispatch
@@ -68,7 +70,7 @@ void qd_dispatch_load_config(qd_dispatch
 void qd_dispatch_configure_container(qd_dispatch_t *dispatch);
 
 /**
- * \brief Configure the router node from the parsed configuration file.
+ * Configure the router node from the parsed configuration file.
  *        If this is not called, the router will run in ENDPOINT mode.
  *
  * @param dispatch The dispatch handle returned by qd_dispatch
@@ -76,7 +78,7 @@ void qd_dispatch_configure_container(qd_
 void qd_dispatch_configure_router(qd_dispatch_t *dispatch);
 
 /**
- * \brief Prepare Dispatch for operation.  This must be called prior to
+ * Prepare Dispatch for operation.  This must be called prior to
  *        calling qd_server_run or qd_server_start.
  *
  * @param dispatch The dispatch handle returned by qd_dispatch
@@ -84,7 +86,7 @@ void qd_dispatch_configure_router(qd_dis
 void qd_dispatch_prepare(qd_dispatch_t *dispatch);
 
 /**
- * \brief Configure the server connectors and listeners from the
+ * Configure the server connectors and listeners from the
  *        parsed configuration file.  This must be called after the
  *        call to qd_dispatch_prepare completes.
  *

Modified: qpid/dispatch/trunk/include/qpid/dispatch/iterator.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/iterator.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/iterator.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/iterator.h Tue May  6 17:15:04 2014
@@ -24,9 +24,14 @@
 #include <qpid/dispatch/iovec.h>
 
 /**
- * The field iterator is used to access fields within a buffer chain.
- * It shields the user from the fact that the field may be split across
+ * @defgroup iterator
+ *
+ * Used to access fields within a message buffer chain, in particular address
+ * fields.
+ *
+ * Iterator shields the user from the fact that the field may be split across
  * one or more physical buffers.
+ * @{
  */
 typedef struct qd_field_iterator_t qd_field_iterator_t;
 
@@ -96,12 +101,6 @@ typedef enum {
 
 
 /**
- * Set the area and router names for the local router.  These are used to match
- * my-area and my-router in address fields.
- */
-void qd_field_iterator_set_address(const char *area, const char *router);
-
-/**
  * Create an iterator from a null-terminated string.
  *
  * The "text" string must stay intact for the whole life of the iterator.  The iterator
@@ -110,6 +109,13 @@ void qd_field_iterator_set_address(const
 qd_field_iterator_t* qd_field_iterator_string(const char         *text,
                                               qd_iterator_view_t  view);
 
+
+/**
+ * Create an iterator from binar data.
+ *
+ * The "text" string must stay intact for the whole life of the iterator.  The iterator
+ * does not copy the data, it references it.
+ */
 qd_field_iterator_t* qd_field_iterator_binary(const char         *text,
                                               int                 length,
                                               qd_iterator_view_t  view);
@@ -117,6 +123,9 @@ qd_field_iterator_t* qd_field_iterator_b
 
 /**
  * Create an iterator from a field in a buffer chain
+
+ * The buffer chain must stay intact for the whole life of the iterator.  The iterator
+ * does not copy the buffer, it references it.
  */
 qd_field_iterator_t *qd_field_iterator_buffer(qd_buffer_t        *buffer,
                                               int                 offset,
@@ -129,6 +138,12 @@ qd_field_iterator_t *qd_field_iterator_b
 void qd_field_iterator_free(qd_field_iterator_t *iter);
 
 /**
+ * Set the area and router names for the local router.  These are used to match
+ * my-area and my-router in address fields.
+ */
+void qd_field_iterator_set_address(const char *area, const char *router);
+
+/**
  * Reset the iterator to the first octet and set a new view
  */
 void qd_field_iterator_reset(qd_field_iterator_t *iter);
@@ -183,6 +198,7 @@ int qd_field_iterator_prefix(qd_field_it
 
 /**
  * Return a copy of the iterator's view.
+ * @return Copy of the view, free with free()
  */
 unsigned char *qd_field_iterator_copy(qd_field_iterator_t *iter);
 
@@ -196,4 +212,6 @@ unsigned char *qd_field_iterator_copy(qd
  */
 qd_iovec_t *qd_field_iterator_iovec(const qd_field_iterator_t *iter);
 
+/** @} */
+
 #endif

Modified: qpid/dispatch/trunk/include/qpid/dispatch/message.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/message.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/message.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/message.h Tue May  6 17:15:04 2014
@@ -27,6 +27,13 @@
 #include <qpid/dispatch/parse.h>
 #include <qpid/dispatch/container.h>
 
+/** 
+ * @defgroup message
+ *
+ * Message representation.
+ * @{
+ */
+
 // Callback for status change (confirmed persistent, loaded-in-memory, etc.)
 
 typedef struct qd_message_t qd_message_t;
@@ -186,4 +193,6 @@ ssize_t qd_message_field_copy(qd_message
 void qd_message_compose_1(qd_message_t *msg, const char *to, qd_buffer_list_t *buffers);
 void qd_message_compose_2(qd_message_t *msg, qd_composed_field_t *content);
 
+///@}
+
 #endif

Modified: qpid/dispatch/trunk/include/qpid/dispatch/parse.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/parse.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/parse.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/parse.h Tue May  6 17:15:04 2014
@@ -22,6 +22,12 @@
 #include <qpid/dispatch/buffer.h>
 #include <qpid/dispatch/iterator.h>
 
+/** @defgroup parse
+ * 
+ * Parse data from qd_field_iterator_t into a tree structure represeniting
+ * an AMQP data type tree.
+ */
+
 typedef struct qd_parsed_field_t qd_parsed_field_t;
 
 /**

Modified: qpid/dispatch/trunk/include/qpid/dispatch/router.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/router.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/router.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/router.h Tue May  6 17:15:04 2014
@@ -19,6 +19,10 @@
  * under the License.
  */
 
+/** @defgroup router
+ * 
+ * Register addresses, send messages.
+ */
 #include <qpid/dispatch/dispatch.h>
 #include <qpid/dispatch/message.h>
 #include <qpid/dispatch/iterator.h>
@@ -28,62 +32,76 @@ typedef struct qd_address_t qd_address_t
 typedef uint8_t             qd_address_semantics_t;
 
 /**
- * Address fanout semantics
- *
- * SINGLE   - Message will be delivered to a single consumer.
- * MULTIPLE - Message will be delivered to multiple consumers.
- * GROUP    - Message will be delivered to one consumer per group.
+ * @name Address fanout semantics
+ * @{
  */
 #define QD_FANOUTMASK      0x03
-#define QD_FANOUT_SINGLE   0x00
-#define QD_FANOUT_MULTIPLE 0x01
-#define QD_FANOUT_GROUP    0x02
-#define QD_FANOUT(d) (d & QD_FANOUTMASK)
-
+#define QD_FANOUT_SINGLE   0x00 ///< Message will be delivered to a single consumer.
+#define QD_FANOUT_MULTIPLE 0x01 ///< Message will be delivered to multiple consumers.
+#define QD_FANOUT_GROUP    0x02 ///< Message will be delivered to one consumer per group.
+#define QD_FANOUT(d) (d & QD_FANOUTMASK) ///< Get fanout bits.
+///@}
 
 /**
- * Address bias semantics for SINGLE/GROUP fanout
- *
- * NONE    - Apply no bias (also used for multiple fanout).
- * CLOSEST - Message will be delivered to the closest (lowest cost) consumer.
- * SPREAD  - Messages will be spread arbitrarily across all consumers.
- * LATENCY - Messages will be spread to minimize latency in light of each
- *           consumer's rate of consumption.
+ * @name Address bias semantics for SINGLE/GROUP fanout
+ * @{
  */
+
 #define QD_BIASMASK     0x0c
-#define QD_BIAS_NONE    0x00
-#define QD_BIAS_CLOSEST 0x04
-#define QD_BIAS_SPREAD  0x08
-#define QD_BIAS_LATENCY 0x0c
+#define QD_BIAS_NONE    0x00 ///< Apply no bias (also used for multiple fanout).
+#define QD_BIAS_CLOSEST 0x04 ///< Message will be delivered to the closest (lowest cost) consumer.
+#define QD_BIAS_SPREAD  0x08 ///< Messages will be spread arbitrarily across all consumers.
+#define QD_BIAS_LATENCY 0x0c ///< Messages will be spread to minimize latency in light of each consumer's rate of consumption.
 #define QD_BIAS(d) (d & QD_BIASMASK)
+///@}
 
 
 /**
- * Address congestion semantics - This controls that the router will do with
- * received messages that are destined for congested destinations.
+ * @name Address congestion semantics.
  *
- * DROP         - Drop/Release the message.
- * BACKPRESSURE - Stop issuing replacement credits to slow the producer.
- *                This puts a cap on the total number of messages addressed to this
- *                address from a particular producer that can be buffered in the router.
- * REDIRECT     - Redirect messages to an alternate address.
+ * This controls that the router will do with
+ * received messages that are destined for congested destinations.
+ * @{
  */
 #define QD_CONGESTIONMASK          0x30
+/** Drop/Release the message.*/
 #define QD_CONGESTION_DROP         0x00
+ /**
+  * Stop issuing replacement credits to slow the producer.  This puts a cap on
+  * the total number of messages addressed to this address from a particular
+  * producer that can be buffered in the router.
+  */
 #define QD_CONGESTION_BACKPRESSURE 0x10
+ /** Redirect messages to an alternate address. */
 #define QD_CONGESTION_REDIRECT     0x20
 #define QD_CONGESTION(d) (d & QD_CONGESTIONMASK)
+/// @}
 
+/** @name Other semantics
+ * @{
+ */
 #define QD_DROP_FOR_SLOW_CONSUMERS 0x40
 #define QD_BYPASS_VALID_ORIGINS    0x80
+///@}
 
+/**
+ * @name Sematics groups
+ * @{
+ */
 #define QD_SEMANTICS_ROUTER_CONTROL (QD_FANOUT_MULTIPLE | QD_BIAS_NONE | QD_CONGESTION_DROP | QD_DROP_FOR_SLOW_CONSUMERS | QD_BYPASS_VALID_ORIGINS)
 #define QD_SEMANTICS_DEFAULT        (QD_FANOUT_MULTIPLE | QD_BIAS_NONE | QD_CONGESTION_DROP | QD_DROP_FOR_SLOW_CONSUMERS)
+///@}
 
 typedef void (*qd_router_message_cb_t)(void *context, qd_message_t *msg, int link_id);
 
 const char *qd_router_id(const qd_dispatch_t *qd);
 
+/** Register an address in the router's hash table.
+ * @param address String form of address
+ * @param handler Callback to be called when a message is received for the address.
+ * @param semantics Semantics for the address.
+ * @param context Context to be passed to the handler.
+ */
 qd_address_t *qd_router_register_address(qd_dispatch_t          *qd,
                                          const char             *address,
                                          qd_router_message_cb_t  handler,
@@ -99,10 +117,12 @@ void qd_address_set_static_cc(qd_address
 
 void qd_address_set_dynamic_cc(qd_address_t *address, qd_address_t *cc);
 
+/** Send msg to local links and next-hops for address */
 void qd_router_send(qd_dispatch_t       *qd,
                     qd_field_iterator_t *address,
                     qd_message_t        *msg);
 
+/** Send msg to local links and next-hops for address */
 void qd_router_send2(qd_dispatch_t *qd,
                      const char    *address,
                      qd_message_t  *msg);

Modified: qpid/dispatch/trunk/include/qpid/dispatch/server.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/server.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/server.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/server.h Tue May  6 17:15:04 2014
@@ -23,12 +23,14 @@
 #include <proton/engine.h>
 
 /**
- * \defgroup Control Server Control Functions
+ * @defgroup server
+ *
+ * Control server threads, starting and stopping the server.
  * @{
  */
 
 /**
- * \brief Thread Start Handler
+ * Thread Start Handler
  *
  * Callback invoked when a new server thread is started.  The callback is
  * invoked on the newly created thread.
@@ -43,7 +45,7 @@ typedef void (*qd_thread_start_cb_t)(voi
 
 
 /**
- * \brief Set the optional thread-start handler.
+ * Set the optional thread-start handler.
  *
  * This handler is called once on each worker thread at the time the thread is
  * started.  This may be used to set tuning settings like processor affinity,
@@ -57,7 +59,7 @@ void qd_server_set_start_handler(qd_disp
 
 
 /**
- * \brief Run the server threads until completion - The blocking version.
+ * Run the server threads until completion - The blocking version.
  *
  * Start the operation of the server, including launching all of the worker
  * threads.  This function does not return until after the server has been
@@ -70,7 +72,7 @@ void qd_server_run(qd_dispatch_t *qd);
 
 
 /**
- * \brief Start the server threads and return immediately - The non-blocking version.
+ * Start the server threads and return immediately - The non-blocking version.
  *
  * Start the operation of the server, including launching all of the worker
  * threads.
@@ -81,7 +83,7 @@ void qd_server_start(qd_dispatch_t *qd);
 
 
 /**
- * \brief Stop the server
+ * Stop the server
  *
  * Stop the server and join all of its worker threads.  This function may be
  * called from any thread.  When this function returns, all of the other
@@ -94,7 +96,7 @@ void qd_server_stop(qd_dispatch_t *qd);
 
 
 /**
- * \brief Pause (quiesce) the server.
+ * Pause (quiesce) the server.
  *
  * This call blocks until all of the worker threads (except the one calling
  * this function) are finished processing and have been blocked.  When this
@@ -109,7 +111,7 @@ void qd_server_pause(qd_dispatch_t *qd);
 
 
 /**
- * \brief Resume normal operation of a paused server.
+ * Resume normal operation of a paused server.
  *
  * This call unblocks all of the worker threads so they can resume normal
  * connection processing.
@@ -121,13 +123,16 @@ void qd_server_resume(qd_dispatch_t *qd)
 
 /**
  * @}
- * \defgroup Signal Server Signal Handling Functions
+ * @defgroup server_signal Server Signal
+ *
+ * Server Signal Handling
+ * 
  * @{
  */
 
 
 /**
- * \brief Signal Handler
+ * Signal Handler
  *
  * Callback for signal handling.  This handler will be invoked on one of the
  * worker threads in an orderly fashion.  This callback is triggered by a call
@@ -152,7 +157,7 @@ void qd_server_set_signal_handler(qd_dis
 
 
 /**
- * \brief Schedule the invocation of the Server's signal handler.
+ * Schedule the invocation of the Server's signal handler.
  *
  * This function is safe to call from any context, including an OS signal
  * handler or an Interrupt Service Routine.  It schedules the orderly
@@ -166,27 +171,31 @@ void qd_server_signal(qd_dispatch_t *qd,
 
 /**
  * @}
- * \defgroup Connection Server AMQP Connection Handling Functions
+ * @defgroup server_connection Server Connection
+ *
+ * Server AMQP Connection Handling
+ *
+ * Handling listeners, connectors, connections and events.
  * @{
  */
 
 /**
- * \brief Listener objects represent the desire to accept incoming transport connections.
+ * Listener objects represent the desire to accept incoming transport connections.
  */
 typedef struct qd_listener_t qd_listener_t;
 
 /**
- * \brief Connector objects represent the desire to create and maintain an outgoing transport connection.
+ * Connector objects represent the desire to create and maintain an outgoing transport connection.
  */
 typedef struct qd_connector_t qd_connector_t;
 
 /**
- * \brief Connection objects wrap Proton connection objects.
+ * Connection objects wrap Proton connection objects.
  */
 typedef struct qd_connection_t qd_connection_t;
 
 /**
- * \brief Event type for the connection callback.
+ * Event type for the connection callback.
  */
 typedef enum {
     /// The connection just opened via a listener (inbound).
@@ -204,7 +213,7 @@ typedef enum {
 
 
 /**
- * \brief Configuration block for a connector or a listener.
+ * Configuration block for a connector or a listener.
  */
 typedef struct qd_server_config_t {
     /**
@@ -317,7 +326,7 @@ typedef struct qd_server_config_t {
 
 
 /**
- * \brief Connection Event Handler
+ * Connection Event Handler
  *
  * Callback invoked when processing is needed on a proton connection.  This
  * callback shall be invoked on one of the server's worker threads.  The
@@ -337,7 +346,7 @@ typedef int (*qd_conn_handler_cb_t)(void
 
 
 /**
- * \brief Set the connection event handler callback.
+ * Set the connection event handler callback.
  *
  * Set the connection handler callback for the server.  This callback is
  * mandatory and must be set prior to the invocation of qd_server_run.
@@ -349,7 +358,7 @@ void qd_server_set_conn_handler(qd_dispa
 
 
 /**
- * \brief Set the user context for a connection.
+ * Set the user context for a connection.
  *
  * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @param context User context to be stored with the connection.
@@ -358,7 +367,7 @@ void qd_connection_set_context(qd_connec
 
 
 /**
- * \brief Get the user context from a connection.
+ * Get the user context from a connection.
  *
  * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return The user context stored with the connection.
@@ -367,7 +376,7 @@ void *qd_connection_get_context(qd_conne
 
 
 /**
- * \brief Set the link context for a connection.
+ * Set the link context for a connection.
  *
  * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @param context Link context to be stored with the connection.
@@ -376,7 +385,7 @@ void qd_connection_set_link_context(qd_c
 
 
 /**
- * \brief Get the link context from a connection.
+ * Get the link context from a connection.
  *
  * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return The link context stored with the connection.
@@ -385,7 +394,7 @@ void *qd_connection_get_link_context(qd_
 
 
 /**
- * \brief Activate a connection for output.
+ * Activate a connection for output.
  *
  * This function is used to request that the server activate the indicated
  * connection.  It is assumed that the connection is one that the caller does
@@ -399,7 +408,7 @@ void qd_server_activate(qd_connection_t 
 
 
 /**
- * \brief Get the wrapped proton-engine connection object.
+ * Get the wrapped proton-engine connection object.
  *
  * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return The proton connection object.
@@ -408,7 +417,7 @@ pn_connection_t *qd_connection_pn(qd_con
 
 
 /**
- * \brief Get the event collector for a connection.
+ * Get the event collector for a connection.
  *
  * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return The pn_collector associated with the connection.
@@ -417,7 +426,7 @@ pn_collector_t *qd_connection_collector(
 
 
 /**
- * \brief Get the configuration that was used in the setup of this connection.
+ * Get the configuration that was used in the setup of this connection.
  *
  * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return A pointer to the server configuration used in the establishment of this connection.
@@ -426,7 +435,7 @@ const qd_server_config_t *qd_connection_
 
 
 /**
- * \brief Create a listener for incoming connections.
+ * Create a listener for incoming connections.
  *
  * @param qd The dispatch handle returned by qd_dispatch.
  * @param config Pointer to a configuration block for this listener.  This block will be
@@ -439,7 +448,7 @@ qd_listener_t *qd_server_listen(qd_dispa
 
 
 /**
- * \brief Free the resources associated with a listener.
+ * Free the resources associated with a listener.
  *
  * @param li A listener pointer returned by qd_listen.
  */
@@ -447,7 +456,7 @@ void qd_listener_free(qd_listener_t* li)
 
 
 /**
- * \brief Close a listener so it will accept no more connections.
+ * Close a listener so it will accept no more connections.
  *
  * @param li A listener pointer returned by qd_listen.
  */
@@ -455,7 +464,7 @@ void qd_listener_close(qd_listener_t* li
 
 
 /**
- * \brief Create a connector for an outgoing connection.
+ * Create a connector for an outgoing connection.
  *
  * @param qd The dispatch handle returned by qd_dispatch.
  * @param config Pointer to a configuration block for this connector.  This block will be
@@ -468,7 +477,7 @@ qd_connector_t *qd_server_connect(qd_dis
 
 
 /**
- * \brief Free the resources associated with a connector.
+ * Free the resources associated with a connector.
  *
  * @param ct A connector pointer returned by qd_connect.
  */

Modified: qpid/dispatch/trunk/include/qpid/dispatch/timer.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/timer.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/timer.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/timer.h Tue May  6 17:15:04 2014
@@ -23,7 +23,9 @@
 #include <qpid/dispatch/server.h>
 
 /**
- * \defgroup Timer Server Timer Functions
+ * @defgroup timer
+ *
+ * Server Timer Functions
  * @{
  */
 

Modified: qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h Tue May  6 17:15:04 2014
@@ -23,7 +23,9 @@
 #include <qpid/dispatch/server.h>
 
 /**
- * \defgroup UserFd Server User-File-Descriptor Functions
+ * @defgroup user_fd User FD
+ *
+ * Server User-File-Descriptor Functions
  * @{
  */
 
@@ -32,7 +34,7 @@ typedef struct qd_user_fd_t qd_user_fd_t
 
 /**
  * User_fd Handler
- *
+ *x
  * Callback invoked when a user-managed file descriptor is available for reading or writing or there
  * was an error on the file descriptor.
  *

Modified: qpid/dispatch/trunk/src/container.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/container.c?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/container.c (original)
+++ qpid/dispatch/trunk/src/container.c Tue May  6 17:15:04 2014
@@ -35,9 +35,10 @@
 #include <qpid/dispatch/agent.h>
 #include "conditionals.h"
 
+/** Instance of a node type in a container */
 struct qd_node_t {
     qd_container_t       *container;
-    const qd_node_type_t *ntype;
+    const qd_node_type_t *ntype; ///< Type of node, defines callbacks.
     char                 *name;
     void                 *context;
     qd_dist_mode_t        supported_dist;
@@ -48,7 +49,7 @@ ALLOC_DECLARE(qd_node_t);
 ALLOC_DEFINE(qd_node_t);
 ALLOC_DEFINE(qd_link_item_t);
 
-
+/** Encapsulates a proton link for sending and receiving messages */
 struct qd_link_t {
     pn_link_t *pn_link;
     void      *context;
@@ -59,7 +60,7 @@ struct qd_link_t {
 ALLOC_DECLARE(qd_link_t);
 ALLOC_DEFINE(qd_link_t);
 
-
+/** Encapsulates a proton message delivery */
 struct qd_delivery_t {
     pn_delivery_t *pn_delivery;
     qd_delivery_t *peer;

Modified: qpid/dispatch/trunk/src/message_private.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/message_private.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/message_private.h (original)
+++ qpid/dispatch/trunk/src/message_private.h Tue May  6 17:15:04 2014
@@ -23,7 +23,9 @@
 #include <qpid/dispatch/alloc.h>
 #include <qpid/dispatch/threading.h>
 
-/**
+/** @file
+ * Message representation.
+ * 
  * Architecture of the message module:
  *
  *     +--------------+            +----------------------+
@@ -42,6 +44,8 @@
  * references.  If a message is received and is to be queued for multiple destinations, there is only
  * one copy of the message content in memory but multiple lightweight references to the content.
  *
+ * @internal
+ * @{ 
  */
 
 typedef struct {
@@ -96,4 +100,6 @@ ALLOC_DECLARE(qd_message_content_t);
 
 #define MSG_CONTENT(m) (((qd_message_pvt_t*) m)->content)
 
+///@}
+
 #endif

Modified: qpid/dispatch/trunk/src/router_private.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_private.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_private.h (original)
+++ qpid/dispatch/trunk/src/router_private.h Tue May  6 17:15:04 2014
@@ -19,6 +19,11 @@
  * under the License.
  */
 
+/**@file
+ * Router Private type definitions
+ *@internal
+ */
+
 #include <qpid/dispatch/router.h>
 #include <qpid/dispatch/message.h>
 #include <qpid/dispatch/bitmask.h>
@@ -33,17 +38,17 @@ void qd_router_agent_setup(qd_router_t *
 void qd_router_configure(qd_router_t *router);
 
 typedef enum {
-    QD_ROUTER_MODE_STANDALONE,  // Standalone router.  No routing protocol participation
-    QD_ROUTER_MODE_INTERIOR,    // Interior router.  Full participation in routing protocol.
-    QD_ROUTER_MODE_EDGE,        // Edge router.  No transit-router capability.
-    QD_ROUTER_MODE_ENDPOINT     // No routing except for internal modules (agent, etc.).
+    QD_ROUTER_MODE_STANDALONE,  ///< Standalone router.  No routing protocol participation
+    QD_ROUTER_MODE_INTERIOR,    ///< Interior router.  Full participation in routing protocol.
+    QD_ROUTER_MODE_EDGE,        ///< Edge router.  No transit-router capability.
+    QD_ROUTER_MODE_ENDPOINT     ///< No routing except for internal modules (agent, etc.).
 } qd_router_mode_t;
 
 typedef enum {
-    QD_LINK_ENDPOINT,   // A link to a connected endpoint
-    QD_LINK_WAYPOINT,   // A link to a configured waypoint
-    QD_LINK_ROUTER,     // A link to a peer router in the same area
-    QD_LINK_AREA        // A link to a peer router in a different area (area boundary)
+    QD_LINK_ENDPOINT,   ///< A link to a connected endpoint
+    QD_LINK_WAYPOINT,   ///< A link to a configured waypoint
+    QD_LINK_ROUTER,     ///< A link to a peer router in the same area
+    QD_LINK_AREA        ///< A link to a peer router in a different area (area boundary)
 } qd_link_type_t;
 
 
@@ -61,18 +66,18 @@ DEQ_DECLARE(qd_routed_event_t, qd_routed
 
 struct qd_router_link_t {
     DEQ_LINKS(qd_router_link_t);
-    int                     mask_bit;        // Unique mask bit if this is an inter-router link
+    int                     mask_bit;        ///< Unique mask bit if this is an inter-router link
     qd_link_type_t          link_type;
     qd_direction_t          link_direction;
-    qd_address_t           *owning_addr;     // [ref] Address record that owns this link
-    qd_waypoint_t          *waypoint;        // [ref] Waypoint that owns this link
-    qd_link_t              *link;            // [own] Link pointer
-    qd_router_link_t       *connected_link;  // [ref] If this is a link-route, reference the connected link
-    qd_router_link_t       *peer_link;       // [ref] If this is a bidirectional link-route, reference the peer link
-    qd_router_link_ref_t   *ref;             // Pointer to a containing reference object
-    char                   *target;          // Target address for incoming links
-    qd_routed_event_list_t  event_fifo;      // FIFO of outgoing delivery/link events (no messages)
-    qd_routed_event_list_t  msg_fifo;        // FIFO of outgoing message deliveries
+    qd_address_t           *owning_addr;     ///< [ref] Address record that owns this link
+    qd_waypoint_t          *waypoint;        ///< [ref] Waypoint that owns this link
+    qd_link_t              *link;            ///< [own] Link pointer
+    qd_router_link_t       *connected_link;  ///< [ref] If this is a link-route, reference the connected link
+    qd_router_link_t       *peer_link;       ///< [ref] If this is a bidirectional link-route, reference the peer link
+    qd_router_link_ref_t   *ref;             ///< Pointer to a containing reference object
+    char                   *target;          ///< Target address for incoming links
+    qd_routed_event_list_t  event_fifo;      ///< FIFO of outgoing delivery/link events (no messages)
+    qd_routed_event_list_t  msg_fifo;        ///< FIFO of outgoing message deliveries
 };
 
 ALLOC_DECLARE(qd_router_link_t);
@@ -82,8 +87,8 @@ struct qd_router_node_t {
     DEQ_LINKS(qd_router_node_t);
     qd_address_t     *owning_addr;
     int               mask_bit;
-    qd_router_node_t *next_hop;   // Next hop node _if_ this is not a neighbor node
-    qd_router_link_t *peer_link;  // Outgoing link _if_ this is a neighbor node
+    qd_router_node_t *next_hop;   ///< Next hop node _if_ this is not a neighbor node
+    qd_router_link_t *peer_link;  ///< Outgoing link _if_ this is a neighbor node
     uint32_t          ref_count;
     qd_bitmask_t     *valid_origins;
 };
@@ -116,13 +121,14 @@ struct qd_router_conn_t {
 ALLOC_DECLARE(qd_router_conn_t);
 
 
+/** A router address */
 struct qd_address_t {
     DEQ_LINKS(qd_address_t);
-    qd_router_message_cb_t     handler;          // In-Process Consumer
-    void                      *handler_context;  // In-Process Consumer context
-    qd_router_link_ref_list_t  rlinks;           // Locally-Connected Consumers
-    qd_router_ref_list_t       rnodes;           // Remotely-Connected Consumers
-    qd_hash_handle_t          *hash_handle;      // Linkage back to the hash table entry
+    qd_router_message_cb_t     handler;          ///< In-Process Consumer
+    void                      *handler_context;  ///< In-Process Consumer context
+    qd_router_link_ref_list_t  rlinks;           ///< Locally-Connected Consumers
+    qd_router_ref_list_t       rnodes;           ///< Remotely-Connected Consumers
+    qd_hash_handle_t          *hash_handle;      ///< Linkage back to the hash table entry
     qd_address_semantics_t     semantics;
     qd_address_t              *redirect;
     qd_address_t              *static_cc;
@@ -136,14 +142,14 @@ struct qd_address_t {
     //  - Add an indication that the address is awaiting a lookup response
     //
 
-    //
-    // Statistics
-    //
+    /**@name Statistics */
+    ///@{
     uint64_t deliveries_ingress;
     uint64_t deliveries_egress;
     uint64_t deliveries_transit;
     uint64_t deliveries_to_container;
     uint64_t deliveries_from_container;
+    ///@}
 };
 
 ALLOC_DECLARE(qd_address_t);
@@ -167,19 +173,24 @@ struct qd_config_address_t {
 
 DEQ_DECLARE(qd_config_address_t, qd_config_address_list_t);
 
+/**
+ * A waypoint is a point on a multi-phase route where messages can exit and re-enter the router.
+ *
+ * NOTE: a message received by a waypoint is first sent OUT and then received back IN.
+ */
 struct qd_waypoint_t {
     DEQ_LINKS(qd_waypoint_t);
     const char            *name;
-    char                   in_phase;
-    char                   out_phase;
-    const char            *connector_name;
-    qd_config_connector_t *connector;
-    qd_connection_t       *connection;
-    qd_link_t             *in_link;
-    qd_link_t             *out_link;
-    qd_address_t          *in_address;
-    qd_address_t          *out_address;
-    bool                   connected;
+    char                   in_phase;       ///< Phase for re-entering message.
+    char                   out_phase;      ///< Phase for exiting message.
+    const char            *connector_name; ///< On-demand connector name for outgoing messages.
+    qd_config_connector_t *connector;      ///< Connector for outgoing messages.
+    qd_connection_t       *connection;     ///< Connection for outgoing messages.
+    qd_link_t             *in_link;        ///< Link for re-entering messages.
+    qd_link_t             *out_link;       ///< Link for exiting messages.
+    qd_address_t          *in_address;     ///< Address for re-entering messages.
+    qd_address_t          *out_address;    ///< Address for exiting messages.
+    bool                   connected;      ///< True if connected.
 };
 
 DEQ_DECLARE(qd_waypoint_t, qd_waypoint_list_t);

Modified: qpid/dispatch/trunk/src/server_private.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/server_private.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/server_private.h (original)
+++ qpid/dispatch/trunk/src/server_private.h Tue May  6 17:15:04 2014
@@ -53,6 +53,9 @@ typedef enum {
 } cxtr_state_t;
 
 
+/**
+ * Listener objects represent the desire to accept incoming transport connections.
+ */
 struct qd_listener_t {
     qd_server_t              *server;
     const qd_server_config_t *config;
@@ -61,6 +64,9 @@ struct qd_listener_t {
 };
 
 
+/**
+ * Connector objects represent the desire to create and maintain an outgoing transport connection.
+ */
 struct qd_connector_t {
     qd_server_t              *server;
     cxtr_state_t              state;
@@ -71,7 +77,9 @@ struct qd_connector_t {
     long                      delay;
 };
 
-
+/**
+ * Connection objects wrap Proton connection objects.
+ */
 struct qd_connection_t {
     DEQ_LINKS(qd_connection_t);
     qd_server_t     *server;

Modified: qpid/dispatch/trunk/src/waypoint_private.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/waypoint_private.h?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/waypoint_private.h (original)
+++ qpid/dispatch/trunk/src/waypoint_private.h Tue May  6 17:15:04 2014
@@ -23,8 +23,15 @@
 #include <qpid/dispatch/connection_manager.h>
 #include "dispatch_private.h"
 
+/**
+ * @file
+ * A waypoint is a point on a multi-phase route where messages can exit and re-enter the router.
+ * For example after being sent through an external broker's queue.
+ */
+
 void qd_waypoint_activate_all(qd_dispatch_t *qd);
 
+/** Called when the router opens a connector associated with this waypoint */
 void qd_waypoint_connection_opened(qd_dispatch_t *qd, qd_config_connector_t *cc, qd_connection_t *conn);
 
 void qd_waypoint_new_incoming_link(qd_dispatch_t *qd, qd_waypoint_t *wp, qd_link_t *link);

Modified: qpid/dispatch/trunk/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/CMakeLists.txt?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/tests/CMakeLists.txt Tue May  6 17:15:04 2014
@@ -55,6 +55,8 @@ add_test(router_tests          python ${
 
 set(SYSTEM_TEST_FILES system_tests_one_router.py system_tests_two_routers.py)
 
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_build.sh.in ${CMAKE_CURRENT_BINARY_DIR}/config_build.sh)
+
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-2/A-ssl.conf.in ${CMAKE_CURRENT_BINARY_DIR}/config-2/A-ssl.conf)
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-2/B-ssl.conf.in ${CMAKE_CURRENT_BINARY_DIR}/config-2/B-ssl.conf)
 

Copied: qpid/dispatch/trunk/tests/config_build.sh.in (from r1591389, qpid/dispatch/trunk/doc/api/dev.doxygen.in)
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/config_build.sh.in?p2=qpid/dispatch/trunk/tests/config_build.sh.in&p1=qpid/dispatch/trunk/doc/api/dev.doxygen.in&r1=1591389&r2=1592808&rev=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/api/dev.doxygen.in (original)
+++ qpid/dispatch/trunk/tests/config_build.sh.in Tue May  6 17:15:04 2014
@@ -17,7 +17,9 @@
 # under the License.
 #
 
-PROJECT_NAME           = "Dispatch"
-OUTPUT_DIRECTORY       = dev
-INPUT                  = ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src
-RECURSIVE              = yes
+# Configuration for running tests directly against the build in src (no need to install)
+export SOURCE_DIR=${CMAKE_SOURCE_DIR}
+export BUILD_DIR=${CMAKE_BINARY_DIR}
+
+export PYTHONPATH=$SOURCE_DIR/python/qpid_dispatch_internal:$SOURCE_DIR/tests:$PYTHONPATH
+export PATH=$BUILD_DIR:$BUILD_DIR/router:$SOURCE_DIR/bin:$PATH

Modified: qpid/dispatch/trunk/tests/system_test.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_test.py?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_test.py (original)
+++ qpid/dispatch/trunk/tests/system_test.py Tue May  6 17:15:04 2014
@@ -63,9 +63,6 @@ import proton
 from proton import Message, PENDING, ACCEPTED, REJECTED, RELEASED
 from copy import copy
 
-HOME=os.environ.get('QPID_DISPATCH_HOME')
-assert HOME, "QPID_DISPATCH_HOME not defined"
-
 def retry_delay(deadline, timeout, delay, max_delay):
     """For internal use in retry. Sleep as required
     and return the new delay or None if retry should time out"""
@@ -140,10 +137,6 @@ class Process(subprocess.Popen):
 
     def assert_running(self): assert self.poll() is None, "%s exited"%name
 
-    def __del__(self):
-        subprocess.Popen.__del__(self)
-        self.teardown()
-
     def teardown(self):
         if self.torndown: return
         self.torndown = True
@@ -180,8 +173,10 @@ class Qdrouterd(Process):
         Fills in some default values automatically, see Qdrouterd.DEFAULTS
         """
 
-        DEFAULTS = {'listener':{'sasl-mechanisms':'ANONYMOUS'},
-                    'connector':{'sasl-mechanisms':'ANONYMOUS','role':'on-demand'}}
+        DEFAULTS = {
+            'listener':{'sasl-mechanisms':'ANONYMOUS'},
+            'connector':{'sasl-mechanisms':'ANONYMOUS','role':'on-demand'}
+        }
 
         def sections(self, name):
             """Return list of sections named name"""
@@ -212,7 +207,7 @@ class Qdrouterd(Process):
     @property
     def addresses(self):
         """Return host:port addresses for all listeners"""
-        return [ "%s:%s"%(l['addr'],l['port']) for l in self.config.sections('listener') ]
+        return [ "amqp://%s:%s"%(l['addr'],l['port']) for l in self.config.sections('listener') ]
 
     @property
     def address(self):
@@ -255,10 +250,14 @@ class Qpidd(Process):
 class Messenger(proton.Messenger):
     """Minor additions to Messenger for tests"""
 
+    def flush(self):
+        """Call work() till there is no work left."""
+        while self.work(0.01): pass
+
     def subscribe(self, source):
         """proton.Messenger.subscribe and work till subscription is visible."""
         t = proton.Messenger.subscribe(self, source)
-        while self.work(0.01): pass
+        self.flush()
         return t
 
 class TestCase(unittest.TestCase):
@@ -308,10 +307,10 @@ class TestCase(unittest.TestCase):
         """Return a Qpidd that will be cleaned up on teardown"""
         return self.cleanup(Qpidd(*args, **kwargs))
 
-    def messenger(self, name="test-messenger"):
+    def messenger(self, name="test-messenger", timeout=1):
         """Return a started Messenger that will be cleaned up on teardown."""
         m = Messenger(name)
-        m.timeout = 1
+        m.timeout = timeout
         m.start()
         self.cleanup(m)
         return m

Modified: qpid/dispatch/trunk/tests/system_tests_broker.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_broker.py?rev=1592808&r1=1592807&r2=1592808&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_tests_broker.py (original)
+++ qpid/dispatch/trunk/tests/system_tests_broker.py Tue May  6 17:15:04 2014
@@ -53,37 +53,31 @@ class BrokerSystemTest(TestCase):
             ('listener', {'addr':'0.0.0.0', 'port':self.get_port()}),
             ('connector', {'name':'qpidd0', 'addr':'localhost', 'port':qpidd[0].port}),
             ('connector', {'name':'qpidd1', 'addr':'localhost', 'port':qpidd[1].port}),
-            ('waypoint', {'name':testq, 'in-phase':0, 'out-phase':1, 'connector':'qpidd0'})
+            ('fixed-address', {'prefix':'/testme/', 'fanout':'multiple'}),
+            ('waypoint', {'name':testq, 'out-phase':1, 'connector':'qpidd0'})
         ])
         router = self.qdrouterd('router0', router_conf)
 
         # Wait for broker & router to be ready
         wait_ports([q.port for q in qpidd] + router.ports)
 
-        # FIXME aconway 2014-03-27: smoke test for qpidd
+        # Smoke test for qpidd
         qc = self.cleanup(qm.Connection.establish(qpidd[0].address))
         qc.session().sender(testq+";{create:always}").send("a")
         qr = qc.session().receiver(testq)
         self.assertEqual(qr.fetch(1).content, "a")
 
-        # FIXME aconway 2014-03-28: smoke test for dispatch routing via queue
-        qaddr = router.addresses[0]+"/"+testq
-        m = self.message(address=qaddr, body="b")
-        mr = self.messenger()
-        mr.put(m)
-        mr.send()
-
-        # FIXME aconway 2014-03-28: check direct on broker
-        self.assertEqual(qc.session().receiver(testq).fetch(timeout=1).content, "b")
-        #self.assertEqual(sq.receiver(testq).fetch(timeout=1).content, "FOO")
-
-        # FIXME aconway 2014-03-28: subscribing first overshadows the waypoint?
-        m2 = self.messenger()
-        m2.subscribe(qaddr)
-        time.sleep(1)
-        m = Message()
+        # Smoke test for dispatch.
+        addr = router.addresses[0]+"/xxx/1"
+        m1, m2 = self.messenger(), self.messenger()
+        m2.subscribe(addr)
+        m1.put(self.message(address=addr, body="b"))
+        m1.send()
+        msg = Message()
         m2.recv(1)
-        m2.get(m)
-        self.assertEqual(m.body, "b")
+        m2.get(msg)
+        self.assertEqual(msg.body, "b")
+
+        # FIXME aconway 2014-05-05: test for waypoint routing via queue
 
 if __name__ == '__main__': unittest.main()



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