add context holder & registry & bridge
This commit is contained in:
11
doric/native/native_bridge.cpp
Normal file
11
doric/native/native_bridge.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "context_manager.h"
|
||||
#include "native_bridge.h"
|
||||
|
||||
Q_INVOKABLE void NativeBridge::function(int contextId, QString module, QString methodName, QString callbackId, QJSValue jsValue) {
|
||||
qDebug() << "contextId: " + QString::number(contextId) + ", " +
|
||||
"module: " + module + ", " +
|
||||
"methodName: " + methodName + ", " +
|
||||
"callbackId: " + callbackId + ", " +
|
||||
"arguments: " + jsValue.toString();
|
||||
Context* context = ContextManager::getInstance()->getContext(contextId);
|
||||
}
|
@@ -11,13 +11,7 @@ class NativeBridge : public QObject {
|
||||
public:
|
||||
NativeBridge(QObject *parent = nullptr) : QObject(parent) {}
|
||||
|
||||
Q_INVOKABLE void function(int contextId, QString module, QString methodName, QString callbackId, QJSValue jsValue) {
|
||||
qDebug() << "contextId: " + QString::number(contextId) + ", " +
|
||||
"module: " + module + ", " +
|
||||
"methodName: " + methodName + ", " +
|
||||
"callbackId: " + callbackId + ", " +
|
||||
"arguments: " + jsValue.toString();
|
||||
}
|
||||
Q_INVOKABLE void function(int contextId, QString module, QString methodName, QString callbackId, QJSValue jsValue);
|
||||
};
|
||||
|
||||
#endif // NATIVE_BRIDGE_H
|
||||
|
Reference in New Issue
Block a user