diff options
| author | Ted Ross <tross@apache.org> | 2013-05-30 20:48:58 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2013-05-30 20:48:58 +0000 |
| commit | 9f74e0656883c492eb17aab5433315338c0fe2ca (patch) | |
| tree | 070638d005091444857e7b071f45c01ee743f704 | |
| parent | e9b7c10df3d3c17a02c68226553ec435fac51862 (diff) | |
| download | qpid-python-9f74e0656883c492eb17aab5433315338c0fe2ca.tar.gz | |
NO-JIRA - Cleaned up include files to prevent redefining typedefs.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1488003 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | qpid/extras/dispatch/include/qpid/dispatch.h | 34 | ||||
| -rw-r--r-- | qpid/extras/dispatch/include/qpid/dispatch/agent.h | 3 | ||||
| -rw-r--r-- | qpid/extras/dispatch/include/qpid/dispatch/container.h | 3 | ||||
| -rw-r--r-- | qpid/extras/dispatch/include/qpid/dispatch/dispatch.h | 55 | ||||
| -rw-r--r-- | qpid/extras/dispatch/include/qpid/dispatch/router.h | 6 | ||||
| -rw-r--r-- | qpid/extras/dispatch/include/qpid/dispatch/server.h | 3 | ||||
| -rw-r--r-- | qpid/extras/dispatch/include/qpid/dispatch/timer.h | 3 | ||||
| -rw-r--r-- | qpid/extras/dispatch/include/qpid/dispatch/user_fd.h | 1 | ||||
| -rw-r--r-- | qpid/extras/dispatch/src/agent.c | 4 | ||||
| -rw-r--r-- | qpid/extras/dispatch/src/container.c | 2 | ||||
| -rw-r--r-- | qpid/extras/dispatch/src/dispatch_private.h | 3 |
11 files changed, 68 insertions, 49 deletions
diff --git a/qpid/extras/dispatch/include/qpid/dispatch.h b/qpid/extras/dispatch/include/qpid/dispatch.h index 7b306631f3..ed8499ff37 100644 --- a/qpid/extras/dispatch/include/qpid/dispatch.h +++ b/qpid/extras/dispatch/include/qpid/dispatch.h @@ -34,38 +34,6 @@ #include <qpid/dispatch/message.h> #include <qpid/dispatch/container.h> #include <qpid/dispatch/agent.h> - -/** - * \defgroup General Dispatch Definitions - * @{ - */ - -typedef struct dx_dispatch_t dx_dispatch_t; - -/** - * \brief Initialize the Dispatch library and prepare it for operation. - * - * @param thread_count The number of worker threads (1 or more) that the server shall create - * @param container_name The name of the container. If NULL, a UUID will be generated. - * @param router_area The name of the router's area. If NULL, a default value will be supplied. - * @param router_id The identifying name of the router. If NULL, it will be set the same as the - * container_name. - * @return A handle to be used in API calls for this instance. - */ -dx_dispatch_t *dx_dispatch(int thread_count, const char *container_name, - const char *router_area, const char *router_id); - - -/** - * \brief Finalize the Dispatch library after it has stopped running. - * - * @param dispatch The dispatch handle returned by dx_dispatch - */ -void dx_dispatch_free(dx_dispatch_t *dispatch); - - -/** - * @} - */ +#include <qpid/dispatch/dispatch.h> #endif diff --git a/qpid/extras/dispatch/include/qpid/dispatch/agent.h b/qpid/extras/dispatch/include/qpid/dispatch/agent.h index b3ce2af34a..fb2279049f 100644 --- a/qpid/extras/dispatch/include/qpid/dispatch/agent.h +++ b/qpid/extras/dispatch/include/qpid/dispatch/agent.h @@ -19,12 +19,11 @@ * under the License. */ +#include <qpid/dispatch/dispatch.h> #include <stddef.h> #include <stdbool.h> #include <stdint.h> -typedef struct dx_dispatch_t dx_dispatch_t; - /** * \defgroup Container Management Agent * @{ diff --git a/qpid/extras/dispatch/include/qpid/dispatch/container.h b/qpid/extras/dispatch/include/qpid/dispatch/container.h index 68d822422f..18661d1a71 100644 --- a/qpid/extras/dispatch/include/qpid/dispatch/container.h +++ b/qpid/extras/dispatch/include/qpid/dispatch/container.h @@ -20,12 +20,11 @@ */ #include <proton/engine.h> +#include <qpid/dispatch/dispatch.h> #include <qpid/dispatch/server.h> #include <qpid/dispatch/alloc.h> #include <qpid/dispatch/ctools.h> -typedef struct dx_dispatch_t dx_dispatch_t; - typedef uint8_t dx_dist_mode_t; #define DX_DIST_COPY 0x01 #define DX_DIST_MOVE 0x02 diff --git a/qpid/extras/dispatch/include/qpid/dispatch/dispatch.h b/qpid/extras/dispatch/include/qpid/dispatch/dispatch.h new file mode 100644 index 0000000000..d6c2832f6f --- /dev/null +++ b/qpid/extras/dispatch/include/qpid/dispatch/dispatch.h @@ -0,0 +1,55 @@ +#ifndef __dispatch_dispatch_h__ +#define __dispatch_dispatch_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. + */ + +/** + * \defgroup General Dispatch Definitions + * @{ + */ + +typedef struct dx_dispatch_t dx_dispatch_t; + +/** + * \brief Initialize the Dispatch library and prepare it for operation. + * + * @param thread_count The number of worker threads (1 or more) that the server shall create + * @param container_name The name of the container. If NULL, a UUID will be generated. + * @param router_area The name of the router's area. If NULL, a default value will be supplied. + * @param router_id The identifying name of the router. If NULL, it will be set the same as the + * container_name. + * @return A handle to be used in API calls for this instance. + */ +dx_dispatch_t *dx_dispatch(int thread_count, const char *container_name, + const char *router_area, const char *router_id); + + +/** + * \brief Finalize the Dispatch library after it has stopped running. + * + * @param dispatch The dispatch handle returned by dx_dispatch + */ +void dx_dispatch_free(dx_dispatch_t *dispatch); + + +/** + * @} + */ + +#endif diff --git a/qpid/extras/dispatch/include/qpid/dispatch/router.h b/qpid/extras/dispatch/include/qpid/dispatch/router.h index 58eb026775..681404fb68 100644 --- a/qpid/extras/dispatch/include/qpid/dispatch/router.h +++ b/qpid/extras/dispatch/include/qpid/dispatch/router.h @@ -19,11 +19,11 @@ * under the License. */ +#include <qpid/dispatch/dispatch.h> +#include <qpid/dispatch/message.h> #include <stdbool.h> -typedef struct dx_dispatch_t dx_dispatch_t; -typedef struct dx_message_t dx_message_t; -typedef struct dx_address_t dx_address_t; +typedef struct dx_address_t dx_address_t; typedef void (*dx_router_message_cb)(void *context, dx_message_t *msg); diff --git a/qpid/extras/dispatch/include/qpid/dispatch/server.h b/qpid/extras/dispatch/include/qpid/dispatch/server.h index 2328a710a8..7e2c56a7dc 100644 --- a/qpid/extras/dispatch/include/qpid/dispatch/server.h +++ b/qpid/extras/dispatch/include/qpid/dispatch/server.h @@ -19,10 +19,9 @@ * under the License. */ +#include <qpid/dispatch/dispatch.h> #include <proton/engine.h> -typedef struct dx_dispatch_t dx_dispatch_t; - /** * \defgroup Control Server Control Functions * @{ diff --git a/qpid/extras/dispatch/include/qpid/dispatch/timer.h b/qpid/extras/dispatch/include/qpid/dispatch/timer.h index 4d22484896..1e04351822 100644 --- a/qpid/extras/dispatch/include/qpid/dispatch/timer.h +++ b/qpid/extras/dispatch/include/qpid/dispatch/timer.h @@ -19,10 +19,9 @@ * under the License. */ +#include <qpid/dispatch/dispatch.h> #include <qpid/dispatch/server.h> -typedef struct dx_dispatch_t dx_dispatch_t; - /** * \defgroup Timer Server Timer Functions * @{ diff --git a/qpid/extras/dispatch/include/qpid/dispatch/user_fd.h b/qpid/extras/dispatch/include/qpid/dispatch/user_fd.h index 019196c0fb..2cd9627bd3 100644 --- a/qpid/extras/dispatch/include/qpid/dispatch/user_fd.h +++ b/qpid/extras/dispatch/include/qpid/dispatch/user_fd.h @@ -19,6 +19,7 @@ * under the License. */ +#include <qpid/dispatch/dispatch.h> #include <qpid/dispatch/server.h> /** diff --git a/qpid/extras/dispatch/src/agent.c b/qpid/extras/dispatch/src/agent.c index a120518f7c..1e4e34df3f 100644 --- a/qpid/extras/dispatch/src/agent.c +++ b/qpid/extras/dispatch/src/agent.c @@ -32,7 +32,7 @@ #include <string.h> #include <stdio.h> -typedef struct dx_agent_t { +struct dx_agent_t { dx_server_t *server; hash_t *class_hash; dx_message_list_t in_fifo; @@ -40,7 +40,7 @@ typedef struct dx_agent_t { sys_mutex_t *lock; dx_timer_t *timer; dx_address_t *address; -} dx_agent_t; +}; struct dx_agent_class_t { diff --git a/qpid/extras/dispatch/src/container.c b/qpid/extras/dispatch/src/container.c index 5a0f1b7eb2..b6cc92440d 100644 --- a/qpid/extras/dispatch/src/container.c +++ b/qpid/extras/dispatch/src/container.c @@ -34,8 +34,6 @@ static char *module="CONTAINER"; -typedef struct dx_container_t dx_container_t; - struct dx_node_t { dx_container_t *container; const dx_node_type_t *ntype; diff --git a/qpid/extras/dispatch/src/dispatch_private.h b/qpid/extras/dispatch/src/dispatch_private.h index 0e8d7aa826..699e3a2be4 100644 --- a/qpid/extras/dispatch/src/dispatch_private.h +++ b/qpid/extras/dispatch/src/dispatch_private.h @@ -19,7 +19,8 @@ * under the License. */ -typedef struct dx_server_t dx_server_t; +#include "server_private.h" + typedef struct dx_container_t dx_container_t; typedef struct dx_router_t dx_router_t; typedef struct dx_agent_t dx_agent_t; |
