From 7bbdbbe7fbc95573876657bd483a729ae04a2717 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 19 Feb 2021 04:29:47 +0300 Subject: Context: implement startIo, stopIo and maybeNetwork They are not supposed to be used as they can be called from account manager, just for completeness. --- context.cpp | 18 ++++++++++++++++++ context.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/context.cpp b/context.cpp index 1e44f7e..cc415f0 100644 --- a/context.cpp +++ b/context.cpp @@ -28,6 +28,24 @@ Context::isConfigured() const return dc_is_configured(m_context); } +void +Context::startIo() +{ + dc_start_io(m_context); +} + +void +Context::stopIo() +{ + dc_stop_io(m_context); +} + +void +Context::maybeNetwork() +{ + dc_maybe_network(m_context); +} + QString Context::getInfo() { diff --git a/context.h b/context.h index 98c4196..5bd043d 100644 --- a/context.h +++ b/context.h @@ -22,6 +22,9 @@ public: Q_INVOKABLE void configure(); Q_INVOKABLE bool isConfigured() const; Q_INVOKABLE QString getInfo(); + Q_INVOKABLE void startIo(); + Q_INVOKABLE void stopIo(); + Q_INVOKABLE void maybeNetwork(); Q_INVOKABLE DcChatlist *getChatlist(); Q_INVOKABLE DcChat *getChat(uint32_t chatId); Q_INVOKABLE QVariantList getMsgIdList(uint32_t chatId); -- cgit v1.2.3-70-g09d2