mirror of
https://github.com/odin-lang/Odin.git
synced 2026-11-01 08:19:34 -05:00
44 lines
2.0 KiB
Odin
44 lines
2.0 KiB
Odin
// Generated by core/sys/android/_gen/generate.py from the Android NDK headers. DO NOT EDIT.
|
|
// Source: <android/multinetwork.h> (NDK r30, 30.0.16248370)
|
|
#+build linux
|
|
package android
|
|
|
|
import "core:c"
|
|
import "core:sys/posix"
|
|
|
|
foreign import libandroid "system:android"
|
|
|
|
net_handle_t :: u64
|
|
|
|
ResNsendFlag :: enum u32 {
|
|
NO_RETRY = 0,
|
|
NO_CACHE_STORE = 1,
|
|
NO_CACHE_LOOKUP = 2,
|
|
}
|
|
ResNsendFlags :: distinct bit_set[ResNsendFlag; u32]
|
|
|
|
NetworkBlockedReason :: enum i32 {
|
|
NONE = 0,
|
|
LNP = 1,
|
|
}
|
|
|
|
NETWORK_UNSPECIFIED :: 0
|
|
|
|
@(default_calling_convention="c")
|
|
foreign libandroid {
|
|
android_setsocknetwork :: proc(network: net_handle_t, fd: c.int) -> c.int ---
|
|
android_setprocnetwork :: proc(network: net_handle_t) -> c.int ---
|
|
android_getprocnetwork :: proc(network: ^net_handle_t) -> c.int --- // API level 31
|
|
android_setprocdns :: proc(network: net_handle_t) -> c.int --- // API level 31
|
|
android_getprocdns :: proc(network: ^net_handle_t) -> c.int --- // API level 31
|
|
android_getaddrinfofornetwork :: proc(network: net_handle_t, node: cstring, service: cstring, hints: ^posix.addrinfo, res: ^^posix.addrinfo) -> c.int ---
|
|
android_res_nquery :: proc(network: net_handle_t, dname: cstring, ns_class: c.int, ns_type: c.int, flags: ResNsendFlags) -> c.int ---
|
|
android_res_nsend :: proc(network: net_handle_t, msg: ^u8, msglen: c.size_t, flags: ResNsendFlags) -> c.int ---
|
|
android_res_nresult :: proc(fd: c.int, rcode: ^c.int, answer: ^u8, anslen: c.size_t) -> c.int ---
|
|
android_res_cancel :: proc(nsend_fd: c.int) ---
|
|
android_tag_socket_with_uid :: proc(sockfd: c.int, tag: u32, uid: u32) -> c.int --- // API level 33
|
|
android_tag_socket :: proc(sockfd: c.int, tag: u32) -> c.int --- // API level 33
|
|
android_untag_socket :: proc(sockfd: c.int) -> c.int --- // API level 33
|
|
android_getnetworkblockedreason :: proc(sockfd: c.int) -> i32 --- // API level 37
|
|
}
|