361 lines
14 KiB
C++
361 lines
14 KiB
C++
/*
|
|
* This file is auto-generated. DO NOT MODIFY.
|
|
* Using: C:\\Users\\omara\\AppData\\Local\\Android\\Sdk\\build-tools/36.1.0/aidl.exe --lang=ndk --min_sdk_version=36 -I D:\\Dev\\Mosis\\MosisUnreal\\Plugins\\MosisSDK\\Source\\MosisSDK\\AIDL -o D:\\Dev\\Mosis\\MosisUnreal\\Plugins\\MosisSDK\\Source\\MosisSDK\\Generated -h D:\\Dev\\Mosis\\MosisUnreal\\Plugins\\MosisSDK\\Source\\MosisSDK\\Generated D:\\Dev\\Mosis\\MosisUnreal\\Plugins\\MosisSDK\\Source\\MosisSDK\\AIDL\\com/omixlab/mosis\\IMosisService.aidl
|
|
*
|
|
* DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
|
|
* ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
|
|
* AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
|
|
*/
|
|
#include "aidl/com/omixlab/mosis/IMosisService.h"
|
|
|
|
#include <cstdint>
|
|
#include <android/binder_parcel.h>
|
|
#include <android/binder_parcel_utils.h>
|
|
#include <android/binder_status.h>
|
|
#include <aidl/com/omixlab/mosis/BnMosisListener.h>
|
|
#include <aidl/com/omixlab/mosis/BnMosisService.h>
|
|
#include <aidl/com/omixlab/mosis/BpMosisListener.h>
|
|
#include <aidl/com/omixlab/mosis/BpMosisService.h>
|
|
#include <aidl/com/omixlab/mosis/IMosisListener.h>
|
|
|
|
namespace aidl {
|
|
namespace com {
|
|
namespace omixlab {
|
|
namespace mosis {
|
|
static binder_status_t _aidl_com_omixlab_mosis_IMosisService_onTransact(AIBinder* _aidl_binder, transaction_code_t _aidl_code, const AParcel* _aidl_in, AParcel* _aidl_out) {
|
|
(void)_aidl_in;
|
|
(void)_aidl_out;
|
|
binder_status_t _aidl_ret_status = STATUS_UNKNOWN_TRANSACTION;
|
|
std::shared_ptr<BnMosisService> _aidl_impl = std::static_pointer_cast<BnMosisService>(::ndk::ICInterface::asInterface(_aidl_binder));
|
|
switch (_aidl_code) {
|
|
case (FIRST_CALL_TRANSACTION + 0 /*initOS*/): {
|
|
std::shared_ptr<::aidl::com::omixlab::mosis::IMosisListener> in_listener;
|
|
bool _aidl_return;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_listener);
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
::ndk::ScopedAStatus _aidl_status = _aidl_impl->initOS(in_listener, &_aidl_return);
|
|
_aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
if (!AStatus_isOk(_aidl_status.get())) break;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_out, _aidl_return);
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
break;
|
|
}
|
|
case (FIRST_CALL_TRANSACTION + 1 /*onTouchDown*/): {
|
|
float in_x;
|
|
float in_y;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_x);
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_y);
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
::ndk::ScopedAStatus _aidl_status = _aidl_impl->onTouchDown(in_x, in_y);
|
|
_aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
if (!AStatus_isOk(_aidl_status.get())) break;
|
|
|
|
break;
|
|
}
|
|
case (FIRST_CALL_TRANSACTION + 2 /*onTouchMove*/): {
|
|
float in_x;
|
|
float in_y;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_x);
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_y);
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
::ndk::ScopedAStatus _aidl_status = _aidl_impl->onTouchMove(in_x, in_y);
|
|
_aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
if (!AStatus_isOk(_aidl_status.get())) break;
|
|
|
|
break;
|
|
}
|
|
case (FIRST_CALL_TRANSACTION + 3 /*onTouchUp*/): {
|
|
float in_x;
|
|
float in_y;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_x);
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_y);
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
::ndk::ScopedAStatus _aidl_status = _aidl_impl->onTouchUp(in_x, in_y);
|
|
_aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
|
|
if (_aidl_ret_status != STATUS_OK) break;
|
|
|
|
if (!AStatus_isOk(_aidl_status.get())) break;
|
|
|
|
break;
|
|
}
|
|
}
|
|
return _aidl_ret_status;
|
|
}
|
|
|
|
static AIBinder_Class* _g_aidl_com_omixlab_mosis_IMosisService_clazz = ::ndk::ICInterface::defineClass(IMosisService::descriptor, _aidl_com_omixlab_mosis_IMosisService_onTransact, nullptr, 0);
|
|
|
|
BpMosisService::BpMosisService(const ::ndk::SpAIBinder& binder) : BpCInterface(binder) {}
|
|
BpMosisService::~BpMosisService() {}
|
|
|
|
::ndk::ScopedAStatus BpMosisService::initOS(const std::shared_ptr<::aidl::com::omixlab::mosis::IMosisListener>& in_listener, bool* _aidl_return) {
|
|
binder_status_t _aidl_ret_status = STATUS_OK;
|
|
::ndk::ScopedAStatus _aidl_status;
|
|
::ndk::ScopedAParcel _aidl_in;
|
|
::ndk::ScopedAParcel _aidl_out;
|
|
|
|
_aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_listener);
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = AIBinder_transact(
|
|
asBinderReference().get(),
|
|
(FIRST_CALL_TRANSACTION + 0 /*initOS*/),
|
|
_aidl_in.getR(),
|
|
_aidl_out.getR(),
|
|
0
|
|
#ifdef BINDER_STABILITY_SUPPORT
|
|
| static_cast<int>(FLAG_PRIVATE_LOCAL)
|
|
#endif // BINDER_STABILITY_SUPPORT
|
|
);
|
|
if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IMosisService::getDefaultImpl()) {
|
|
_aidl_status = IMosisService::getDefaultImpl()->initOS(in_listener, _aidl_return);
|
|
goto _aidl_status_return;
|
|
}
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
|
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_out.get(), _aidl_return);
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_error:
|
|
_aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
|
|
_aidl_status_return:
|
|
return _aidl_status;
|
|
}
|
|
::ndk::ScopedAStatus BpMosisService::onTouchDown(float in_x, float in_y) {
|
|
binder_status_t _aidl_ret_status = STATUS_OK;
|
|
::ndk::ScopedAStatus _aidl_status;
|
|
::ndk::ScopedAParcel _aidl_in;
|
|
::ndk::ScopedAParcel _aidl_out;
|
|
|
|
_aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_x);
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_y);
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = AIBinder_transact(
|
|
asBinderReference().get(),
|
|
(FIRST_CALL_TRANSACTION + 1 /*onTouchDown*/),
|
|
_aidl_in.getR(),
|
|
_aidl_out.getR(),
|
|
0
|
|
#ifdef BINDER_STABILITY_SUPPORT
|
|
| static_cast<int>(FLAG_PRIVATE_LOCAL)
|
|
#endif // BINDER_STABILITY_SUPPORT
|
|
);
|
|
if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IMosisService::getDefaultImpl()) {
|
|
_aidl_status = IMosisService::getDefaultImpl()->onTouchDown(in_x, in_y);
|
|
goto _aidl_status_return;
|
|
}
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
|
|
_aidl_error:
|
|
_aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
|
|
_aidl_status_return:
|
|
return _aidl_status;
|
|
}
|
|
::ndk::ScopedAStatus BpMosisService::onTouchMove(float in_x, float in_y) {
|
|
binder_status_t _aidl_ret_status = STATUS_OK;
|
|
::ndk::ScopedAStatus _aidl_status;
|
|
::ndk::ScopedAParcel _aidl_in;
|
|
::ndk::ScopedAParcel _aidl_out;
|
|
|
|
_aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_x);
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_y);
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = AIBinder_transact(
|
|
asBinderReference().get(),
|
|
(FIRST_CALL_TRANSACTION + 2 /*onTouchMove*/),
|
|
_aidl_in.getR(),
|
|
_aidl_out.getR(),
|
|
0
|
|
#ifdef BINDER_STABILITY_SUPPORT
|
|
| static_cast<int>(FLAG_PRIVATE_LOCAL)
|
|
#endif // BINDER_STABILITY_SUPPORT
|
|
);
|
|
if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IMosisService::getDefaultImpl()) {
|
|
_aidl_status = IMosisService::getDefaultImpl()->onTouchMove(in_x, in_y);
|
|
goto _aidl_status_return;
|
|
}
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
|
|
_aidl_error:
|
|
_aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
|
|
_aidl_status_return:
|
|
return _aidl_status;
|
|
}
|
|
::ndk::ScopedAStatus BpMosisService::onTouchUp(float in_x, float in_y) {
|
|
binder_status_t _aidl_ret_status = STATUS_OK;
|
|
::ndk::ScopedAStatus _aidl_status;
|
|
::ndk::ScopedAParcel _aidl_in;
|
|
::ndk::ScopedAParcel _aidl_out;
|
|
|
|
_aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_x);
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_y);
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = AIBinder_transact(
|
|
asBinderReference().get(),
|
|
(FIRST_CALL_TRANSACTION + 3 /*onTouchUp*/),
|
|
_aidl_in.getR(),
|
|
_aidl_out.getR(),
|
|
0
|
|
#ifdef BINDER_STABILITY_SUPPORT
|
|
| static_cast<int>(FLAG_PRIVATE_LOCAL)
|
|
#endif // BINDER_STABILITY_SUPPORT
|
|
);
|
|
if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IMosisService::getDefaultImpl()) {
|
|
_aidl_status = IMosisService::getDefaultImpl()->onTouchUp(in_x, in_y);
|
|
goto _aidl_status_return;
|
|
}
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
_aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
|
|
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
|
|
if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
|
|
_aidl_error:
|
|
_aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
|
|
_aidl_status_return:
|
|
return _aidl_status;
|
|
}
|
|
// Source for BnMosisService
|
|
BnMosisService::BnMosisService() {}
|
|
BnMosisService::~BnMosisService() {}
|
|
::ndk::SpAIBinder BnMosisService::createBinder() {
|
|
AIBinder* binder = AIBinder_new(_g_aidl_com_omixlab_mosis_IMosisService_clazz, static_cast<void*>(this));
|
|
#ifdef BINDER_STABILITY_SUPPORT
|
|
AIBinder_markCompilationUnitStability(binder);
|
|
#endif // BINDER_STABILITY_SUPPORT
|
|
return ::ndk::SpAIBinder(binder);
|
|
}
|
|
// Source for IMosisService
|
|
const char* IMosisService::descriptor = "com.omixlab.mosis.IMosisService";
|
|
IMosisService::IMosisService() {}
|
|
IMosisService::~IMosisService() {}
|
|
|
|
|
|
std::shared_ptr<IMosisService> IMosisService::fromBinder(const ::ndk::SpAIBinder& binder) {
|
|
if (!AIBinder_associateClass(binder.get(), _g_aidl_com_omixlab_mosis_IMosisService_clazz)) {
|
|
#if __ANDROID_API__ >= 31
|
|
const AIBinder_Class* originalClass = AIBinder_getClass(binder.get());
|
|
if (originalClass == nullptr) return nullptr;
|
|
if (0 == strcmp(AIBinder_Class_getDescriptor(originalClass), descriptor)) {
|
|
return ::ndk::SharedRefBase::make<BpMosisService>(binder);
|
|
}
|
|
#endif
|
|
return nullptr;
|
|
}
|
|
std::shared_ptr<::ndk::ICInterface> interface = ::ndk::ICInterface::asInterface(binder.get());
|
|
if (interface) {
|
|
return std::static_pointer_cast<IMosisService>(interface);
|
|
}
|
|
return ::ndk::SharedRefBase::make<BpMosisService>(binder);
|
|
}
|
|
|
|
binder_status_t IMosisService::writeToParcel(AParcel* parcel, const std::shared_ptr<IMosisService>& instance) {
|
|
return AParcel_writeStrongBinder(parcel, instance ? instance->asBinder().get() : nullptr);
|
|
}
|
|
binder_status_t IMosisService::readFromParcel(const AParcel* parcel, std::shared_ptr<IMosisService>* instance) {
|
|
::ndk::SpAIBinder binder;
|
|
binder_status_t status = AParcel_readStrongBinder(parcel, binder.getR());
|
|
if (status != STATUS_OK) return status;
|
|
*instance = IMosisService::fromBinder(binder);
|
|
return STATUS_OK;
|
|
}
|
|
bool IMosisService::setDefaultImpl(const std::shared_ptr<IMosisService>& impl) {
|
|
// Only one user of this interface can use this function
|
|
// at a time. This is a heuristic to detect if two different
|
|
// users in the same process use this function.
|
|
assert(!IMosisService::default_impl);
|
|
if (impl) {
|
|
IMosisService::default_impl = impl;
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
const std::shared_ptr<IMosisService>& IMosisService::getDefaultImpl() {
|
|
return IMosisService::default_impl;
|
|
}
|
|
std::shared_ptr<IMosisService> IMosisService::default_impl = nullptr;
|
|
::ndk::ScopedAStatus IMosisServiceDefault::initOS(const std::shared_ptr<::aidl::com::omixlab::mosis::IMosisListener>& /*in_listener*/, bool* /*_aidl_return*/) {
|
|
::ndk::ScopedAStatus _aidl_status;
|
|
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
|
|
return _aidl_status;
|
|
}
|
|
::ndk::ScopedAStatus IMosisServiceDefault::onTouchDown(float /*in_x*/, float /*in_y*/) {
|
|
::ndk::ScopedAStatus _aidl_status;
|
|
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
|
|
return _aidl_status;
|
|
}
|
|
::ndk::ScopedAStatus IMosisServiceDefault::onTouchMove(float /*in_x*/, float /*in_y*/) {
|
|
::ndk::ScopedAStatus _aidl_status;
|
|
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
|
|
return _aidl_status;
|
|
}
|
|
::ndk::ScopedAStatus IMosisServiceDefault::onTouchUp(float /*in_x*/, float /*in_y*/) {
|
|
::ndk::ScopedAStatus _aidl_status;
|
|
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
|
|
return _aidl_status;
|
|
}
|
|
::ndk::SpAIBinder IMosisServiceDefault::asBinder() {
|
|
return ::ndk::SpAIBinder();
|
|
}
|
|
bool IMosisServiceDefault::isRemote() {
|
|
return false;
|
|
}
|
|
} // namespace mosis
|
|
} // namespace omixlab
|
|
} // namespace com
|
|
} // namespace aidl
|