summaryrefslogtreecommitdiff
path: root/navit/traffic.h
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2018-08-15 22:53:38 +0200
committermvglasow <michael -at- vonglasow.com>2018-08-15 22:56:29 +0200
commit41775035e69d7eddf8539b9b65cbb0273a1aba3d (patch)
tree59d549b48ba922dbd2c7236ab5a448e391adfe8e /navit/traffic.h
parent857d45434d2d93781c4b185fcb9e47e2bbb58113 (diff)
downloadnavit-41775035e69d7eddf8539b9b65cbb0273a1aba3d.tar.gz
Add:traffic:API function to return all items associated with a message
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/traffic.h')
-rw-r--r--navit/traffic.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/navit/traffic.h b/navit/traffic.h
index 5298b888e..494250001 100644
--- a/navit/traffic.h
+++ b/navit/traffic.h
@@ -883,6 +883,20 @@ void traffic_message_add_event(struct traffic_message * this_, struct traffic_ev
struct traffic_event * traffic_message_get_event(struct traffic_message * this_, int index);
/**
+ * @brief Returns the items associated with a message.
+ *
+ * Note that no map rectangle is required to obtain traffic items. This behavior is particular to traffic items, which
+ * do not rely on a map rectangle. Items obtained from other maps may behave differently.
+ *
+ * @param this_ The message
+ *
+ * @return Items as a NULL-terminated array. The caller is responsible for freeing the array (not its elements) when it
+ * is no longer needed. This method will always return a valid pointer—if no items are associated with the message, an
+ * empty array (with just one single NULL element) will be returned. No particular order is guaranteed for the items.
+ */
+struct item ** traffic_message_get_items(struct traffic_message * this_);
+
+/**
* @brief Initializes the traffic plugin.
*
* This function is called once on startup.