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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-app-DownloadManager"))]
__jni_bindgen! {
/// public class [DownloadManager](https://developer.android.com/reference/android/app/DownloadManager.html)
///
/// Required feature: "android-app-DownloadManager"
public class DownloadManager ("android/app/DownloadManager") extends crate::java::lang::Object {
/// [enqueue](https://developer.android.com/reference/android/app/DownloadManager.html#enqueue(android.app.DownloadManager.Request))
///
/// Required features: "android-app-DownloadManager_Request"
#[cfg(any(feature = "all", all(feature = "android-app-DownloadManager_Request")))]
pub fn enqueue<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::DownloadManager_Request>>) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/DownloadManager", java.flags == PUBLIC, .name == "enqueue", .descriptor == "(Landroid/app/DownloadManager$Request;)J"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/DownloadManager\0", "enqueue\0", "(Landroid/app/DownloadManager$Request;)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [remove](https://developer.android.com/reference/android/app/DownloadManager.html#remove(long...))
pub fn remove<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::LongArray>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/DownloadManager", java.flags == PUBLIC | VARARGS, .name == "remove", .descriptor == "([J)I"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/DownloadManager\0", "remove\0", "([J)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [query](https://developer.android.com/reference/android/app/DownloadManager.html#query(android.app.DownloadManager.Query))
///
/// Required features: "android-app-DownloadManager_Query", "android-database-Cursor"
#[cfg(any(feature = "all", all(feature = "android-app-DownloadManager_Query", feature = "android-database-Cursor")))]
pub fn query<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::DownloadManager_Query>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::database::Cursor>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/DownloadManager", java.flags == PUBLIC, .name == "query", .descriptor == "(Landroid/app/DownloadManager$Query;)Landroid/database/Cursor;"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/DownloadManager\0", "query\0", "(Landroid/app/DownloadManager$Query;)Landroid/database/Cursor;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [openDownloadedFile](https://developer.android.com/reference/android/app/DownloadManager.html#openDownloadedFile(long))
///
/// Required features: "android-os-ParcelFileDescriptor"
#[cfg(any(feature = "all", all(feature = "android-os-ParcelFileDescriptor")))]
pub fn openDownloadedFile<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::os::ParcelFileDescriptor>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/DownloadManager", java.flags == PUBLIC, .name == "openDownloadedFile", .descriptor == "(J)Landroid/os/ParcelFileDescriptor;"
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/app/DownloadManager\0", "openDownloadedFile\0", "(J)Landroid/os/ParcelFileDescriptor;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getUriForDownloadedFile](https://developer.android.com/reference/android/app/DownloadManager.html#getUriForDownloadedFile(long))
///
/// Required features: "android-net-Uri"
#[cfg(any(feature = "all", all(feature = "android-net-Uri")))]
pub fn getUriForDownloadedFile<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::net::Uri>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/DownloadManager", java.flags == PUBLIC, .name == "getUriForDownloadedFile", .descriptor == "(J)Landroid/net/Uri;"
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/app/DownloadManager\0", "getUriForDownloadedFile\0", "(J)Landroid/net/Uri;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getMimeTypeForDownloadedFile](https://developer.android.com/reference/android/app/DownloadManager.html#getMimeTypeForDownloadedFile(long))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn getMimeTypeForDownloadedFile<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/DownloadManager", java.flags == PUBLIC, .name == "getMimeTypeForDownloadedFile", .descriptor == "(J)Ljava/lang/String;"
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/app/DownloadManager\0", "getMimeTypeForDownloadedFile\0", "(J)Ljava/lang/String;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getMaxBytesOverMobile](https://developer.android.com/reference/android/app/DownloadManager.html#getMaxBytesOverMobile(android.content.Context))
///
/// Required features: "android-content-Context", "java-lang-Long"
#[cfg(any(feature = "all", all(feature = "android-content-Context", feature = "java-lang-Long")))]
pub fn getMaxBytesOverMobile<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Context>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::Long>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/DownloadManager", java.flags == PUBLIC | STATIC, .name == "getMaxBytesOverMobile", .descriptor == "(Landroid/content/Context;)Ljava/lang/Long;"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/app/DownloadManager\0", "getMaxBytesOverMobile\0", "(Landroid/content/Context;)Ljava/lang/Long;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [getRecommendedMaxBytesOverMobile](https://developer.android.com/reference/android/app/DownloadManager.html#getRecommendedMaxBytesOverMobile(android.content.Context))
///
/// Required features: "android-content-Context", "java-lang-Long"
#[cfg(any(feature = "all", all(feature = "android-content-Context", feature = "java-lang-Long")))]
pub fn getRecommendedMaxBytesOverMobile<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Context>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::Long>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/DownloadManager", java.flags == PUBLIC | STATIC, .name == "getRecommendedMaxBytesOverMobile", .descriptor == "(Landroid/content/Context;)Ljava/lang/Long;"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/app/DownloadManager\0", "getRecommendedMaxBytesOverMobile\0", "(Landroid/content/Context;)Ljava/lang/Long;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// public static final [COLUMN_ID](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_ID)
pub const COLUMN_ID : &'static str = "_id";
/// public static final [COLUMN_TITLE](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_TITLE)
pub const COLUMN_TITLE : &'static str = "title";
/// public static final [COLUMN_DESCRIPTION](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_DESCRIPTION)
pub const COLUMN_DESCRIPTION : &'static str = "description";
/// public static final [COLUMN_URI](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_URI)
pub const COLUMN_URI : &'static str = "uri";
/// public static final [COLUMN_MEDIA_TYPE](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_MEDIA_TYPE)
pub const COLUMN_MEDIA_TYPE : &'static str = "media_type";
/// public static final [COLUMN_TOTAL_SIZE_BYTES](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_TOTAL_SIZE_BYTES)
pub const COLUMN_TOTAL_SIZE_BYTES : &'static str = "total_size";
/// public static final [COLUMN_LOCAL_URI](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_LOCAL_URI)
pub const COLUMN_LOCAL_URI : &'static str = "local_uri";
/// public static final [COLUMN_LOCAL_FILENAME](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_LOCAL_FILENAME)
pub const COLUMN_LOCAL_FILENAME : &'static str = "local_filename";
/// public static final [COLUMN_STATUS](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_STATUS)
pub const COLUMN_STATUS : &'static str = "status";
/// public static final [COLUMN_REASON](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_REASON)
pub const COLUMN_REASON : &'static str = "reason";
/// public static final [COLUMN_BYTES_DOWNLOADED_SO_FAR](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_BYTES_DOWNLOADED_SO_FAR)
pub const COLUMN_BYTES_DOWNLOADED_SO_FAR : &'static str = "bytes_so_far";
/// public static final [COLUMN_LAST_MODIFIED_TIMESTAMP](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_LAST_MODIFIED_TIMESTAMP)
pub const COLUMN_LAST_MODIFIED_TIMESTAMP : &'static str = "last_modified_timestamp";
/// public static final [COLUMN_MEDIAPROVIDER_URI](https://developer.android.com/reference/android/app/DownloadManager.html#COLUMN_MEDIAPROVIDER_URI)
pub const COLUMN_MEDIAPROVIDER_URI : &'static str = "mediaprovider_uri";
/// public static final [STATUS_PENDING](https://developer.android.com/reference/android/app/DownloadManager.html#STATUS_PENDING)
pub const STATUS_PENDING : i32 = 1;
/// public static final [STATUS_RUNNING](https://developer.android.com/reference/android/app/DownloadManager.html#STATUS_RUNNING)
pub const STATUS_RUNNING : i32 = 2;
/// public static final [STATUS_PAUSED](https://developer.android.com/reference/android/app/DownloadManager.html#STATUS_PAUSED)
pub const STATUS_PAUSED : i32 = 4;
/// public static final [STATUS_SUCCESSFUL](https://developer.android.com/reference/android/app/DownloadManager.html#STATUS_SUCCESSFUL)
pub const STATUS_SUCCESSFUL : i32 = 8;
/// public static final [STATUS_FAILED](https://developer.android.com/reference/android/app/DownloadManager.html#STATUS_FAILED)
pub const STATUS_FAILED : i32 = 16;
/// public static final [ERROR_UNKNOWN](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_UNKNOWN)
pub const ERROR_UNKNOWN : i32 = 1000;
/// public static final [ERROR_FILE_ERROR](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_FILE_ERROR)
pub const ERROR_FILE_ERROR : i32 = 1001;
/// public static final [ERROR_UNHANDLED_HTTP_CODE](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_UNHANDLED_HTTP_CODE)
pub const ERROR_UNHANDLED_HTTP_CODE : i32 = 1002;
/// public static final [ERROR_HTTP_DATA_ERROR](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_HTTP_DATA_ERROR)
pub const ERROR_HTTP_DATA_ERROR : i32 = 1004;
/// public static final [ERROR_TOO_MANY_REDIRECTS](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_TOO_MANY_REDIRECTS)
pub const ERROR_TOO_MANY_REDIRECTS : i32 = 1005;
/// public static final [ERROR_INSUFFICIENT_SPACE](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_INSUFFICIENT_SPACE)
pub const ERROR_INSUFFICIENT_SPACE : i32 = 1006;
/// public static final [ERROR_DEVICE_NOT_FOUND](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_DEVICE_NOT_FOUND)
pub const ERROR_DEVICE_NOT_FOUND : i32 = 1007;
/// public static final [ERROR_CANNOT_RESUME](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_CANNOT_RESUME)
pub const ERROR_CANNOT_RESUME : i32 = 1008;
/// public static final [ERROR_FILE_ALREADY_EXISTS](https://developer.android.com/reference/android/app/DownloadManager.html#ERROR_FILE_ALREADY_EXISTS)
pub const ERROR_FILE_ALREADY_EXISTS : i32 = 1009;
/// public static final [PAUSED_WAITING_TO_RETRY](https://developer.android.com/reference/android/app/DownloadManager.html#PAUSED_WAITING_TO_RETRY)
pub const PAUSED_WAITING_TO_RETRY : i32 = 1;
/// public static final [PAUSED_WAITING_FOR_NETWORK](https://developer.android.com/reference/android/app/DownloadManager.html#PAUSED_WAITING_FOR_NETWORK)
pub const PAUSED_WAITING_FOR_NETWORK : i32 = 2;
/// public static final [PAUSED_QUEUED_FOR_WIFI](https://developer.android.com/reference/android/app/DownloadManager.html#PAUSED_QUEUED_FOR_WIFI)
pub const PAUSED_QUEUED_FOR_WIFI : i32 = 3;
/// public static final [PAUSED_UNKNOWN](https://developer.android.com/reference/android/app/DownloadManager.html#PAUSED_UNKNOWN)
pub const PAUSED_UNKNOWN : i32 = 4;
/// public static final [ACTION_DOWNLOAD_COMPLETE](https://developer.android.com/reference/android/app/DownloadManager.html#ACTION_DOWNLOAD_COMPLETE)
pub const ACTION_DOWNLOAD_COMPLETE : &'static str = "android.intent.action.DOWNLOAD_COMPLETE";
/// public static final [ACTION_NOTIFICATION_CLICKED](https://developer.android.com/reference/android/app/DownloadManager.html#ACTION_NOTIFICATION_CLICKED)
pub const ACTION_NOTIFICATION_CLICKED : &'static str = "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED";
/// public static final [ACTION_VIEW_DOWNLOADS](https://developer.android.com/reference/android/app/DownloadManager.html#ACTION_VIEW_DOWNLOADS)
pub const ACTION_VIEW_DOWNLOADS : &'static str = "android.intent.action.VIEW_DOWNLOADS";
/// public static final [EXTRA_DOWNLOAD_ID](https://developer.android.com/reference/android/app/DownloadManager.html#EXTRA_DOWNLOAD_ID)
pub const EXTRA_DOWNLOAD_ID : &'static str = "extra_download_id";
/// public static final [EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS](https://developer.android.com/reference/android/app/DownloadManager.html#EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS)
pub const EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS : &'static str = "extra_click_download_ids";
}
}