コード例 #1
0
        public SerialInputOutputManager(global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver p0, global::Com.Hoho.Android.Usbserial.Util.SerialInputOutputManager.IListener p1) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            if (GetType() != typeof(SerialInputOutputManager))
            {
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lcom/hoho/android/usbserial/driver/UsbSerialDriver;Lcom/hoho/android/usbserial/util/SerialInputOutputManager$Listener;)V", new JValue(p0), new JValue(p1)),
                    JniHandleOwnership.TransferLocalRef);
                global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "(Lcom/hoho/android/usbserial/driver/UsbSerialDriver;Lcom/hoho/android/usbserial/util/SerialInputOutputManager$Listener;)V", new JValue(p0), new JValue(p1));
                return;
            }

            if (id_ctor_Lcom_hoho_android_usbserial_driver_UsbSerialDriver_Lcom_hoho_android_usbserial_util_SerialInputOutputManager_Listener_ == IntPtr.Zero)
            {
                id_ctor_Lcom_hoho_android_usbserial_driver_UsbSerialDriver_Lcom_hoho_android_usbserial_util_SerialInputOutputManager_Listener_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lcom/hoho/android/usbserial/driver/UsbSerialDriver;Lcom/hoho/android/usbserial/util/SerialInputOutputManager$Listener;)V");
            }
            SetHandle(
                global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lcom_hoho_android_usbserial_driver_UsbSerialDriver_Lcom_hoho_android_usbserial_util_SerialInputOutputManager_Listener_, new JValue(p0), new JValue(p1)),
                JniHandleOwnership.TransferLocalRef);
            JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_Lcom_hoho_android_usbserial_driver_UsbSerialDriver_Lcom_hoho_android_usbserial_util_SerialInputOutputManager_Listener_, new JValue(p0), new JValue(p1));
        }
コード例 #2
0
 public static global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver Acquire(global::Android.Hardware.Usb.UsbManager p0, global::Android.Hardware.Usb.UsbDevice p1)
 {
     if (id_acquire_Landroid_hardware_usb_UsbManager_Landroid_hardware_usb_UsbDevice_ == IntPtr.Zero)
     {
         id_acquire_Landroid_hardware_usb_UsbManager_Landroid_hardware_usb_UsbDevice_ = JNIEnv.GetStaticMethodID(class_ref, "acquire", "(Landroid/hardware/usb/UsbManager;Landroid/hardware/usb/UsbDevice;)Lcom/hoho/android/usbserial/driver/UsbSerialDriver;");
     }
     global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver __ret = global::Java.Lang.Object.GetObject <global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver> (JNIEnv.CallStaticObjectMethod(class_ref, id_acquire_Landroid_hardware_usb_UsbManager_Landroid_hardware_usb_UsbDevice_, new JValue(p0), new JValue(p1)), JniHandleOwnership.TransferLocalRef);
     return(__ret);
 }
コード例 #3
0
        static int n_Write_arrayBI(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, int p1)
        {
            global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver __this = global::Java.Lang.Object.GetObject <global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            byte[] p0    = (byte[])JNIEnv.GetArray(native_p0, JniHandleOwnership.DoNotTransfer, typeof(byte));
            int    __ret = __this.Write(p0, p1);

            if (p0 != null)
            {
                JNIEnv.CopyArray(p0, native_p0);
            }
            return(__ret);
        }
コード例 #4
0
 static int n_SetBaudRate_I(IntPtr jnienv, IntPtr native__this, int p0)
 {
     global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver __this = global::Java.Lang.Object.GetObject <global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(__this.SetBaudRate(p0));
 }
コード例 #5
0
 static void n_Open(IntPtr jnienv, IntPtr native__this)
 {
     global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver __this = global::Java.Lang.Object.GetObject <global::Com.Hoho.Android.Usbserial.Driver.UsbSerialDriver> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     __this.Open();
 }