#include #include #include #include #include #include #include #include #include #include "gen_qmediarecordercontrol.h" #ifndef _Bool #define _Bool bool #endif #include "_cgo_export.h" void QMediaRecorderControl_virtbase(QMediaRecorderControl* src, QMediaControl** outptr_QMediaControl) { *outptr_QMediaControl = static_cast(src); } QMetaObject* QMediaRecorderControl_MetaObject(const QMediaRecorderControl* self) { return (QMetaObject*) self->metaObject(); } void* QMediaRecorderControl_Metacast(QMediaRecorderControl* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QMediaRecorderControl_Tr(const char* s) { QString _ret = QMediaRecorderControl::tr(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QMediaRecorderControl_TrUtf8(const char* s) { QString _ret = QMediaRecorderControl::trUtf8(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } QUrl* QMediaRecorderControl_OutputLocation(const QMediaRecorderControl* self) { return new QUrl(self->outputLocation()); } bool QMediaRecorderControl_SetOutputLocation(QMediaRecorderControl* self, QUrl* location) { return self->setOutputLocation(*location); } int QMediaRecorderControl_State(const QMediaRecorderControl* self) { QMediaRecorder::State _ret = self->state(); return static_cast(_ret); } int QMediaRecorderControl_Status(const QMediaRecorderControl* self) { QMediaRecorder::Status _ret = self->status(); return static_cast(_ret); } long long QMediaRecorderControl_Duration(const QMediaRecorderControl* self) { qint64 _ret = self->duration(); return static_cast(_ret); } bool QMediaRecorderControl_IsMuted(const QMediaRecorderControl* self) { return self->isMuted(); } double QMediaRecorderControl_Volume(const QMediaRecorderControl* self) { qreal _ret = self->volume(); return static_cast(_ret); } void QMediaRecorderControl_ApplySettings(QMediaRecorderControl* self) { self->applySettings(); } void QMediaRecorderControl_StateChanged(QMediaRecorderControl* self, int state) { self->stateChanged(static_cast(state)); } void QMediaRecorderControl_connect_StateChanged(QMediaRecorderControl* self, intptr_t slot) { QMediaRecorderControl::connect(self, static_cast(&QMediaRecorderControl::stateChanged), self, [=](QMediaRecorder::State state) { QMediaRecorder::State state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QMediaRecorderControl_StateChanged(slot, sigval1); }); } void QMediaRecorderControl_StatusChanged(QMediaRecorderControl* self, int status) { self->statusChanged(static_cast(status)); } void QMediaRecorderControl_connect_StatusChanged(QMediaRecorderControl* self, intptr_t slot) { QMediaRecorderControl::connect(self, static_cast(&QMediaRecorderControl::statusChanged), self, [=](QMediaRecorder::Status status) { QMediaRecorder::Status status_ret = status; int sigval1 = static_cast(status_ret); miqt_exec_callback_QMediaRecorderControl_StatusChanged(slot, sigval1); }); } void QMediaRecorderControl_DurationChanged(QMediaRecorderControl* self, long long position) { self->durationChanged(static_cast(position)); } void QMediaRecorderControl_connect_DurationChanged(QMediaRecorderControl* self, intptr_t slot) { QMediaRecorderControl::connect(self, static_cast(&QMediaRecorderControl::durationChanged), self, [=](qint64 position) { qint64 position_ret = position; long long sigval1 = static_cast(position_ret); miqt_exec_callback_QMediaRecorderControl_DurationChanged(slot, sigval1); }); } void QMediaRecorderControl_MutedChanged(QMediaRecorderControl* self, bool muted) { self->mutedChanged(muted); } void QMediaRecorderControl_connect_MutedChanged(QMediaRecorderControl* self, intptr_t slot) { QMediaRecorderControl::connect(self, static_cast(&QMediaRecorderControl::mutedChanged), self, [=](bool muted) { bool sigval1 = muted; miqt_exec_callback_QMediaRecorderControl_MutedChanged(slot, sigval1); }); } void QMediaRecorderControl_VolumeChanged(QMediaRecorderControl* self, double volume) { self->volumeChanged(static_cast(volume)); } void QMediaRecorderControl_connect_VolumeChanged(QMediaRecorderControl* self, intptr_t slot) { QMediaRecorderControl::connect(self, static_cast(&QMediaRecorderControl::volumeChanged), self, [=](qreal volume) { qreal volume_ret = volume; double sigval1 = static_cast(volume_ret); miqt_exec_callback_QMediaRecorderControl_VolumeChanged(slot, sigval1); }); } void QMediaRecorderControl_ActualLocationChanged(QMediaRecorderControl* self, QUrl* location) { self->actualLocationChanged(*location); } void QMediaRecorderControl_connect_ActualLocationChanged(QMediaRecorderControl* self, intptr_t slot) { QMediaRecorderControl::connect(self, static_cast(&QMediaRecorderControl::actualLocationChanged), self, [=](const QUrl& location) { const QUrl& location_ret = location; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&location_ret); miqt_exec_callback_QMediaRecorderControl_ActualLocationChanged(slot, sigval1); }); } void QMediaRecorderControl_Error(QMediaRecorderControl* self, int error, struct miqt_string errorString) { QString errorString_QString = QString::fromUtf8(errorString.data, errorString.len); self->error(static_cast(error), errorString_QString); } void QMediaRecorderControl_connect_Error(QMediaRecorderControl* self, intptr_t slot) { QMediaRecorderControl::connect(self, static_cast(&QMediaRecorderControl::error), self, [=](int error, const QString& errorString) { int sigval1 = error; const QString errorString_ret = errorString; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray errorString_b = errorString_ret.toUtf8(); struct miqt_string errorString_ms; errorString_ms.len = errorString_b.length(); errorString_ms.data = static_cast(malloc(errorString_ms.len)); memcpy(errorString_ms.data, errorString_b.data(), errorString_ms.len); struct miqt_string sigval2 = errorString_ms; miqt_exec_callback_QMediaRecorderControl_Error(slot, sigval1, sigval2); }); } void QMediaRecorderControl_SetState(QMediaRecorderControl* self, int state) { self->setState(static_cast(state)); } void QMediaRecorderControl_SetMuted(QMediaRecorderControl* self, bool muted) { self->setMuted(muted); } void QMediaRecorderControl_SetVolume(QMediaRecorderControl* self, double volume) { self->setVolume(static_cast(volume)); } struct miqt_string QMediaRecorderControl_Tr2(const char* s, const char* c) { QString _ret = QMediaRecorderControl::tr(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QMediaRecorderControl_Tr3(const char* s, const char* c, int n) { QString _ret = QMediaRecorderControl::tr(s, c, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QMediaRecorderControl_TrUtf82(const char* s, const char* c) { QString _ret = QMediaRecorderControl::trUtf8(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QMediaRecorderControl_TrUtf83(const char* s, const char* c, int n) { QString _ret = QMediaRecorderControl::trUtf8(s, c, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } void QMediaRecorderControl_Delete(QMediaRecorderControl* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }