internal ConnectEventArgs(LibiMobileDevice.idevice_event_t cbi)
 {
     this.message = cbi.connection_type;
     this.device = cbi.UniqueDeviceID;
 }
 internal USBMultiplexArgs(LibiMobileDevice.idevice_event_t cbi, bool locked)
 {
     this.message = cbi.connection_type;
     this.device = cbi.UniqueDeviceID;
     IsLocked = locked;
 }
Exemple #3
0
        internal void _NotifyCallback(ref LibiMobileDevice.idevice_event_t callback)
        {
            this.attachedToHost = true;
            if (callback.connection_type.ToString() == "1")
            {
                updateDeviceList();
                iDevice id;
                int ndev = Devices.Count;
                this.OnHostAtached(new USBMultiplexArgs(callback, ndev == 0));
                if (ndev == 0)
                {
                    this.lastError = "No accessible Devices found. Enter the passcode and try again.";
                }
                else
                {
                    id = Devices[0];

                    this.iPhoneHandle = id.Handle;
                    //string udid = callback.UniqueDeviceID.ToString();
                    if (this.ConnectToPhone())
                    {
                        this.OnConnect(new ConnectEventArgs(callback));
                    }
                    else
                    {
                        this.lastError = "Device connected but locked; enter passcode and retry.";
                    }
                }
            }
            if (callback.connection_type.ToString() == "2")
            {
                this.connected = false;
                this.attachedToHost = false;
                this.OnHostDisconnected(new USBMultiplexArgs(callback, true));
                this.OnDisconnect(new ConnectEventArgs(callback));
            }
        }