Example #1
0
 public AuthenticateVoiceSessionEventListener(IVoiceNetworkInitializedEventSubscribable subscriptionService,
                                              [NotNull] ILog logger,
                                              [NotNull] VivoxUnity.Client voiceClient,
                                              [NotNull] ILocalPlayerDetails playerDetails,
                                              [NotNull] IVivoxAuthorizationService vivoxAutheAuthorizationService)
     : base(subscriptionService)
 {
     Logger        = logger ?? throw new ArgumentNullException(nameof(logger));
     VoiceClient   = voiceClient ?? throw new ArgumentNullException(nameof(voiceClient));
     PlayerDetails = playerDetails ?? throw new ArgumentNullException(nameof(playerDetails));
     VivoxAutheAuthorizationService = vivoxAutheAuthorizationService ?? throw new ArgumentNullException(nameof(vivoxAutheAuthorizationService));
 }
Example #2
0
 public JoinWorldProximityChannelEventListener(IVoiceSessionAuthenticatedEventSubscribable subscriptionService,
                                               [NotNull] ILog logger,
                                               [NotNull] IPositionalVoiceChannelCollection positionalVoiceChannels,
                                               [NotNull] IVivoxAuthorizationService vivoxAutheAuthorizationService,
                                               [NotNull] IChatChannelJoinedEventPublisher channelJoinEventPublisher)
     : base(subscriptionService)
 {
     Logger = logger ?? throw new ArgumentNullException(nameof(logger));
     PositionalVoiceChannels        = positionalVoiceChannels ?? throw new ArgumentNullException(nameof(positionalVoiceChannels));
     VivoxAutheAuthorizationService = vivoxAutheAuthorizationService ?? throw new ArgumentNullException(nameof(vivoxAutheAuthorizationService));
     ChannelJoinEventPublisher      = channelJoinEventPublisher ?? throw new ArgumentNullException(nameof(channelJoinEventPublisher));
 }
Example #3
0
        public JoinGuildTextChatEventListener(IGuildStatusChangedEventSubscribable subscriptionService,
                                              IReadonlyLocalPlayerDetails localPlayerDetails,
                                              IVoiceSessionAuthenticatedEventSubscribable vivoxAuthenticatedEventSubscribable,
                                              [NotNull] IVivoxAuthorizationService vivoxAutheAuthorizationService,
                                              [NotNull] IChatChannelJoinedEventPublisher channelJoinEventPublisher,
                                              [NotNull] ILog logger)
            : base(subscriptionService, localPlayerDetails)
        {
            VivoxAutheAuthorizationService = vivoxAutheAuthorizationService ?? throw new ArgumentNullException(nameof(vivoxAutheAuthorizationService));
            ChannelJoinEventPublisher      = channelJoinEventPublisher ?? throw new ArgumentNullException(nameof(channelJoinEventPublisher));
            Logger = logger ?? throw new ArgumentNullException(nameof(logger));
            TaskCompletionSource <ILoginSession> source = new TaskCompletionSource <ILoginSession>();

            ChatChannelSession = source.Task;

            //When vivox authenticates we can then set the completion of the login session.
            vivoxAuthenticatedEventSubscribable.OnVoiceSessionAuthenticated += (sender, args) => source.SetResult(args.Session);
        }