LocusControllerNotificationAdapter(locusController: locusController) - fanglinliu/fanglinliu.github.io GitHub Wiki

+ (NSDictionary *)notificationNames {
    DISPATCH_ONCE_SINGLETON((^{
        return @{LocusControllerCallDidBecomeLiveNotification: [NSValue valueWithPointer:@selector(onCallDidBecomeLive:)],
                 LocusControllerCallDidEndNotification: [NSValue valueWithPointer:@selector(onCallDidEnd:)],
                 LocusControllerCallDidTimeOutNotification: [NSValue valueWithPointer:@selector(onCallDidTimeOut:)],
                 LocusControllerCallWillEndNotification: [NSValue valueWithPointer:@selector(onCallWillEnd:)],
                 LocusControllerDidJoinCallForConversationNotification: [NSValue valueWithPointer:@selector(onDidJoinCallForConversation:)],
                 LocusControllerDidUpdateLyraSpaceCallNotification: [NSValue valueWithPointer:@selector(onDidUpdateLyraSpaceCall:)],
                 LocusControllerParticipantDidDeclineNotification: [NSValue valueWithPointer:@selector(onParticipantDidDecline:)],
                 LocusControllerParticipantDidJoinNotification: [NSValue valueWithPointer:@selector(onParticipantDidJoin:)],
                 LocusControllerParticipantDidLeaveNotification: [NSValue valueWithPointer:@selector(onParticipantDidLeave:)],
                 LocusControllerParticipantWasRemovedNotification: [NSValue valueWithPointer:@selector(onParticipantWasRemoved:)],
                 LocusControllerParticipantDidMuteAudioNotification: [NSValue valueWithPointer:@selector(onParticipantDidMuteAudio:)],
                 LocusControllerParticipantDidUnmuteAudioNotification: [NSValue valueWithPointer:@selector(onParticipantDidUnmuteAudio:)],
                 LocusControllerParticipantDidChangeModeratorNotification: [NSValue valueWithPointer:@selector(onParticipantDidChangeModerator:)],
                 LocusControllerParticipantAudioStatusDidChangeNotification: [NSValue valueWithPointer:@selector(onParticipantAudioStatusDidChange:)],
                 LocusControllerParticipantDidChangeAvatarNotification: [NSValue valueWithPointer:@selector(onParticipantDidChangeAvatar:)],
                 LocusControllerParticipantDidChangeLobbyStateNotification: [NSValue valueWithPointer:@selector(onParticipantDidChangeLobbyState:)],
                 LocusControllerDidStartDialingNotification: [NSValue valueWithPointer:@selector(onDidStartDialing:)],
                 LocusControllerDidStartRingingNotification: [NSValue valueWithPointer:@selector(onDidStartRinging:)],
                 LocusControllerMediaShareFloorContentGrantedNotification: [NSValue valueWithPointer:@selector(onMediaShareFloorContentGranted:)],
                 LocusControllerMediaShareFloorContentReleasedNotification: [NSValue valueWithPointer:@selector(onMediaShareFloorContentReleased:)],
                 };
    }));
}


        if let adapter = LocusControllerNotificationAdapter(locusController: locusController) {
            adapter.delegate = self
            self.notificationAdapter = adapter
        }