public unsafe NotifyRequest(string mac, global::Com.Vivalnk.Sdk.Common.Ble.Connect.Base.IORequestOptions requestOptions, global::Com.Vivalnk.Sdk.Common.Ble.Connect.Request.NotifyRequest.INotifyChangeListener listener, global::Java.Util.UUID service, global::Java.Util.UUID character, bool enable)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Ljava/lang/String;Lcom/vivalnk/sdk/common/ble/connect/base/IORequestOptions;Lcom/vivalnk/sdk/common/ble/connect/request/NotifyRequest$NotifyChangeListener;Ljava/util/UUID;Ljava/util/UUID;Z)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_mac = JNIEnv.NewString(mac);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [6];
                __args [0] = new JniArgumentValue(native_mac);
                __args [1] = new JniArgumentValue((requestOptions == null) ? IntPtr.Zero : ((global::Java.Lang.Object)requestOptions).Handle);
                __args [2] = new JniArgumentValue((listener == null) ? IntPtr.Zero : ((global::Java.Lang.Object)listener).Handle);
                __args [3] = new JniArgumentValue((service == null) ? IntPtr.Zero : ((global::Java.Lang.Object)service).Handle);
                __args [4] = new JniArgumentValue((character == null) ? IntPtr.Zero : ((global::Java.Lang.Object)character).Handle);
                __args [5] = new JniArgumentValue(enable);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_mac);
            }
        }
Пример #2
0
        public unsafe MtuRequest(string mac, global::Com.Vivalnk.Sdk.Common.Ble.Connect.Base.IORequestOptions requestOptions, global::Com.Vivalnk.Sdk.Common.Ble.Connect.Request.MtuRequest.IMtuListener listener, int mtu)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Ljava/lang/String;Lcom/vivalnk/sdk/common/ble/connect/base/IORequestOptions;Lcom/vivalnk/sdk/common/ble/connect/request/MtuRequest$MtuListener;I)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_mac = JNIEnv.NewString(mac);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue(native_mac);
                __args [1] = new JniArgumentValue((requestOptions == null) ? IntPtr.Zero : ((global::Java.Lang.Object)requestOptions).Handle);
                __args [2] = new JniArgumentValue((listener == null) ? IntPtr.Zero : ((global::Java.Lang.Object)listener).Handle);
                __args [3] = new JniArgumentValue(mtu);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_mac);
            }
        }