summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-07-04 18:16:53 +0200
committermannol <eniz_vukovic@hotmail.com>2014-07-04 18:16:53 +0200
commit94b9dfdfbf647b058e909ee86a5f74539ae25078 (patch)
tree5fa0daf35a89181b00042e50e08b1e948c7108a7 /toxav/toxav.c
parentdb88e7de618cda73a602cda150040e65642819ab (diff)
Added getter for current call status
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index 743d7fcf..108c36eb 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -797,8 +797,6 @@ int toxav_get_peer_transmission_type ( ToxAv *av, int32_t call_index, int peer )
797 */ 797 */
798int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer ) 798int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer )
799{ 799{
800 assert(av->msi_session);
801
802 if ( peer < 0 || cii(call_index, av->msi_session) || !av->msi_session->calls[call_index] 800 if ( peer < 0 || cii(call_index, av->msi_session) || !av->msi_session->calls[call_index]
803 || av->msi_session->calls[call_index]->peer_count <= peer ) 801 || av->msi_session->calls[call_index]->peer_count <= peer )
804 return ErrorInternal; 802 return ErrorInternal;
@@ -807,6 +805,23 @@ int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer )
807} 805}
808 806
809/** 807/**
808 * @brief Get id of peer participating in conversation
809 *
810 * @param av Handler
811 * @param peer peer index
812 * @return int
813 * @retval ToxAvError No peer id
814 */
815ToxAvCallState toxav_get_call_state(ToxAv* av, int32_t call_index)
816{
817 if ( cii(call_index, av->msi_session) || !av->msi_session->calls[call_index] )
818 return av_CallNonExistant;
819
820 return av->msi_session->calls[call_index]->state;
821
822}
823
824/**
810 * @brief Is certain capability supported 825 * @brief Is certain capability supported
811 * 826 *
812 * @param av Handler 827 * @param av Handler