wxr
2024-08-27 83d5ada866a598ee868d3e23624d104d1027db29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
using System;
using System.Collections.Generic;
using Android.Runtime;
using Java.Interop;
 
namespace Com.Tencent.Tinker.Lib.Listener {
 
    // Metadata.xml XPath interface reference: path="/api/package[@name='com.tencent.tinker.lib.listener']/interface[@name='PatchListener']"
    [Register ("com/tencent/tinker/lib/listener/PatchListener", "", "Com.Tencent.Tinker.Lib.Listener.IPatchListenerInvoker")]
    public partial interface IPatchListener : IJavaObject, IJavaPeerable {
        // Metadata.xml XPath method reference: path="/api/package[@name='com.tencent.tinker.lib.listener']/interface[@name='PatchListener']/method[@name='onPatchReceived' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
        [Register ("onPatchReceived", "(Ljava/lang/String;)I", "GetOnPatchReceived_Ljava_lang_String_Handler:Com.Tencent.Tinker.Lib.Listener.IPatchListenerInvoker, Shared.Droid.HDLLinphone")]
        int OnPatchReceived (string p0);
 
    }
 
    [global::Android.Runtime.Register ("com/tencent/tinker/lib/listener/PatchListener", DoNotGenerateAcw=true)]
    internal partial class IPatchListenerInvoker : global::Java.Lang.Object, IPatchListener {
        static readonly JniPeerMembers _members = new XAPeerMembers ("com/tencent/tinker/lib/listener/PatchListener", typeof (IPatchListenerInvoker));
 
        static IntPtr java_class_ref {
            get { return _members.JniPeerType.PeerReference.Handle; }
        }
 
        [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)]
        [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)]
        public override global::Java.Interop.JniPeerMembers JniPeerMembers {
            get { return _members; }
        }
 
        [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)]
        [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override IntPtr ThresholdClass {
            get { return class_ref; }
        }
 
        [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)]
        [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override global::System.Type ThresholdType {
            get { return _members.ManagedPeerType; }
        }
 
        IntPtr class_ref;
 
        public static IPatchListener GetObject (IntPtr handle, JniHandleOwnership transfer)
        {
            return global::Java.Lang.Object.GetObject<IPatchListener> (handle, transfer);
        }
 
        static IntPtr Validate (IntPtr handle)
        {
            if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
                throw new InvalidCastException ($"Unable to convert instance of type '{JNIEnv.GetClassNameFromInstance (handle)}' to type 'com.tencent.tinker.lib.listener.PatchListener'.");
            return handle;
        }
 
        protected override void Dispose (bool disposing)
        {
            if (this.class_ref != IntPtr.Zero)
                JNIEnv.DeleteGlobalRef (this.class_ref);
            this.class_ref = IntPtr.Zero;
            base.Dispose (disposing);
        }
 
        public IPatchListenerInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
        {
            IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
            this.class_ref = JNIEnv.NewGlobalRef (local_ref);
            JNIEnv.DeleteLocalRef (local_ref);
        }
 
        static Delegate cb_onPatchReceived_Ljava_lang_String_;
#pragma warning disable 0169
        static Delegate GetOnPatchReceived_Ljava_lang_String_Handler ()
        {
            if (cb_onPatchReceived_Ljava_lang_String_ == null)
                cb_onPatchReceived_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate (new _JniMarshal_PPL_I (n_OnPatchReceived_Ljava_lang_String_));
            return cb_onPatchReceived_Ljava_lang_String_;
        }
 
        static int n_OnPatchReceived_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
        {
            var __this = global::Java.Lang.Object.GetObject<global::Com.Tencent.Tinker.Lib.Listener.IPatchListener> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            var p0 = JNIEnv.GetString (native_p0, JniHandleOwnership.DoNotTransfer);
            int __ret = __this.OnPatchReceived (p0);
            return __ret;
        }
#pragma warning restore 0169
 
        IntPtr id_onPatchReceived_Ljava_lang_String_;
        public unsafe int OnPatchReceived (string p0)
        {
            if (id_onPatchReceived_Ljava_lang_String_ == IntPtr.Zero)
                id_onPatchReceived_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "onPatchReceived", "(Ljava/lang/String;)I");
            IntPtr native_p0 = JNIEnv.NewString ((string)p0);
            JValue* __args = stackalloc JValue [1];
            __args [0] = new JValue (native_p0);
            var __ret = JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_onPatchReceived_Ljava_lang_String_, __args);
            JNIEnv.DeleteLocalRef (native_p0);
            return __ret;
        }
 
    }
 
    public delegate int PatchHandler (string p0);
    [global::Android.Runtime.Register ("mono/com/tencent/tinker/lib/listener/PatchListenerImplementor")]
    internal sealed partial class IPatchListenerImplementor : global::Java.Lang.Object, IPatchListener {
        public IPatchListenerImplementor () : base (global::Android.Runtime.JNIEnv.StartCreateInstance ("mono/com/tencent/tinker/lib/listener/PatchListenerImplementor", "()V"), JniHandleOwnership.TransferLocalRef)
        {
            global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
        }
 
        #pragma warning disable 0649
        public PatchHandler Handler;
        #pragma warning restore 0649
 
        public int OnPatchReceived (string p0)
        {
            var __h = Handler;
            return __h != null ? __h (p0) : default (int);
        }
 
        internal static bool __IsEmpty (IPatchListenerImplementor value)
        {
            return value.Handler == null;
        }
 
    }
}