示例#1
0
        public static void itmdTest()
        {
            Console.WriteLine("Starting ITMD Test...");
            //Console.ReadKey();
            iph = new iTMDiPhone();
            lliph = new iTMDiPhoneLL();
            try
            {
                mdv = new iPhone();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            tai = new TAIiPhone();

            mdv.Connect += Mdv_Connect;
            mdv.HostAttached += Mdv_HostAttached;
            iph.Connect += Iph_Connect;
            tai.Connect += Tai_Connect;

            lliph.HostAttached += Lliph_HostAttached;

            iph.DfuConnect += Iph_DfuConnect;
            while (true)
            {
                if (mdv.attachedToHost ^ mdv.IsConnected)
                {
                    //Console.Clear();
                    //Console.WriteLine("Device attached but not paired. Enter passcode on device to pair.");
                }
            }
        }
示例#2
0
        public static unsafe iPhoneFile Open(iTMDiPhone phone, string path, FileAccess openmode)
        {
            throw new NotImplementedException();

            /*
             * long num;
             * OpenMode none = OpenMode.None;
             * switch (openmode)
             * {
             * case FileAccess.Read:
             *  none = OpenMode.Read;
             *  break;
             *
             * case FileAccess.Write:
             *  none = OpenMode.Write;
             *  break;
             *
             * case FileAccess.ReadWrite:
             *  throw new NotImplementedException("Read+Write not (yet) implemented");
             * }
             * string str = phone.FullPath(phone.GetCurrentDirectory(), path);
             * int num2 = MobileDevice.AFCFileRefOpen(phone.AFCHandle, str, (int) none, 0, out num);
             * if (num2 != 0)
             * {
             * throw new IOException("AFCFileRefOpen failed with error " + num2.ToString());
             * }
             * return new iPhoneFile(phone, num, none);
             */
        }
示例#3
0
 public static iPhoneFile OpenRead(iTMDiPhone phone, string path)
 {
 	throw new NotImplementedException();
 	/*
     return Open(phone, path, FileAccess.Read);
     */
 }
示例#4
0
        public static unsafe iPhoneFile Open(iTMDiPhone phone, string path, FileAccess openmode)
        {
        	throw new NotImplementedException();
        	/*
            long num;
            OpenMode none = OpenMode.None;
            switch (openmode)
            {
                case FileAccess.Read:
                    none = OpenMode.Read;
                    break;

                case FileAccess.Write:
                    none = OpenMode.Write;
                    break;

                case FileAccess.ReadWrite:
                    throw new NotImplementedException("Read+Write not (yet) implemented");
            }
            string str = phone.FullPath(phone.GetCurrentDirectory(), path);
            int num2 = MobileDevice.AFCFileRefOpen(phone.AFCHandle, str, (int) none, 0, out num);
            if (num2 != 0)
            {
                throw new IOException("AFCFileRefOpen failed with error " + num2.ToString());
            }
            return new iPhoneFile(phone, num, none);
            */
        }
示例#5
0
        public static iPhoneFile OpenRead(iTMDiPhone phone, string path)
        {
            throw new NotImplementedException();

            /*
             * return Open(phone, path, FileAccess.Read);
             */
        }
示例#6
0
 public static iPhoneFile OpenWrite(iTMDiPhone phone, string path)
 {
     return(Open(phone, path, FileAccess.Write));
 }
示例#7
0
 private iPhoneFile(iTMDiPhone phone, long handle, OpenMode mode)
 {
     this.phone  = phone;
     this.mode   = mode;
     this.handle = handle;
 }
示例#8
0
 public static iPhoneFile OpenWrite(iTMDiPhone phone, string path)
 {
     return Open(phone, path, FileAccess.Write);
 }
示例#9
0
 private iPhoneFile(iTMDiPhone phone, long handle, OpenMode mode)
 {
     this.phone = phone;
     this.mode = mode;
     this.handle = handle;
 }