#[cfg(any(feature = "all", feature = "android-bluetooth-BluetoothHidDevice"))]
__jni_bindgen! {
public final class BluetoothHidDevice ("android/bluetooth/BluetoothHidDevice") extends crate::java::lang::Object, implements crate::android::bluetooth::BluetoothProfile {
#[cfg(any(feature = "all", all(feature = "java-util-List")))]
pub fn getConnectedDevices<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::List>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
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/bluetooth/BluetoothHidDevice\0", "getConnectedDevices\0", "()Ljava/util/List;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-util-List")))]
pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::IntArray>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::List>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
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/bluetooth/BluetoothHidDevice\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn getConnectionState<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
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/bluetooth/BluetoothHidDevice\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothHidDeviceAppQosSettings", feature = "android-bluetooth-BluetoothHidDeviceAppSdpSettings", feature = "android-bluetooth-BluetoothHidDevice_Callback", feature = "java-util-concurrent-Executor")))]
pub fn registerApp<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothHidDeviceAppSdpSettings>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothHidDeviceAppQosSettings>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothHidDeviceAppQosSettings>>, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::Executor>>, arg4: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothHidDevice_Callback>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into()), __jni_bindgen::AsJValue::as_jvalue(&arg3.into()), __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/bluetooth/BluetoothHidDevice\0", "registerApp\0", "(Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Ljava/util/concurrent/Executor;Landroid/bluetooth/BluetoothHidDevice$Callback;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn unregisterApp<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
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/bluetooth/BluetoothHidDevice\0", "unregisterApp\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn sendReport<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
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/bluetooth/BluetoothHidDevice\0", "sendReport\0", "(Landroid/bluetooth/BluetoothDevice;I[B)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn replyReport<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>, arg1: i8, arg2: i8, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
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.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "replyReport\0", "(Landroid/bluetooth/BluetoothDevice;BB[B)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn reportError<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>, arg1: i8) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "reportError\0", "(Landroid/bluetooth/BluetoothDevice;B)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn connect<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
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/bluetooth/BluetoothHidDevice\0", "connect\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "android-bluetooth-BluetoothDevice")))]
pub fn disconnect<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::bluetooth::BluetoothDevice>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
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/bluetooth/BluetoothHidDevice\0", "disconnect\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub const ACTION_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.hiddevice.profile.action.CONNECTION_STATE_CHANGED";
pub const ERROR_RSP_INVALID_PARAM : i8 = 4;
pub const ERROR_RSP_INVALID_RPT_ID : i8 = 2;
pub const ERROR_RSP_NOT_READY : i8 = 1;
pub const ERROR_RSP_SUCCESS : i8 = 0;
pub const ERROR_RSP_UNKNOWN : i8 = 14;
pub const ERROR_RSP_UNSUPPORTED_REQ : i8 = 3;
pub const PROTOCOL_BOOT_MODE : i8 = 0;
pub const PROTOCOL_REPORT_MODE : i8 = 1;
pub const REPORT_TYPE_FEATURE : i8 = 3;
pub const REPORT_TYPE_INPUT : i8 = 1;
pub const REPORT_TYPE_OUTPUT : i8 = 2;
pub const SUBCLASS1_COMBO : i8 = -64;
pub const SUBCLASS1_KEYBOARD : i8 = 64;
pub const SUBCLASS1_MOUSE : i8 = -128;
pub const SUBCLASS1_NONE : i8 = 0;
pub const SUBCLASS2_CARD_READER : i8 = 6;
pub const SUBCLASS2_DIGITIZER_TABLET : i8 = 5;
pub const SUBCLASS2_GAMEPAD : i8 = 2;
pub const SUBCLASS2_JOYSTICK : i8 = 1;
pub const SUBCLASS2_REMOTE_CONTROL : i8 = 3;
pub const SUBCLASS2_SENSING_DEVICE : i8 = 4;
pub const SUBCLASS2_UNCATEGORIZED : i8 = 0;
}
}