Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2577251
matrix-promise.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
matrix-promise.hpp
View Options
/*
* 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
Details
Attached
Mime Type
text/x-c++
Expires
Tue, Jun 24, 5:00 AM (7 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
87729
Default Alt Text
matrix-promise.hpp (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment