Monado OpenXR Runtime
org.freedesktop.monado.ipc.hpp
Go to the documentation of this file.
1// Copyright 2020, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Partially-generated wrapper for the
6 * `org.freedesktop.monado.ipc` Java package.
7 * @author Rylie Pavlik <rylie.pavlik@collabora.com>
8 * @ingroup ipc_android
9 */
10
11#pragma once
12
13#include "wrap/ObjectWrapperBase.h"
14
15namespace wrap {
16namespace android::content {
17 class Context;
18} // namespace android::content
19
20namespace android::view {
21 class Surface;
22} // namespace android::view
23
24namespace org::freedesktop::monado::ipc {
25 class Client;
26 class IMonado;
27} // namespace org::freedesktop::monado::ipc
28
29} // namespace wrap
30
31namespace wrap {
32namespace org::freedesktop::monado::ipc {
33 /*!
34 * Wrapper for org.freedesktop.monado.ipc.Client objects.
35 */
37 {
38 public:
39 using ObjectWrapperBase::ObjectWrapperBase;
40 static constexpr const char *
41 getTypeName() noexcept
42 {
43 return "org/freedesktop/monado/ipc/Client";
44 }
45
46 static constexpr const char *
47 getFullyQualifiedTypeName() noexcept
48 {
49 return "org.freedesktop.monado.ipc.Client";
50 }
51
52 /*!
53 * Getter for the monado field value
54 *
55 * Java prototype:
56 * `public org.freedesktop.monado.ipc.IMonado monado;`
57 *
58 * JNI signature: Lorg/freedesktop/monado/ipc/IMonado;
59 *
60 */
62 getMonado() const;
63
64 /*!
65 * Getter for the failed field value
66 *
67 * Java prototype:
68 * `public boolean failed;`
69 *
70 * JNI signature: Z
71 *
72 */
73 bool
74 getFailed() const;
75
76 /*!
77 * Wrapper for a constructor
78 *
79 * Java prototype:
80 * `public org.freedesktop.monado.ipc.Client(long);`
81 *
82 * JNI signature: (J)V
83 *
84 */
85 static Client
86 construct(void *nativePointer);
87
88 /*!
89 * Wrapper for the markAsDiscardedByNative method
90 *
91 * Java prototype:
92 * `public void markAsDiscardedByNative();`
93 *
94 * JNI signature: ()V
95 *
96 */
97 void
99
100 /*!
101 * Wrapper for the blockingConnect method
102 *
103 * Java prototype:
104 * `public int blockingConnect(android.content.Context,
105 * java.lang.String);`
106 *
107 * JNI signature: (Landroid/content/Context;Ljava/lang/String;)I
108 *
109 */
110 int32_t
111 blockingConnect(android::content::Context const &context, std::string const &packageName);
112
113 /*!
114 * Initialize the static metadata of this wrapper with a known
115 * (non-null) Java class.
116 */
117 static void
118 staticInitClass(jni::jclass clazz)
119 {
120 Meta::data(clazz);
121 }
122
123 /*!
124 * Class metadata
125 */
126 struct Meta : public MetaBase
127 {
128 impl::WrappedFieldId<IMonado> monado;
129 impl::FieldId<bool> failed;
130 jni::method_t init;
131 jni::method_t markAsDiscardedByNative;
132 jni::method_t blockingConnect;
133
134 /*!
135 * Singleton accessor
136 */
137 static Meta &
138 data(jni::jclass clazz = nullptr)
139 {
140 static Meta instance{clazz};
141 return instance;
142 }
143
144 private:
145 Meta(jni::jclass clazz = nullptr);
146 };
147 };
148 /*!
149 * Wrapper for org.freedesktop.monado.ipc.IMonado objects.
150 */
152 {
153 public:
154 using ObjectWrapperBase::ObjectWrapperBase;
155 static constexpr const char *
156 getTypeName() noexcept
157 {
158 return "org/freedesktop/monado/ipc/IMonado";
159 }
160
161 /*!
162 * Wrapper for the passAppSurface method
163 *
164 * Java prototype:
165 * `public abstract void passAppSurface(android.view.Surface)
166 * throws android.os.RemoteException;`
167 *
168 * JNI signature: (Landroid/view/Surface;)V
169 *
170 */
171 void
172 passAppSurface(android::view::Surface const &surface);
173
174 /*!
175 * Class metadata
176 */
177 struct Meta : public MetaBase
178 {
179 jni::method_t passAppSurface;
180
181 /*!
182 * Singleton accessor
183 */
184 static Meta &
186 {
187 static Meta instance;
188 return instance;
189 }
190
191 private:
192 Meta(jni::jclass clazz = nullptr);
193 };
194 };
195} // namespace org::freedesktop::monado::ipc
196} // namespace wrap
Definition: context.hpp:57
Wrapper for org.freedesktop.monado.ipc.Client objects.
Definition: org.freedesktop.monado.ipc.hpp:37
IMonado getMonado() const
Getter for the monado field value.
Definition: org.freedesktop.monado.ipc.impl.hpp:20
void markAsDiscardedByNative()
Wrapper for the markAsDiscardedByNative method.
Definition: org.freedesktop.monado.ipc.impl.hpp:41
bool getFailed() const
Getter for the failed field value.
Definition: org.freedesktop.monado.ipc.impl.hpp:27
int32_t blockingConnect(android::content::Context const &context, std::string const &packageName)
Wrapper for the blockingConnect method.
Definition: org.freedesktop.monado.ipc.impl.hpp:48
static Client construct(void *nativePointer)
Wrapper for a constructor.
Definition: org.freedesktop.monado.ipc.impl.hpp:34
static void staticInitClass(jni::jclass clazz)
Initialize the static metadata of this wrapper with a known (non-null) Java class.
Definition: org.freedesktop.monado.ipc.hpp:118
Wrapper for org.freedesktop.monado.ipc.IMonado objects.
Definition: org.freedesktop.monado.ipc.hpp:152
void passAppSurface(android::view::Surface const &surface)
Wrapper for the passAppSurface method.
Definition: org.freedesktop.monado.ipc.impl.hpp:54
Inline implementations for partially-generated wrapper for the org.freedesktop.monado....
Class metadata.
Definition: org.freedesktop.monado.ipc.hpp:127
static Meta & data(jni::jclass clazz=nullptr)
Singleton accessor.
Definition: org.freedesktop.monado.ipc.hpp:138
Class metadata.
Definition: org.freedesktop.monado.ipc.hpp:178
static Meta & data()
Singleton accessor.
Definition: org.freedesktop.monado.ipc.hpp:185