private void OnCallFinished(bool detach) { if (currentCall == null) { return; } log.Info("Call finished"); // we are shutting down so just put the soundcard back the way it was if (detach) { currentCall.InputDevice[TCallIoDeviceType.callIoDeviceTypePort] = ""; currentCall.InputDevice[TCallIoDeviceType.callIoDeviceTypeSoundcard] = originalSoundCard; currentCall.CaptureMicDevice[TCallIoDeviceType.callIoDeviceTypePort] = ""; currentCall.OutputDevice[TCallIoDeviceType.callIoDeviceTypePort] = ""; } SkypeStatus = SkypeStatus.WaitingForCall; currentCall = null; if (inputDeviceStream != null) { inputDeviceStream.Dispose(); inputDeviceStream = null; } if (micStream != null) { micStream.Dispose(); micStream = null; } }
void OnSkypeAttachmentStatus(TAttachmentStatus status) { log.Info("Attachment Status {0}", status); if (status == TAttachmentStatus.apiAttachAvailable) { skype.Attach(Protocol, false); } else if (status == TAttachmentStatus.apiAttachPendingAuthorization) { SkypeStatus = SkypeStatus.PendingAuthorisation; } else if (status == TAttachmentStatus.apiAttachSuccess) { log.Info("AudioIn: {0}", skype.Settings.AudioIn); log.Info("You can now place a currentCall"); SkypeStatus = SkypeStatus.WaitingForCall; } else if (status == TAttachmentStatus.apiAttachNotAvailable) { log.Warning("No longer connected to Skype"); SkypeStatus = SkypeStatus.SkypeNotRunning; } else if (status == TAttachmentStatus.apiAttachRefused) { log.Error("Attach refused"); SkypeStatus = SkypeStatus.SkypeAttachRefused; } }
protected override void Dispose(bool disposing) { // Destroy the connection Disconnect(); _skypeWindowMessageDiscoverId = 0; _skypeWindowMessageAttachId = 0; Status = SkypeStatus.Unknown; // Do I need to destroy the handle as well? DestroyHandle(); base.Dispose(disposing); }
private void OnCallStarted(Call call) { if (currentCall != null) { if (call.Id == currentCall.Id) { log.Info("already handled this call {0}", call.Id); return; } log.Warning("conference calls not supported"); return; } currentCall = call; call.CaptureMicDevice[TCallIoDeviceType.callIoDeviceTypePort] = MicDevicePort.ToString(CultureInfo.InvariantCulture); originalSoundCard = call.InputDevice[TCallIoDeviceType.callIoDeviceTypeSoundcard]; call.InputDevice[TCallIoDeviceType.callIoDeviceTypeSoundcard] = ""; call.InputDevice[TCallIoDeviceType.callIoDeviceTypePort] = InputDevicePort.ToString(CultureInfo.InvariantCulture); call.OutputDevice[TCallIoDeviceType.callIoDeviceTypePort] = OutputDevicePort.ToString(CultureInfo.InvariantCulture); SkypeStatus = SkypeStatus.CallInProgress; }
private void OnStatusChanging(SkypeStatus currentStatus, SkypeStatus newStatus) { _context.InvokeThreadSafe(() => StatusChanging.Raise(this, currentStatus, newStatus)); }
private void OnStatusChanged(SkypeStatus status) { _context.InvokeThreadSafe(() => StatusChanged.Raise(this, status)); }
protected override void Dispose(bool disposing) { // Destroy the connection Disconnect(); _skypeWindowMessageDiscoverId = 0; _skypeWindowMessageAttachId = 0; Status = SkypeStatus.Unknown; // Do I need to destroy the handle as well? DestroyHandle(); base.Dispose(disposing); }
private void OnStatusChanged(SkypeStatus status) { _context.InvokeThreadSafe(() => StatusChanged.Raise(this, status)); }
private void OnStatusChanging(SkypeStatus currentStatus, SkypeStatus newStatus) { _context.InvokeThreadSafe(() => StatusChanging.Raise(this, currentStatus, newStatus)); }
private void SkypeOnStatusChanged(object sender, SkypeStatus skypeStatus) { lblStatus.Text = skypeStatus.ToString(); }
private void SkypeOnStatusChanged(object sender, SkypeStatus skypeStatus) { }
private void SkypeOnStatusChanged(object sender, SkypeStatus skypeStatus) { lblStatus.Text = skypeStatus.ToString(); }