#ifndef ASYNCRESULT_H #define ASYNCRESULT_H #include #include "DoricExport.h" #include "DoricSettableFuture.h" static QString EMPTY(""); class DORIC_EXPORT DoricAsyncResult { private: QString result = EMPTY; public: std::function resultCallback; std::function exceptionCallback; std::function finishCallback; DoricAsyncResult(); void setResult(QString result); void setError(QString exception); bool hasResult(); QJSValue getResult(); DoricSettableFuture *synchronous(); }; #endif // ASYNCRESULT_H