2018-07-23 15:21:31 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2017-present, Status Research and Development GmbH.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef RCTSTATUS_H
|
|
|
|
#define RCTSTATUS_H
|
|
|
|
|
|
|
|
#include "moduleinterface.h"
|
|
|
|
|
|
|
|
#include <QVariantMap>
|
|
|
|
|
|
|
|
class RCTStatusPrivate;
|
|
|
|
class RCTStatus : public QObject, public ModuleInterface {
|
|
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(ModuleInterface)
|
|
|
|
|
|
|
|
Q_DECLARE_PRIVATE(RCTStatus)
|
|
|
|
|
|
|
|
public:
|
|
|
|
Q_INVOKABLE RCTStatus(QObject* parent = 0);
|
|
|
|
~RCTStatus();
|
|
|
|
|
|
|
|
void setBridge(Bridge* bridge) override;
|
|
|
|
|
|
|
|
QString moduleName() override;
|
|
|
|
QList<ModuleMethod*> methodsToExport() override;
|
|
|
|
QVariantMap constantsToExport() override;
|
|
|
|
|
|
|
|
Q_INVOKABLE void startNode(QString configString);
|
|
|
|
Q_INVOKABLE void stopNode();
|
|
|
|
Q_INVOKABLE void createAccount(QString password, double callbackId);
|
|
|
|
Q_INVOKABLE void notifyUsers(QString token, QString payloadJSON, QString tokensJSON, double callbackId);
|
|
|
|
Q_INVOKABLE void addPeer(QString enode, double callbackId);
|
|
|
|
Q_INVOKABLE void recoverAccount(QString passphrase, QString password, double callbackId);
|
|
|
|
Q_INVOKABLE void login(QString address, QString password, double callbackId);
|
2018-08-20 12:06:57 +00:00
|
|
|
Q_INVOKABLE void sendTransaction(QString txArgsJSON, QString password, double callbackId);
|
|
|
|
Q_INVOKABLE void signMessage(QString rpcParams, double callbackId);
|
2018-07-23 15:21:31 +00:00
|
|
|
|
|
|
|
Q_INVOKABLE void setAdjustResize();
|
|
|
|
Q_INVOKABLE void setAdjustPan();
|
|
|
|
Q_INVOKABLE void setSoftInputMode(int i);
|
|
|
|
|
|
|
|
Q_INVOKABLE void clearCookies();
|
|
|
|
Q_INVOKABLE void clearStorageAPIs();
|
2018-08-20 12:06:57 +00:00
|
|
|
Q_INVOKABLE void callRPC(QString payload, double callbackId);
|
|
|
|
Q_INVOKABLE void callPrivateRPC(QString payload, double callbackId);
|
2018-07-23 15:21:31 +00:00
|
|
|
Q_INVOKABLE void closeApplication();
|
|
|
|
Q_INVOKABLE void getDeviceUUID(double callbackId);
|
|
|
|
|
|
|
|
Q_INVOKABLE static bool JSCEnabled();
|
2018-08-16 19:51:48 +00:00
|
|
|
Q_INVOKABLE static void statusGoEventCallback(const char* event);
|
2018-07-23 15:21:31 +00:00
|
|
|
|
2018-08-16 19:51:48 +00:00
|
|
|
void emitStatusGoEvent(QString event);
|
2018-07-23 15:21:31 +00:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
2018-08-16 19:51:48 +00:00
|
|
|
void statusGoEvent(QString event);
|
2018-07-23 15:21:31 +00:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
2018-08-16 19:51:48 +00:00
|
|
|
void onStatusGoEvent(QString event);
|
2018-07-23 15:21:31 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QScopedPointer<RCTStatusPrivate> d_ptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RCTSTATUS_H
|