This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/DoricInterfaceDriver.h

31 lines
846 B
C
Raw Normal View History

2021-02-04 16:59:58 +08:00
#ifndef INTERFACEDRIVER_H
#define INTERFACEDRIVER_H
2021-02-07 11:21:53 +08:00
#include <QRunnable>
2021-02-04 16:59:58 +08:00
#include <QString>
#include <QVariant>
#include "DoricRegistry.h"
2021-02-07 11:21:53 +08:00
#include "async/DoricAsyncResult.h"
#include "utils/DoricThreadMode.h"
2021-02-04 16:59:58 +08:00
class DoricInterfaceDriver {
public:
virtual void invokeContextEntityMethod(QString contextId, QString method,
QVariantList args) = 0;
virtual void invokeDoricMethod(QString method, QVariantList args) = 0;
2021-02-08 11:37:51 +08:00
virtual DoricAsyncResult *asyncCall(std::function<void()> lambda,
2021-02-07 11:21:53 +08:00
DoricThreadMode mode) = 0;
2021-02-04 16:59:58 +08:00
virtual void createContext(QString contextId, QString script,
QString source) = 0;
virtual void destroyContext(QString contextId) = 0;
virtual DoricRegistry *getRegistry() = 0;
};
#endif // INTERFACEDRIVER_H