candidate->stream_id, candidate->component_id, candidate->foundation);
}
-static const gchar *
-component_state_to_string (NiceComponentState state)
+NICEAPI_EXPORT const gchar *
+nice_component_state_to_string (NiceComponentState state)
{
switch (state)
{
if (agent->reliable && component->tcp == NULL &&
state != NICE_COMPONENT_STATE_FAILED) {
- nice_debug ("Agent %p: not changing component state for s%d:%d to %d "
+ nice_debug ("Agent %p: not changing component state for s%d:%d to %s "
"because pseudo tcp socket does not exist in reliable mode", agent,
- stream->id, component->id, state);
+ stream->id, component->id, nice_component_state_to_string (state));
return;
}
if (component->state != state && state < NICE_COMPONENT_STATE_LAST) {
nice_debug ("Agent %p : stream %u component %u STATE-CHANGE %s -> %s.", agent,
- stream_id, component_id, component_state_to_string (component->state),
- component_state_to_string (state));
+ stream_id, component_id, nice_component_state_to_string (component->state),
+ nice_component_state_to_string (state));
component->state = state;
guint stream_id,
guint component_id);
+/**
+ * nice_component_state_to_string:
+ * @state: a #NiceComponentState
+ *
+ * Returns a string representation of the state, generally to use in debug
+ * messages.
+ *
+ * Returns: (transfer none): a string representation of @state
+ * Since: UNRELEASED
+ */
+const gchar *
+nice_component_state_to_string (NiceComponentState state);
+
G_END_DECLS
#endif /* _AGENT_H */