libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
binder.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include<libtransistor/types.h>
14 
19 typedef struct binder_t {
20  int32_t handle;
21 } binder_t;
22 
27 typedef struct {
28  uint32_t type;
29  uint32_t flags;
30 
31  union {
32  void *binder;
33  int32_t handle;
34  };
35 
36  void *cookie;
38 
46 result_t binder_adjust_refcount(binder_t *binder, int32_t addval, int32_t type);
47 
57 result_t binder_transact_parcel(binder_t *binder, uint32_t transaction, uint32_t flags, parcel_t *in, parcel_t *out);
58 
62 result_t binder_get_native_handle(binder_t *binder, uint32_t id, revent_h *out);
63 
64 #ifdef __cplusplus
65 }
66 #endif
result_t binder_transact_parcel(binder_t *binder, uint32_t transaction, uint32_t flags, parcel_t *in, parcel_t *out)
Perform a transaction on the given binder.
Various system types.
Represents a parcel.
Definition: parcel.h:21
Data structures and functions for packing/unpacking Android Parcels.
uint32_t result_t
Function result.
Definition: types.h:51
handle_t revent_h
revent handle
Definition: types.h:47
result_t binder_get_native_handle(binder_t *binder, uint32_t id, revent_h *out)
Gets a native handle from a binder.
Represents a remote interface.
Definition: binder.h:19
Binder object as included in a Parcel.
Definition: binder.h:27
result_t binder_adjust_refcount(binder_t *binder, int32_t addval, int32_t type)
Adjusts the binder's reference count.