binder_rpc_unstable_bindgen/
lib.rs

1/* automatically generated by rust-bindgen 0.72.0 */
2
3/*
4 * Copyright (C) 2021 The Android Open Source Project
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *      http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19// LINT.IfChange
20
21#![allow(dead_code)]
22#![allow(non_camel_case_types)]
23#![allow(non_snake_case)]
24#![allow(non_upper_case_globals)]
25#![allow(clippy::missing_safety_doc)]
26#![allow(clippy::undocumented_unsafe_blocks, reason = "bindgen-generated code")]
27
28//! WARNING - This file was auto generated by //src/lib/android/binder/rust/rpcbinder/generate.py.
29//! Do not modify this file. To re-generate, run the following command from the root of
30//! your Fuchsia checkout:
31//!
32//!    ./src/lib/android/binder/rust/rpcbinder/generate.py
33
34use binder_ndk_sys::AIBinder;
35
36#[repr(C)]
37#[derive(Debug, Copy, Clone)]
38pub struct ARpcServer {
39    _unused: [u8; 0],
40}
41#[repr(C)]
42#[derive(Debug, Copy, Clone)]
43pub struct ARpcSession {
44    _unused: [u8; 0],
45}
46#[repr(i32)]
47#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
48pub enum ARpcSession_FileDescriptorTransportMode {
49    None = 0,
50    Unix = 1,
51    Trusty = 2,
52}
53unsafe extern "C" {
54    pub fn ARpcServer_newVsock(
55        service: *mut AIBinder,
56        cid: ::std::os::raw::c_uint,
57        port: ::std::os::raw::c_uint,
58        assignedPort: *mut ::std::os::raw::c_uint,
59    ) -> *mut ARpcServer;
60}
61unsafe extern "C" {
62    pub fn ARpcServer_newBoundSocket(
63        service: *mut AIBinder,
64        socketFd: ::std::os::raw::c_int,
65    ) -> *mut ARpcServer;
66}
67unsafe extern "C" {
68    pub fn ARpcServer_newUnixDomainBootstrap(
69        service: *mut AIBinder,
70        bootstrapFd: ::std::os::raw::c_int,
71    ) -> *mut ARpcServer;
72}
73unsafe extern "C" {
74    pub fn ARpcServer_newInet(
75        service: *mut AIBinder,
76        address: *const ::std::os::raw::c_char,
77        port: ::std::os::raw::c_uint,
78    ) -> *mut ARpcServer;
79}
80unsafe extern "C" {
81    pub fn ARpcServer_setSupportedFileDescriptorTransportModes(
82        handle: *mut ARpcServer,
83        modes: *const ARpcSession_FileDescriptorTransportMode,
84        modes_len: usize,
85    );
86}
87unsafe extern "C" {
88    pub fn ARpcServer_setMaxThreads(server: *mut ARpcServer, threads: usize);
89}
90unsafe extern "C" {
91    pub fn ARpcServer_start(server: *mut ARpcServer);
92}
93unsafe extern "C" {
94    pub fn ARpcServer_join(server: *mut ARpcServer);
95}
96unsafe extern "C" {
97    pub fn ARpcServer_shutdown(server: *mut ARpcServer) -> bool;
98}
99unsafe extern "C" {
100    pub fn ARpcServer_free(server: *mut ARpcServer);
101}
102unsafe extern "C" {
103    pub fn ARpcSession_new() -> *mut ARpcSession;
104}
105unsafe extern "C" {
106    pub fn ARpcSession_setupVsockClient(
107        session: *mut ARpcSession,
108        cid: ::std::os::raw::c_uint,
109        port: ::std::os::raw::c_uint,
110    ) -> *mut AIBinder;
111}
112unsafe extern "C" {
113    pub fn ARpcSession_setupUnixDomainClient(
114        session: *mut ARpcSession,
115        name: *const ::std::os::raw::c_char,
116    ) -> *mut AIBinder;
117}
118unsafe extern "C" {
119    pub fn ARpcSession_setupUnixDomainBootstrapClient(
120        session: *mut ARpcSession,
121        bootstrapFd: ::std::os::raw::c_int,
122    ) -> *mut AIBinder;
123}
124unsafe extern "C" {
125    pub fn ARpcSession_setupInet(
126        session: *mut ARpcSession,
127        address: *const ::std::os::raw::c_char,
128        port: ::std::os::raw::c_uint,
129    ) -> *mut AIBinder;
130}
131unsafe extern "C" {
132    pub fn ARpcSession_setupPreconnectedClient(
133        session: *mut ARpcSession,
134        requestFd: ::std::option::Option<
135            unsafe extern "C" fn(param: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
136        >,
137        param: *mut ::std::os::raw::c_void,
138    ) -> *mut AIBinder;
139}
140unsafe extern "C" {
141    pub fn ARpcSession_setFileDescriptorTransportMode(
142        session: *mut ARpcSession,
143        mode: ARpcSession_FileDescriptorTransportMode,
144    );
145}
146unsafe extern "C" {
147    pub fn ARpcSession_setMaxIncomingThreads(session: *mut ARpcSession, threads: usize);
148}
149unsafe extern "C" {
150    pub fn ARpcSession_setMaxOutgoingConnections(session: *mut ARpcSession, connections: usize);
151}
152unsafe extern "C" {
153    pub fn ARpcSession_free(session: *mut ARpcSession);
154}
155
156// LINT.ThenChange(
157//    //third_party/android/platform/frameworks/native/libs/binder/include_rpc_unstable/binder_rpc_unstable.hpp |
158//    //third_party/android/platform/frameworks/native/libs/binder/rust/rpcbinder/BinderBindings.hpp
159//)