IoTeX client
abstract.h
1#ifndef ABSTRACT_H
2#define ABSTRACT_H
3
4#include "host/host.h"
5#include "http/http.h"
6
7namespace iotex
8{
9namespace api
10{
12{
13 public:
14 void setHost(const char* newHost, int newPort, const char* baseUrl = nullptr)
15 {
16 this->_host.set(newHost, newPort, baseUrl);
17 };
18
19 protected:
20 Host _host;
21 std::unique_ptr<IHTTP> _http;
22
23 Abstract() : _http(makeHTTP())
24 {
25 }
26 explicit Abstract(IHTTP* http) : _http(http)
27 {
28 }
29}; // class Abstract
30
31} // namespace api
32} // namespace iotex
33
34#endif
Definition: host.h:17
Definition: http.h:40
Definition: abstract.h:12
Definition: abi.h:12