Monado OpenXR Runtime
ipc_client_android.h
Go to the documentation of this file.
1
// Copyright 2020, Collabora, Ltd.
2
// SPDX-License-Identifier: BSL-1.0
3
/*!
4
* @file
5
* @brief Header exposing Android-specific IPC client code to C.
6
* @author Rylie Pavlik <rylie.pavlik@collabora.com>
7
* @ingroup ipc_android
8
*/
9
10
#pragma once
11
12
#include <
xrt/xrt_config_os.h
>
13
14
#ifdef XRT_OS_ANDROID
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
20
struct
_JavaVM;
21
22
/**
23
* @brief Opaque structure owning the client side of an Android IPC connection.
24
*
25
*/
26
struct
ipc_client_android
;
27
28
/**
29
* @brief Create an ipc_client_android object.
30
*
31
* Uses org.freedesktop.monado.ipc.Client
32
*
33
* @param vm Java VM pointer
34
* @param activity An android.app.Activity jobject, cast to `void *`.
35
*
36
* @return struct ipc_client_android*
37
*
38
* @public @memberof ipc_client_android
39
*/
40
struct
ipc_client_android
*
41
ipc_client_android_create(
struct
_JavaVM *vm,
void
*activity);
42
43
/**
44
* @brief Make a blocking call to connect to an IPC server and establish socket
45
* connection.
46
*
47
* @param ica
48
* @return int file descriptor: -1 in case of error. Do not close it!
49
*
50
* @public @memberof ipc_client_android
51
*/
52
int
53
ipc_client_android_blocking_connect(
struct
ipc_client_android
*ica);
54
55
56
/**
57
* @brief Destroy an ipc_client_android object.
58
*
59
* @param ptr_ica
60
*
61
* @public @memberof ipc_client_android
62
*/
63
void
64
ipc_client_android_destroy(
struct
ipc_client_android
**ptr_ica);
65
66
#ifdef __cplusplus
67
}
68
#endif
69
70
#endif
// XRT_OS_ANDROID
ipc_client_android
Definition:
ipc_client_android.cpp:27
xrt_config_os.h
Auto detect OS and certain features.
ipc
android
ipc_client_android.h
Generated by
1.9.4