2024-11-04 09:53:04 +00:00
|
|
|
#include <QList>
|
|
|
|
#include <QNetworkConfiguration>
|
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include <qnetworkconfiguration.h>
|
|
|
|
#include "gen_qnetworkconfiguration.h"
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QNetworkConfiguration_new(QNetworkConfiguration** outptr_QNetworkConfiguration) {
|
|
|
|
QNetworkConfiguration* ret = new QNetworkConfiguration();
|
|
|
|
*outptr_QNetworkConfiguration = ret;
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QNetworkConfiguration_new2(QNetworkConfiguration* other, QNetworkConfiguration** outptr_QNetworkConfiguration) {
|
|
|
|
QNetworkConfiguration* ret = new QNetworkConfiguration(*other);
|
|
|
|
*outptr_QNetworkConfiguration = ret;
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QNetworkConfiguration_OperatorAssign(QNetworkConfiguration* self, QNetworkConfiguration* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QNetworkConfiguration_Swap(QNetworkConfiguration* self, QNetworkConfiguration* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QNetworkConfiguration_OperatorEqual(const QNetworkConfiguration* self, QNetworkConfiguration* other) {
|
|
|
|
return self->operator==(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QNetworkConfiguration_OperatorNotEqual(const QNetworkConfiguration* self, QNetworkConfiguration* other) {
|
|
|
|
return self->operator!=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QNetworkConfiguration_State(const QNetworkConfiguration* self) {
|
|
|
|
QNetworkConfiguration::StateFlags _ret = self->state();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QNetworkConfiguration_Type(const QNetworkConfiguration* self) {
|
|
|
|
QNetworkConfiguration::Type _ret = self->type();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QNetworkConfiguration_Purpose(const QNetworkConfiguration* self) {
|
|
|
|
QNetworkConfiguration::Purpose _ret = self->purpose();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QNetworkConfiguration_BearerType(const QNetworkConfiguration* self) {
|
|
|
|
QNetworkConfiguration::BearerType _ret = self->bearerType();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
int QNetworkConfiguration_BearerTypeFamily(const QNetworkConfiguration* self) {
|
|
|
|
QNetworkConfiguration::BearerType _ret = self->bearerTypeFamily();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QNetworkConfiguration_BearerTypeName(const QNetworkConfiguration* self) {
|
|
|
|
QString _ret = self->bearerTypeName();
|
|
|
|
// 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<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QNetworkConfiguration_Identifier(const QNetworkConfiguration* self) {
|
|
|
|
QString _ret = self->identifier();
|
|
|
|
// 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<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QNetworkConfiguration_IsRoamingAvailable(const QNetworkConfiguration* self) {
|
|
|
|
return self->isRoamingAvailable();
|
|
|
|
}
|
|
|
|
|
2024-11-17 06:21:37 +00:00
|
|
|
struct miqt_array /* of QNetworkConfiguration* */ QNetworkConfiguration_Children(const QNetworkConfiguration* self) {
|
2024-11-04 09:53:04 +00:00
|
|
|
QList<QNetworkConfiguration> _ret = self->children();
|
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QNetworkConfiguration** _arr = static_cast<QNetworkConfiguration**>(malloc(sizeof(QNetworkConfiguration*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = new QNetworkConfiguration(_ret[i]);
|
|
|
|
}
|
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QNetworkConfiguration_Name(const QNetworkConfiguration* self) {
|
|
|
|
QString _ret = self->name();
|
|
|
|
// 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<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QNetworkConfiguration_IsValid(const QNetworkConfiguration* self) {
|
|
|
|
return self->isValid();
|
|
|
|
}
|
|
|
|
|
|
|
|
int QNetworkConfiguration_ConnectTimeout(const QNetworkConfiguration* self) {
|
|
|
|
return self->connectTimeout();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QNetworkConfiguration_SetConnectTimeout(QNetworkConfiguration* self, int timeout) {
|
|
|
|
return self->setConnectTimeout(static_cast<int>(timeout));
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QNetworkConfiguration_Delete(QNetworkConfiguration* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QNetworkConfiguration*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|