Page MenuHomePhorge

matrix-promise.hpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

matrix-promise.hpp

/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include <libkazv-config.hpp>
#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
#include <memory>
#include <QObject>
#include <QQmlEngine>
#include <promise-interface.hpp>
#include <sdk.hpp>
class QJsonValue;
class MatrixPromise : public QObject
{
Q_OBJECT
QML_ELEMENT
QML_UNCREATABLE("")
explicit MatrixPromise(QObject *parent = 0);
public:
explicit MatrixPromise(Kazv::SingleTypePromise<Kazv::EffectStatus> promise, QObject *parent = 0);
~MatrixPromise();
static MatrixPromise *createResolved(bool isSuccess, const QJsonValue &data, QObject *parent = 0);
Q_SIGNALS:
/**
* Emitted when the Promise is resolved.
*/
void resolved(bool isSuccess, const QJsonValue &data);
/**
* Emitted when the Promise is resolved successfully.
*/
void succeeded(const QJsonValue &data);
/**
* Emitted when the Promise is resolved but failed.
*/
void failed(const QJsonValue &data);
private:
struct Private;
std::unique_ptr<Private> m_d;
};

File Metadata

Mime Type
text/x-c++
Expires
Tue, Jun 24, 5:00 AM (2 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
87729
Default Alt Text
matrix-promise.hpp (1 KB)

Event Timeline