Saúl Ibarra Corretgé ea22d12581 [Android] Introduce IncomingCallView
It's a separate view (on the native side) and app (on the JavaScript side) so
applications can use it independently.

Co-authored-by: Shuai Li <sli@atlassian.com>
Co-authored-by: Pawel Domas <pawel.domas@jitsi.org>
2018-07-18 22:47:18 -05:00

50 lines
856 B
JavaScript

// @flow
import {
INCOMING_CALL_ANSWERED,
INCOMING_CALL_DECLINED,
INCOMING_CALL_RECEIVED
} from './actionTypes';
/**
* Answers a received incoming call.
*
* @returns {{
* type: INCOMING_CALL_ANSWERED
* }}
*/
export function incomingCallAnswered() {
return {
type: INCOMING_CALL_ANSWERED
};
}
/**
* Declines a received incoming call.
*
* @returns {{
* type: INCOMING_CALL_DECLINED
* }}
*/
export function incomingCallDeclined() {
return {
type: INCOMING_CALL_DECLINED
};
}
/**
* Shows a received incoming call.
*
* @param {Object} caller - The caller of an incoming call.
* @returns {{
* type: INCOMING_CALL_RECEIVED,
* caller: Object
* }}
*/
export function incomingCallReceived(caller: Object) {
return {
type: INCOMING_CALL_RECEIVED,
caller
};
}