2024-11-04 09:53:04 +00:00
|
|
|
#include <QSslCipher>
|
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include <qsslcipher.h>
|
|
|
|
#include "gen_qsslcipher.h"
|
2024-12-11 06:55:47 +00:00
|
|
|
|
|
|
|
#ifndef _Bool
|
|
|
|
#define _Bool bool
|
|
|
|
#endif
|
2024-11-04 09:53:04 +00:00
|
|
|
#include "_cgo_export.h"
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QSslCipher* QSslCipher_new() {
|
|
|
|
return new QSslCipher();
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QSslCipher* QSslCipher_new2(struct miqt_string name) {
|
2024-11-04 09:53:04 +00:00
|
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new QSslCipher(name_QString);
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol) {
|
2024-11-04 09:53:04 +00:00
|
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new QSslCipher(name_QString, static_cast<QSsl::SslProtocol>(protocol));
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QSslCipher* QSslCipher_new4(QSslCipher* other) {
|
|
|
|
return new QSslCipher(*other);
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QSslCipher_Swap(QSslCipher* self, QSslCipher* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QSslCipher_OperatorEqual(const QSslCipher* self, QSslCipher* other) {
|
2024-11-22 06:06:01 +00:00
|
|
|
return (*self == *other);
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QSslCipher_OperatorNotEqual(const QSslCipher* self, QSslCipher* other) {
|
2024-11-22 06:06:01 +00:00
|
|
|
return (*self != *other);
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QSslCipher_IsNull(const QSslCipher* self) {
|
|
|
|
return self->isNull();
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QSslCipher_Name(const QSslCipher* 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QSslCipher_SupportedBits(const QSslCipher* self) {
|
|
|
|
return self->supportedBits();
|
|
|
|
}
|
|
|
|
|
|
|
|
int QSslCipher_UsedBits(const QSslCipher* self) {
|
|
|
|
return self->usedBits();
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QSslCipher_KeyExchangeMethod(const QSslCipher* self) {
|
|
|
|
QString _ret = self->keyExchangeMethod();
|
|
|
|
// 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 QSslCipher_AuthenticationMethod(const QSslCipher* self) {
|
|
|
|
QString _ret = self->authenticationMethod();
|
|
|
|
// 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 QSslCipher_EncryptionMethod(const QSslCipher* self) {
|
|
|
|
QString _ret = self->encryptionMethod();
|
|
|
|
// 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 QSslCipher_ProtocolString(const QSslCipher* self) {
|
|
|
|
QString _ret = self->protocolString();
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QSslCipher_Protocol(const QSslCipher* self) {
|
|
|
|
QSsl::SslProtocol _ret = self->protocol();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QSslCipher_Delete(QSslCipher* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QSslCipher*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-11-04 09:53:04 +00:00
|
|
|
}
|
|
|
|
|