aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context.cpp18
-rw-r--r--context.h3
2 files changed, 21 insertions, 0 deletions
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);