Beispiel #1
0
        private void CallRequestReceivedHandler(object sender, ToxAvEventArgs.CallRequestEventArgs e)
        {
            // Automatically decline call request if we have an ongoing call.
            // TODO: Instead of this, tell the user about the situation and let him/her decide if he/she want to hang up the current call and answer the new one!
            if (_friendInCall != -1)
            {
                _toxAv.SendControl(e.FriendNumber, ToxAvCallControl.Cancel);
                return;
            }

            _friendInCall = e.FriendNumber;

            CallRequestReceived?.Invoke(this, e);
        }
Beispiel #2
0
 public void NotifyCallRequest(Guid senderId)
 {
     CallRequestReceived?.Invoke(this, new MyEventArgs {
         SenderId = senderId
     });
 }