mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge branch 'mannol1-master'
This commit is contained in:
commit
705fceb2e0
|
@ -795,8 +795,6 @@ int toxav_get_peer_transmission_type ( ToxAv *av, int32_t call_index, int peer )
|
|||
*/
|
||||
int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer )
|
||||
{
|
||||
assert(av->msi_session);
|
||||
|
||||
if ( peer < 0 || cii(call_index, av->msi_session) || !av->msi_session->calls[call_index]
|
||||
|| av->msi_session->calls[call_index]->peer_count <= peer )
|
||||
return ErrorInternal;
|
||||
|
@ -804,6 +802,23 @@ int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer )
|
|||
return av->msi_session->calls[call_index]->peers[peer];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get id of peer participating in conversation
|
||||
*
|
||||
* @param av Handler
|
||||
* @param peer peer index
|
||||
* @return int
|
||||
* @retval ToxAvError No peer id
|
||||
*/
|
||||
ToxAvCallState toxav_get_call_state(ToxAv *av, int32_t call_index)
|
||||
{
|
||||
if ( cii(call_index, av->msi_session) || !av->msi_session->calls[call_index] )
|
||||
return av_CallNonExistant;
|
||||
|
||||
return av->msi_session->calls[call_index]->state;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Is certain capability supported
|
||||
*
|
||||
|
|
|
@ -74,6 +74,15 @@ typedef enum {
|
|||
} ToxAvCallType;
|
||||
|
||||
|
||||
typedef enum {
|
||||
av_CallNonExistant = -1,
|
||||
av_CallInviting, /* when sending call invite */
|
||||
av_CallStarting, /* when getting call invite */
|
||||
av_CallActive,
|
||||
av_CallHold,
|
||||
av_CallHanged_up
|
||||
} ToxAvCallState;
|
||||
|
||||
/**
|
||||
* @brief Error indicators.
|
||||
*/
|
||||
|
@ -342,6 +351,15 @@ int toxav_get_peer_transmission_type ( ToxAv *av, int32_t call_index, int peer )
|
|||
*/
|
||||
int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer );
|
||||
|
||||
/**
|
||||
* @brief Get current call state
|
||||
*
|
||||
* @param av Handler
|
||||
* @param call_index What call
|
||||
* @return int
|
||||
* @retval ToxAvCallState State id
|
||||
*/
|
||||
ToxAvCallState toxav_get_call_state ( ToxAv *av, int32_t call_index );
|
||||
/**
|
||||
* @brief Is certain capability supported
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user