2017-04-06 01:06:42 +02:00
|
|
|
#include "MatrixClient.h"
|
2018-06-09 15:03:14 +02:00
|
|
|
|
|
|
|
#include <memory>
|
2017-04-06 01:06:42 +02:00
|
|
|
|
2018-05-08 17:43:56 +02:00
|
|
|
namespace {
|
2018-06-09 15:03:14 +02:00
|
|
|
auto v2_client_ = std::make_shared<mtx::http::Client>("matrix.org");
|
2018-05-08 17:43:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace http {
|
2018-06-09 15:03:14 +02:00
|
|
|
namespace v2 {
|
2018-05-08 17:43:56 +02:00
|
|
|
|
2018-06-09 15:03:14 +02:00
|
|
|
mtx::http::Client *
|
2018-05-08 17:43:56 +02:00
|
|
|
client()
|
|
|
|
{
|
2018-06-09 15:03:14 +02:00
|
|
|
return v2_client_.get();
|
2017-10-01 18:49:36 +02:00
|
|
|
}
|
2017-10-31 19:11:49 +01:00
|
|
|
|
2018-06-09 15:03:14 +02:00
|
|
|
} // namespace v2
|
2017-12-11 22:00:37 +01:00
|
|
|
|
|
|
|
void
|
2018-06-09 15:03:14 +02:00
|
|
|
init()
|
2018-03-17 20:23:46 +01:00
|
|
|
{
|
2018-06-09 15:03:14 +02:00
|
|
|
qRegisterMetaType<mtx::responses::Login>();
|
|
|
|
qRegisterMetaType<mtx::responses::Messages>();
|
|
|
|
qRegisterMetaType<mtx::responses::Notifications>();
|
|
|
|
qRegisterMetaType<mtx::responses::Rooms>();
|
|
|
|
qRegisterMetaType<mtx::responses::Sync>();
|
|
|
|
qRegisterMetaType<std::string>();
|
|
|
|
qRegisterMetaType<std::vector<std::string>>();
|
2018-03-17 20:23:46 +01:00
|
|
|
}
|
2018-05-05 15:38:41 +02:00
|
|
|
|
2018-06-09 15:03:14 +02:00
|
|
|
} // namespace http
|