private void OnDeviceEvent(COMDeviceEventArgs e) { if (DeviceEvent != null) { DeviceEvent(e); } }
// print device events void m_deviceComEvents_Handler(COMDeviceEventArgs e) { DebugPrint(MethodInfo.GetCurrentMethod().Name, string.Format("Device Event: Audio:{0} Buton:{1} Mute:{2}", e.AudioState, e.ButtonPressed, e.mute)); switch (e.ButtonPressed) { case DeviceHeadsetButton.HeadsetButton_Flash: OnCallSwitched(EventArgs.Empty); break; //case DeviceHeadsetButton.HeadsetButton_Mute: // Not needed, now relying on IDeviceListener event for mute change // OnMuteChanged(new MuteChangedArgs(e.mute)); // break; } OnButtonPress(new ButtonPressArgs(e.ButtonPressed, e.AudioState, e.mute)); }
private void _deviceComEvents_onButtonPressed(COMDeviceEventArgs args) { OnDeviceEvent(args); }
private void _deviceComEvents_onMuteStateChanged(COMDeviceEventArgs args) { OnDeviceEvent(args); }
private void _deviceComEvents_onAudioStateChanged(COMDeviceEventArgs args) { // uncomment for additional information message //OnSDKInfo(new SDKInfoArgs(SDKInfoType.sdk_notification, "ICOMDeviceEvents_Event.onAudioStateChanged: " + args.AudioState)); }