mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
#ifndef _GRADIDO_LOGIN_SERVER_MODEL_HEDERA_QUERY_H
|
|
#define _GRADIDO_LOGIN_SERVER_MODEL_HEDERA_QUERY_H
|
|
|
|
/*!
|
|
* @author: Dario Rekowski
|
|
*
|
|
* @date: 31.08.20
|
|
*
|
|
* @brief: class for put together hedera querys (ask for state data, not a transaction, but needs a payment transaction)
|
|
*
|
|
*/
|
|
|
|
#include "../../proto/hedera/Query.pb.h"
|
|
#include "../../controller/NodeServer.h"
|
|
#include "../../Crypto/KeyPairHedera.h"
|
|
#include "TransactionBody.h"
|
|
|
|
namespace model {
|
|
namespace hedera {
|
|
class Query
|
|
{
|
|
public:
|
|
~Query();
|
|
static Query* getBalance(Poco::AutoPtr<controller::HederaId> accountId, const controller::NodeServerConnection& connection);
|
|
bool sign(std::unique_ptr<KeyPairHedera> keyPairHedera);
|
|
|
|
void setResponseType(proto::ResponseType type);
|
|
proto::ResponseType getResponseType();
|
|
|
|
inline const proto::Query* getProtoQuery() const { return &mQueryProto; }
|
|
inline std::string getConnectionString() const { return mTransactionBody->getConnectionString(); }
|
|
|
|
protected:
|
|
Query();
|
|
proto::Query mQueryProto;
|
|
TransactionBody* mTransactionBody;
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
#endif //_GRADIDO_LOGIN_SERVER_MODEL_HEDERA_QUERY_H
|