summaryrefslogtreecommitdiff
path: root/navit/traffic.h
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2018-01-03 20:23:54 +0100
committermvglasow <michael -at- vonglasow.com>2018-01-03 20:23:54 +0100
commitb22ff8e07c6620c8fb81f284259fc97e9484c138 (patch)
treed2282f49348240ad2040974fabca9b90864bea8d /navit/traffic.h
parent308ffec3ec5f63747ff61d4e6b60d4dc5a192270 (diff)
downloadnavit-b22ff8e07c6620c8fb81f284259fc97e9484c138.tar.gz
Add:traffic:Map provider (does not work yet)
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/traffic.h')
-rw-r--r--navit/traffic.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/navit/traffic.h b/navit/traffic.h
index 6849b2def..517f1bd20 100644
--- a/navit/traffic.h
+++ b/navit/traffic.h
@@ -210,9 +210,8 @@ enum si_type {
si_vehicle_with_trailer, /*!< For vehicles with trailers only */
};
-// TODO do we need priv members for structs?
-
struct traffic_priv;
+struct traffic_message_priv;
/**
* @brief Holds all functions a traffic plugin has to implement to be usable
@@ -382,6 +381,7 @@ struct traffic_message {
struct traffic_location * location; /*!< The location to which this message refers. */
int event_count; /*!< The number of events in {@code events}. */
struct traffic_event ** events; /*!< Points to an array of pointers to the events for this message. */
+ struct traffic_message_priv * priv; /*!< Internal data, not exposed via the API */
};
struct map;
@@ -731,6 +731,18 @@ struct traffic_event * traffic_message_get_event(struct traffic_message * this_,
void traffic_init(void);
/**
+ * @brief Returns the map for the traffic plugin.
+ *
+ * The map is created by the first traffic plugin loaded. If multiple traffic plugin instances are
+ * active at the same time, they share the map created by the first instance.
+ *
+ * @param this_ The traffic plugin instance
+ *
+ * @return The traffic map
+ */
+struct map * traffic_get_map(struct traffic *this_);
+
+/**
* @brief Sets the mapset for the traffic plugin.
*
* This sets the mapset from which the segments affected by a traffic report will be retrieved.