You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2018/09/18 15:51:18 UTC

qpid-dispatch git commit: DISPATCH-1123 - Added first draft of the API header for in-core link endpoints.

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 92f00baf6 -> 6a56c1efa


DISPATCH-1123 - Added first draft of the API header for in-core link endpoints.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/6a56c1ef
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/6a56c1ef
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/6a56c1ef

Branch: refs/heads/master
Commit: 6a56c1efa2be71836b137e5d494b3a284de9b01a
Parents: 92f00ba
Author: Ted Ross <tr...@redhat.com>
Authored: Tue Sep 18 11:50:32 2018 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Tue Sep 18 11:50:32 2018 -0400

----------------------------------------------------------------------
 src/router_core/core_link_endpoint.h | 90 +++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6a56c1ef/src/router_core/core_link_endpoint.h
----------------------------------------------------------------------
diff --git a/src/router_core/core_link_endpoint.h b/src/router_core/core_link_endpoint.h
new file mode 100644
index 0000000..114a95c
--- /dev/null
+++ b/src/router_core/core_link_endpoint.h
@@ -0,0 +1,90 @@
+/*
+ * 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.
+ */
+
+#ifndef qd_router_core_endpoint_types
+#define qd_router_core_endpoint_types 1
+
+typedef struct qdrc_endpoint_t qdrc_endpoint_t;
+
+#endif
+
+
+
+#ifndef qd_router_core_endpoint
+#define qd_router_core_endpoint 1
+
+#include "router_core_private.h"
+
+typedef bool (*qdrc_first_attach_t) (void             *bind_context,
+                                     qdrc_endpoint_t  *endpoint,
+                                     void            **link_context,
+                                     qdr_error_t     **error);
+
+typedef bool (*qdrc_second_attach_t) (void *link_context);
+
+typedef void (*qdrc_flow_t) (void *link_context,
+                             int   available_credit,
+                             int   available_window);
+
+typedef void (*qdrc_update_t) (void           *link_context,
+                               qdr_delivery_t *delivery);
+
+typedef void (*qdrc_transfer_t) (void           *link_context,
+                                 qdr_delivery_t *delivery;
+                                 qd_message_t   *message);
+
+typedef void (*qdrc_detach_t) (void        *link_context,
+                               qdr_error_t *error);
+
+
+typedef struct qdrc_endpoint_descriptor_t {
+    qdrc_first_attach_t   on_first_attach;
+    qdrc_second_attach_t  on_second_attach;
+    qdrc_flow_t           on_flow;
+    qdrc_update_t         on_update;
+    qdrc_transfer_t       on_transfer;
+    qdrc_detach_t         on_detach;
+} qdrc_endpoint_descriptor_t;
+
+
+void qdrc_endpoint_bind_mobile_address(qdr_core_t                 *core,
+                                       const char                 *address,
+                                       int                         phase,
+                                       qdrc_endpoint_descriptor_t *descriptor,
+                                       void                       *bind_context);
+
+
+qdrc_endpoint_t *qdrc_endpoint_create_link(qdr_core_t                 *core,
+                                           qd_direction_t              dir,
+                                           qdr_terminus_t             *source,
+                                           qdr_terminus_t             *target,
+                                           qdrc_endpoint_descriptor_t *descriptor,
+                                           void                       *link_context);
+
+qd_direction_t qdrc_endpoint_get_direction(const qdrc_endpoint_t *endpoint);
+
+void qdrc_endpoint_flow(qdrc_endpoint_t *endpoint, int credit_added);
+
+void qdrc_endpoint_send(qdrc_endpoint_t *endpoint, qdr_delivery_t *delivery);
+
+void qdrc_endpoint_update(qdrc_endpoint_t *endpoint, qdr_delivery_t *delivery);
+
+void qdrc_endpoint_detach(qdrc_endpoint_t *endpoint, qdr_error_t *error);
+
+#endif


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