make public protocol method implementations public

responding to CR

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent f6e6e6b787
commit 1ed39976ee

@ -18,7 +18,7 @@ class NonCallKitCallUIAdaptee: CallUIAdaptee {
self.notificationsAdapter = notificationsAdapter self.notificationsAdapter = notificationsAdapter
} }
internal func startOutgoingCall(_ call: SignalCall) { func startOutgoingCall(_ call: SignalCall) {
CallService.signalingQueue.async { CallService.signalingQueue.async {
_ = self.callService.handleOutgoingCall(call).then { _ = self.callService.handleOutgoingCall(call).then {
Logger.debug("\(self.TAG) handleOutgoingCall succeeded") Logger.debug("\(self.TAG) handleOutgoingCall succeeded")
@ -28,7 +28,7 @@ class NonCallKitCallUIAdaptee: CallUIAdaptee {
} }
} }
internal func reportIncomingCall(_ call: SignalCall, callerName: String) { func reportIncomingCall(_ call: SignalCall, callerName: String) {
Logger.debug("\(TAG) \(#function)") Logger.debug("\(TAG) \(#function)")
// present Call View controller // present Call View controller
@ -43,29 +43,29 @@ class NonCallKitCallUIAdaptee: CallUIAdaptee {
} }
} }
internal func reportMissedCall(_ call: SignalCall, callerName: String) { func reportMissedCall(_ call: SignalCall, callerName: String) {
notificationsAdapter.presentMissedCall(call, callerName: callerName) notificationsAdapter.presentMissedCall(call, callerName: callerName)
} }
internal func answerCall(_ call: SignalCall) { func answerCall(_ call: SignalCall) {
CallService.signalingQueue.async { CallService.signalingQueue.async {
self.callService.handleAnswerCall(call) self.callService.handleAnswerCall(call)
} }
} }
internal func declineCall(_ call: SignalCall) { func declineCall(_ call: SignalCall) {
CallService.signalingQueue.async { CallService.signalingQueue.async {
self.callService.handleDeclineCall(call) self.callService.handleDeclineCall(call)
} }
} }
internal func endCall(_ call: SignalCall) { func endCall(_ call: SignalCall) {
CallService.signalingQueue.async { CallService.signalingQueue.async {
self.callService.handleLocalHungupCall(call) self.callService.handleLocalHungupCall(call)
} }
} }
internal func toggleMute(call: SignalCall, isMuted: Bool) { func toggleMute(call: SignalCall, isMuted: Bool) {
CallService.signalingQueue.async { CallService.signalingQueue.async {
self.callService.handleToggledMute(isMuted: isMuted) self.callService.handleToggledMute(isMuted: isMuted)
} }

@ -55,14 +55,14 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
// MARK: CallUIAdaptee // MARK: CallUIAdaptee
internal func startOutgoingCall(_ call: SignalCall) { func startOutgoingCall(_ call: SignalCall) {
// Add the new outgoing call to the app's list of calls. // Add the new outgoing call to the app's list of calls.
// So we can find it in the provider delegate callbacks. // So we can find it in the provider delegate callbacks.
callManager.addCall(call) callManager.addCall(call)
callManager.startCall(call) callManager.startCall(call)
} }
internal func reportIncomingCall(_ call: SignalCall, callerName: String) { func reportIncomingCall(_ call: SignalCall, callerName: String) {
// Construct a CXCallUpdate describing the incoming call, including the caller. // Construct a CXCallUpdate describing the incoming call, including the caller.
let update = CXCallUpdate() let update = CXCallUpdate()
update.remoteHandle = CXHandle(type: .phoneNumber, value: call.remotePhoneNumber) update.remoteHandle = CXHandle(type: .phoneNumber, value: call.remotePhoneNumber)
@ -83,19 +83,19 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
} }
} }
internal func answerCall(_ call: SignalCall) { func answerCall(_ call: SignalCall) {
callManager.answer(call: call) callManager.answer(call: call)
} }
internal func declineCall(_ call: SignalCall) { func declineCall(_ call: SignalCall) {
callManager.end(call: call) callManager.end(call: call)
} }
internal func endCall(_ call: SignalCall) { func endCall(_ call: SignalCall) {
callManager.end(call: call) callManager.end(call: call)
} }
internal func toggleMute(call: SignalCall, isMuted: Bool) { func toggleMute(call: SignalCall, isMuted: Bool) {
callManager.toggleMute(call: call, isMuted: isMuted) callManager.toggleMute(call: call, isMuted: isMuted)
} }

@ -44,7 +44,7 @@ class CallUIAdapter {
if Platform.isSimulator { if Platform.isSimulator {
// CallKit doesn't seem entirely supported in simulator. // CallKit doesn't seem entirely supported in simulator.
// e.g. you can't receive calls in the call screen. // e.g. you can't receive calls in the call screen.
// So we use the non-call kit call UI. // So we use the non-CallKit call UI.
Logger.info("\(TAG) choosing non-callkit adaptee for simulator.") Logger.info("\(TAG) choosing non-callkit adaptee for simulator.")
adaptee = NonCallKitCallUIAdaptee(callService: callService, notificationsAdapter: notificationsAdapter) adaptee = NonCallKitCallUIAdaptee(callService: callService, notificationsAdapter: notificationsAdapter)
} else if #available(iOS 10.0, *) { } else if #available(iOS 10.0, *) {

@ -5,6 +5,7 @@ import Foundation
import WebRTC import WebRTC
import PromiseKit import PromiseKit
// TODO move this somewhere else.
@objc class CallAudioService: NSObject { @objc class CallAudioService: NSObject {
private let TAG = "[CallAudioService]" private let TAG = "[CallAudioService]"
private var vibrateTimer: Timer? private var vibrateTimer: Timer?

Loading…
Cancel
Save