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/driver/driver.h

27 lines
569 B
C
Raw Normal View History

2019-12-04 15:51:46 +08:00
#ifndef DRIVER_H
#define DRIVER_H
#include <QtPlugin>
2019-12-14 11:30:12 +08:00
#include "registry.h"
2019-12-04 15:51:46 +08:00
class Driver {
public:
2019-12-13 17:45:27 +08:00
virtual void createContext(int contextId, QString *script) = 0;
2019-12-04 15:51:46 +08:00
virtual void destroyContext(int contextId) = 0;
2019-12-13 17:45:27 +08:00
virtual void invokeContextEntityMethod(int contextId, QString *method, ...) = 0;
virtual void invokeDoricMethod(QString *method, ...) = 0;
2019-12-04 15:51:46 +08:00
2019-12-14 11:30:12 +08:00
virtual Registry *getRegistry() = 0;
2019-12-04 15:51:46 +08:00
virtual ~Driver() = default;
};
#define DriverInterface "pub.doric.DriverInterface"
Q_DECLARE_INTERFACE(Driver, DriverInterface)
#endif // DRIVER_H