ndkm_sys/android/
file_descriptor_jni.rs1extern "C" {
4 #[doc = " Returns a new java.io.FileDescriptor.\n\n The FileDescriptor created represents an invalid Unix file descriptor (represented by\n a file descriptor value of -1).\n\n Callers of this method should be aware that it can fail, returning NULL with a pending Java\n exception.\n\n Available since API level 31.\n\n \\param env a pointer to the JNI Native Interface of the current thread.\n \\return a java.io.FileDescriptor on success, nullptr if insufficient heap memory is available."]
5 pub fn AFileDescriptor_create(env: *mut JNIEnv) -> jobject;
6 #[doc = " Returns the Unix file descriptor represented by the given java.io.FileDescriptor.\n\n A return value of -1 indicates that \\a fileDescriptor represents an invalid file descriptor.\n\n Aborts the program if \\a fileDescriptor is not a java.io.FileDescriptor instance.\n\n Available since API level 31.\n\n \\param env a pointer to the JNI Native Interface of the current thread.\n \\param fileDescriptor a java.io.FileDescriptor instance.\n \\return the Unix file descriptor wrapped by \\a fileDescriptor."]
7 pub fn AFileDescriptor_getFd(env: *mut JNIEnv, fileDescriptor: jobject) -> ::std::os::raw::c_int;
8 #[doc = " Sets the Unix file descriptor represented by the given java.io.FileDescriptor.\n\n This function performs no validation of the Unix file descriptor argument, \\a fd. Android uses\n the value -1 to represent an invalid file descriptor, all other values are considered valid.\n The validity of a file descriptor can be checked with FileDescriptor#valid().\n\n Aborts the program if \\a fileDescriptor is not a java.io.FileDescriptor instance.\n\n Available since API level 31.\n\n \\param env a pointer to the JNI Native Interface of the current thread.\n \\param fileDescriptor a java.io.FileDescriptor instance.\n \\param fd a Unix file descriptor that \\a fileDescriptor will subsequently represent."]
9 pub fn AFileDescriptor_setFd(env: *mut JNIEnv, fileDescriptor: jobject, fd: ::std::os::raw::c_int);
10}