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;
     }
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 5
0
 private void OnStatusChanging(SkypeStatus currentStatus, SkypeStatus newStatus)
 {
     _context.InvokeThreadSafe(() => StatusChanging.Raise(this, currentStatus, newStatus));
 }
Exemplo n.º 6
0
 private void OnStatusChanged(SkypeStatus status)
 {
     _context.InvokeThreadSafe(() => StatusChanged.Raise(this, status));
 }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
 private void OnStatusChanged(SkypeStatus status)
 {
     _context.InvokeThreadSafe(() => StatusChanged.Raise(this, status));
 }
Exemplo n.º 9
0
 private void OnStatusChanging(SkypeStatus currentStatus, SkypeStatus newStatus)
 {
     _context.InvokeThreadSafe(() => StatusChanging.Raise(this, currentStatus, newStatus));
 }
Exemplo n.º 10
0
 private void SkypeOnStatusChanged(object sender, SkypeStatus skypeStatus)
 {
     lblStatus.Text = skypeStatus.ToString();
 }
Exemplo n.º 11
0
 private void SkypeOnStatusChanged(object sender, SkypeStatus skypeStatus)
 {
 }
Exemplo n.º 12
0
 private void SkypeOnStatusChanged(object sender, SkypeStatus skypeStatus)
 {
     lblStatus.Text = skypeStatus.ToString();
 }