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
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "android-appwidget-AppWidgetHost"))]
__jni_bindgen! {
    /// public class [AppWidgetHost](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html)
    ///
    /// Required feature: "android-appwidget-AppWidgetHost"
    public class AppWidgetHost ("android/appwidget/AppWidgetHost") extends crate::java::lang::Object {

        /// [AppWidgetHost](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#AppWidgetHost(android.content.Context,%20int))
        ///
        /// Required features: "android-content-Context"
        #[cfg(any(feature = "all", all(feature = "android-content-Context")))]
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Context>>, arg1: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::appwidget::AppWidgetHost>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Landroid/content/Context;I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "<init>\0", "(Landroid/content/Context;I)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [startListening](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#startListening())
        pub fn startListening<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC, .name == "startListening", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "startListening\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [stopListening](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#stopListening())
        pub fn stopListening<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC, .name == "stopListening", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "stopListening\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [allocateAppWidgetId](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#allocateAppWidgetId())
        pub fn allocateAppWidgetId<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC, .name == "allocateAppWidgetId", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "allocateAppWidgetId\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [startAppWidgetConfigureActivityForResult](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#startAppWidgetConfigureActivityForResult(android.app.Activity,%20int,%20int,%20int,%20android.os.Bundle))
        ///
        /// Required features: "android-app-Activity", "android-os-Bundle"
        #[cfg(any(feature = "all", all(feature = "android-app-Activity", feature = "android-os-Bundle")))]
        pub fn startAppWidgetConfigureActivityForResult<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::Activity>>, arg1: i32, arg2: i32, arg3: i32, arg4: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Bundle>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC | FINAL, .name == "startAppWidgetConfigureActivityForResult", .descriptor == "(Landroid/app/Activity;IIILandroid/os/Bundle;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2), __jni_bindgen::AsJValue::as_jvalue(&arg3), __jni_bindgen::AsJValue::as_jvalue(&arg4.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "startAppWidgetConfigureActivityForResult\0", "(Landroid/app/Activity;IIILandroid/os/Bundle;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getAppWidgetIds](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#getAppWidgetIds())
        pub fn getAppWidgetIds<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::IntArray>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC, .name == "getAppWidgetIds", .descriptor == "()[I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "getAppWidgetIds\0", "()[I\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [deleteAppWidgetId](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#deleteAppWidgetId(int))
        pub fn deleteAppWidgetId<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC, .name == "deleteAppWidgetId", .descriptor == "(I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "deleteAppWidgetId\0", "(I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [deleteHost](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#deleteHost())
        pub fn deleteHost<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC, .name == "deleteHost", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "deleteHost\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [deleteAllHosts](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#deleteAllHosts())
        pub fn deleteAllHosts<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC | STATIC, .name == "deleteAllHosts", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/appwidget/AppWidgetHost\0", "deleteAllHosts\0", "()V\0");
                __jni_env.call_static_void_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [createView](https://developer.android.com/reference/android/appwidget/AppWidgetHost.html#createView(android.content.Context,%20int,%20android.appwidget.AppWidgetProviderInfo))
        ///
        /// Required features: "android-appwidget-AppWidgetHostView", "android-appwidget-AppWidgetProviderInfo", "android-content-Context"
        #[cfg(any(feature = "all", all(feature = "android-appwidget-AppWidgetHostView", feature = "android-appwidget-AppWidgetProviderInfo", feature = "android-content-Context")))]
        pub fn createView<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Context>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::appwidget::AppWidgetProviderInfo>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::appwidget::AppWidgetHostView>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/appwidget/AppWidgetHost", java.flags == PUBLIC | FINAL, .name == "createView", .descriptor == "(Landroid/content/Context;ILandroid/appwidget/AppWidgetProviderInfo;)Landroid/appwidget/AppWidgetHostView;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/appwidget/AppWidgetHost\0", "createView\0", "(Landroid/content/Context;ILandroid/appwidget/AppWidgetProviderInfo;)Landroid/appwidget/AppWidgetHostView;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}