Exemplo n.º 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;
            }
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
 public InitEvent(YouMeErrorCode code)
 {
     _code = Conv.ErrorCodeConvert(code);
 }
Exemplo n.º 4
0
 public static StatusCode ErrorCodeConvert(YouMeErrorCode errorcode)
 {
     return((StatusCode)errorcode);
 }
Exemplo n.º 5
0
 public SpeakToChannelEvent(YouMeErrorCode code, string channel)
 {
     _code    = Conv.ErrorCodeConvert(code);
     _channel = channel;
 }