binder_rpc_unstable_bindgen/
lib.rs

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
/* automatically generated by rust-bindgen 0.71.1 */

/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(clippy::missing_safety_doc)]

//! WARNING - This file was auto generated by //src/lib/android/binder/rust/rpcbinder/generate.py.
//! Do not modify this file. To re-generate, run the following command from the root of
//! your Fuchsia checkout:
//!
//!    ./src/lib/android/binder/rust/rpcbinder/generate.py

use binder_ndk_sys::AIBinder;

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ARpcServer {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ARpcSession {
    _unused: [u8; 0],
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ARpcSession_FileDescriptorTransportMode {
    None = 0,
    Unix = 1,
    Trusty = 2,
}
unsafe extern "C" {
    pub fn ARpcServer_newVsock(
        service: *mut AIBinder,
        cid: ::std::os::raw::c_uint,
        port: ::std::os::raw::c_uint,
        assignedPort: *mut ::std::os::raw::c_uint,
    ) -> *mut ARpcServer;
}
unsafe extern "C" {
    pub fn ARpcServer_newBoundSocket(
        service: *mut AIBinder,
        socketFd: ::std::os::raw::c_int,
    ) -> *mut ARpcServer;
}
unsafe extern "C" {
    pub fn ARpcServer_newUnixDomainBootstrap(
        service: *mut AIBinder,
        bootstrapFd: ::std::os::raw::c_int,
    ) -> *mut ARpcServer;
}
unsafe extern "C" {
    pub fn ARpcServer_newInet(
        service: *mut AIBinder,
        address: *const ::std::os::raw::c_char,
        port: ::std::os::raw::c_uint,
    ) -> *mut ARpcServer;
}
unsafe extern "C" {
    pub fn ARpcServer_setSupportedFileDescriptorTransportModes(
        handle: *mut ARpcServer,
        modes: *const ARpcSession_FileDescriptorTransportMode,
        modes_len: usize,
    );
}
unsafe extern "C" {
    pub fn ARpcServer_setMaxThreads(server: *mut ARpcServer, threads: usize);
}
unsafe extern "C" {
    pub fn ARpcServer_start(server: *mut ARpcServer);
}
unsafe extern "C" {
    pub fn ARpcServer_join(server: *mut ARpcServer);
}
unsafe extern "C" {
    pub fn ARpcServer_shutdown(server: *mut ARpcServer) -> bool;
}
unsafe extern "C" {
    pub fn ARpcServer_free(server: *mut ARpcServer);
}
unsafe extern "C" {
    pub fn ARpcSession_new() -> *mut ARpcSession;
}
unsafe extern "C" {
    pub fn ARpcSession_setupVsockClient(
        session: *mut ARpcSession,
        cid: ::std::os::raw::c_uint,
        port: ::std::os::raw::c_uint,
    ) -> *mut AIBinder;
}
unsafe extern "C" {
    pub fn ARpcSession_setupUnixDomainClient(
        session: *mut ARpcSession,
        name: *const ::std::os::raw::c_char,
    ) -> *mut AIBinder;
}
unsafe extern "C" {
    pub fn ARpcSession_setupUnixDomainBootstrapClient(
        session: *mut ARpcSession,
        bootstrapFd: ::std::os::raw::c_int,
    ) -> *mut AIBinder;
}
unsafe extern "C" {
    pub fn ARpcSession_setupInet(
        session: *mut ARpcSession,
        address: *const ::std::os::raw::c_char,
        port: ::std::os::raw::c_uint,
    ) -> *mut AIBinder;
}
unsafe extern "C" {
    pub fn ARpcSession_setupPreconnectedClient(
        session: *mut ARpcSession,
        requestFd: ::std::option::Option<
            unsafe extern "C" fn(param: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
        >,
        param: *mut ::std::os::raw::c_void,
    ) -> *mut AIBinder;
}
unsafe extern "C" {
    pub fn ARpcSession_setFileDescriptorTransportMode(
        session: *mut ARpcSession,
        mode: ARpcSession_FileDescriptorTransportMode,
    );
}
unsafe extern "C" {
    pub fn ARpcSession_setMaxIncomingThreads(session: *mut ARpcSession, threads: usize);
}
unsafe extern "C" {
    pub fn ARpcSession_setMaxOutgoingConnections(session: *mut ARpcSession, connections: usize);
}
unsafe extern "C" {
    pub fn ARpcSession_free(session: *mut ARpcSession);
}