private async void SetMuteStBtn_Clicked(object sender, EventArgs e) { try { Log.Debug(Globals.LogTag, "Set call mute status start"); var actionPath = await DisplayActionSheet("Path", "Cancel", null, Enum.GetNames(typeof(SoundMutePath))); var actionSt = await DisplayActionSheet("Mute Status", "Cancel", null, Enum.GetNames(typeof(SoundMuteStatus))); Log.Debug(Globals.LogTag, "Action: path = " + actionPath + ", mute status = " + actionSt); if (actionPath != null && actionSt != null) { SoundMutePath path = (SoundMutePath)Enum.Parse(typeof(SoundMutePath), actionPath); SoundMuteStatus status = (SoundMuteStatus)Enum.Parse(typeof(SoundMuteStatus), actionSt); CallMuteStatusRecord record = new CallMuteStatusRecord(path, status); await call.SetCallMuteStatus(record); Log.Debug(Globals.LogTag, "Set call mute status ends"); } } catch (Exception ex) { Log.Debug(Globals.LogTag, "Set mute status, exception = " + ex.ToString()); } }
/// <summary> /// A parameterized constructor of CallMuteStatusRecord. /// </summary> /// <param name="path">Mute path.</param> /// <param name="status">Mute status.</param> public CallMuteStatusRecord(SoundMutePath path, SoundMuteStatus status) { _path = path; _status = status; }
internal static extern int SetCallMuteStatus(IntPtr handle, SoundMuteStatus status, SoundMutePath path, TapiResponseCallback cb, IntPtr userData);