// Copyright 2020, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file * @brief Inline implementations for partially-generated wrapper for the * `org.freedesktop.monado.ipc` Java package - do not include on its own! * @author Rylie Pavlik * @ingroup ipc_android */ #pragma once #include "wrap/android.content.h" #include "wrap/android.view.h" #include namespace wrap { namespace org::freedesktop::monado::ipc { inline IMonado Client::getMonado() const { assert(!isNull()); return get(Meta::data().monado, object()); } inline bool Client::getFailed() const { assert(!isNull()); return get(Meta::data().failed, object()); } inline Client Client::construct(void *nativePointer) { return Client(Meta::data().clazz().newInstance( Meta::data().init, static_cast(reinterpret_cast(nativePointer)))); } inline void Client::markAsDiscardedByNative() { assert(!isNull()); return object().call(Meta::data().markAsDiscardedByNative); } inline int32_t Client::blockingConnect(android::content::Context const &context, std::string const &packageName) { assert(!isNull()); return object().call(Meta::data().blockingConnect, context.object(), packageName); } inline void IMonado::passAppSurface(android::view::Surface const &surface) { assert(!isNull()); return object().call(Meta::data().passAppSurface, surface.object()); } } // namespace org::freedesktop::monado::ipc } // namespace wrap