[
https://issues.apache.org/jira/browse/DISPATCH-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14734864#comment-14734864
]
ASF GitHub Bot commented on DISPATCH-161:
-----------------------------------------
Github user ted-ross commented on a diff in the pull request:
https://github.com/apache/qpid-dispatch/pull/8#discussion_r38930178
--- Diff: include/qpid/dispatch/annotation.h ---
@@ -0,0 +1,109 @@
+#ifndef __dispatch_annotation_h__
+#define __dispatch_annotation_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.
+ */
+
+#include <qpid/dispatch/router.h>
+
+/**
+ * Retrieve the message annotations from a message.
+ *
+ * IMPORTANT: The pointer returned by this function remains owned by the
message.
+ * The caller MUST NOT free the parsed field.
+ *
+ * @param msg Pointer to a received message.
+ * @return Pointer to the parsed field for the message annotations. If
the message doesn't
+ * have message annotations, the return value shall be NULL.
+ */
+
+qd_parsed_field_t *qd_message_message_annotations(qd_message_t *msg);
+
+/**
+ * Annotates the message with dispatch router annotations.
+ *
+ * IMPORTANT: The inbound annotations are stripped if
strip_inbound_annotations is true.
+ *
+ * @param qd_router_t Pointer to the router.
+ * @param qd_parsed_field_t Pointer to the message annotation.
+ * @param qd_message_t Pointer to the message.
+ * @param drop Pointer indicating if the message has to be dropped in case
of message looping.
+ * @param to_override Override address.
+ * @param node_id Pointer to the node id of the router.
+ * @param strip_inbound_annotations boolean indicating if the in bound
annotations must be stripped.
+ * @return - the iterator to the ingress field annotation if it was present
+ *
+ */
+qd_field_iterator_t *router_annotate_message(qd_router_t *router,
--- End diff --
Now that this is a public function, it should have a name that starts with
"qd_".
> Move all annotation related functions into annotation.h with corresponding
> implementation in annotation.c
> ---------------------------------------------------------------------------------------------------------
>
> Key: DISPATCH-161
> URL: https://issues.apache.org/jira/browse/DISPATCH-161
> Project: Qpid Dispatch
> Issue Type: Improvement
> Components: Routing Engine
> Affects Versions: 0.4
> Reporter: Ganesh Murthy
> Assignee: Ganesh Murthy
> Priority: Trivial
>
> Qpid dispatch file src/message.c and other files contain a bunch of message
> and delivery annotation related functions. Move the functions into its own
> unit in annotation.c and corresponding header file annotation.h
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]