void cb_nice_recv(NiceAgent* agent, guint stream_id, guint component_id, guint len, gchar* buf, gpointer user_data) { NiceConnection* nicecon = (NiceConnection*) user_data; nicecon->getNiceListener()->onNiceData(component_id, reinterpret_cast<char*> (buf), static_cast<unsigned int> (len), (NiceConnection*) user_data); }
void cb_nice_recv(NiceAgent* agent, guint stream_id, guint component_id, guint len, gchar* buf, gpointer user_data) { if (user_data==NULL||len==0)return; NiceConnection* nicecon = (NiceConnection*) user_data; nicecon->queueData(component_id, reinterpret_cast<char*> (buf), static_cast<unsigned int> (len)); }
void cb_component_state_changed(NiceAgent *agent, guint stream_id, guint component_id, guint state, gpointer user_data) { if (state == NICE_COMPONENT_STATE_CONNECTED) { } else if (state == NICE_COMPONENT_STATE_FAILED) { NiceConnection *conn = reinterpret_cast<NiceConnection*>(user_data); conn->updateComponentState(component_id, NICE_FAILED); } }
void cb_component_state_changed(NiceAgent *agent, guint stream_id, guint component_id, guint state, gpointer user_data) { if (state == NICE_COMPONENT_STATE_READY) { NiceConnection *conn = (NiceConnection*) user_data; conn->updateComponentState(component_id, NICE_READY); } else if (state == NICE_COMPONENT_STATE_FAILED) { NiceConnection *conn = (NiceConnection*) user_data; conn->updateIceState(NICE_FAILED); } }
void cb_new_selected_pair(NiceAgent *agent, guint stream_id, guint component_id, gchar *lfoundation, gchar *rfoundation, gpointer user_data) { NiceConnection *conn = (NiceConnection*) user_data; conn->updateComponentState(component_id, NICE_READY); }
void cb_candidate_gathering_done(NiceAgent *agent, guint stream_id, gpointer user_data) { NiceConnection *conn = (NiceConnection*) user_data; conn->gatheringDone(stream_id); }
void cb_candidate_gathering_done(NiceAgent *agent, guint stream_id, gpointer user_data) { NiceConnection *conn = reinterpret_cast<NiceConnection*>(user_data); conn->gatheringDone(stream_id); }
void cb_new_candidate(NiceAgent *agent, guint stream_id, guint component_id, gchar *foundation, gpointer user_data) { NiceConnection *conn = reinterpret_cast<NiceConnection*>(user_data); std::string found(foundation); conn->getCandidate(stream_id, component_id, found); }