Пример #1
0
        public void LeaveAllChannel(Action <ChannelEvent> callback)
        {
            YouMeErrorCode errorCode = YouMeVoiceAPI.GetInstance().LeaveChannelAll();

            if (errorCode != YouMeErrorCode.YOUME_SUCCESS && callback != null)
            {
                callback(new ChannelEvent(Conv.ErrorCodeConvert(errorCode), ChannelEventType.LEAVE_FAIL, ""));
            }
            else
            {
                talkManager.leaveAllChannelCallback = callback;
            }
        }
Пример #2
0
 public void LeaveChannel(Channel channel, Action <ChannelEvent> callback)
 {
     if (channel.ChannelID == null)
     {
         Log.e("channel ID can't be null.");
         return;
     }
     if (_config.AllowMultiChannel)
     {
         YouMeErrorCode errorCode = YouMeVoiceAPI.GetInstance().LeaveChannelMultiMode(channel.ChannelID);
         if (errorCode != YouMeErrorCode.YOUME_SUCCESS && callback != null)
         {
             callback(new ChannelEvent(Conv.ErrorCodeConvert(errorCode), ChannelEventType.LEAVE_FAIL, channel.ChannelID));
         }
         else
         {
             talkManager.AddLeaveChannelCallback(channel.ChannelID, callback);
         }
     }
     else
     {
         LeaveAllChannel(callback);
     }
 }
Пример #3
0
 public InitEvent(YouMeErrorCode code)
 {
     _code = Conv.ErrorCodeConvert(code);
 }
Пример #4
0
 public static StatusCode ErrorCodeConvert(YouMeErrorCode errorcode)
 {
     return((StatusCode)errorcode);
 }
Пример #5
0
 public SpeakToChannelEvent(YouMeErrorCode code, string channel)
 {
     _code    = Conv.ErrorCodeConvert(code);
     _channel = channel;
 }