aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context.cpp27
-rw-r--r--context.h4
2 files changed, 31 insertions, 0 deletions
diff --git a/context.cpp b/context.cpp
index 9c1ac94..6a7148a 100644
--- a/context.cpp
+++ b/context.cpp
@@ -62,6 +62,33 @@ Context::getChatlist()
return new DcChatlist{chatlist};
}
+void
+Context::setChatVisibility(uint32_t chatId, int visibility)
+{
+ dc_set_chat_visibility(m_context, chatId, visibility);
+}
+
+void
+Context::deleteChat(uint32_t chatId)
+{
+ dc_delete_chat(m_context, chatId);
+}
+
+QString
+Context::getChatEncrinfo(uint32_t chatId)
+{
+ char *encrinfo = dc_get_chat_encrinfo(m_context, chatId);
+ QString result{encrinfo};
+ dc_str_unref(encrinfo);
+ return result;
+}
+
+uint32_t
+Context::getChatEphemeralTimer(uint32_t chatId)
+{
+ return dc_get_chat_ephemeral_timer(m_context, chatId);
+}
+
DcChat *
Context::getChat(uint32_t chatId)
{
diff --git a/context.h b/context.h
index c62529e..c8d9691 100644
--- a/context.h
+++ b/context.h
@@ -26,6 +26,10 @@ public:
Q_INVOKABLE void stopIo();
Q_INVOKABLE void maybeNetwork();
Q_INVOKABLE DcChatlist *getChatlist();
+ Q_INVOKABLE void setChatVisibility(uint32_t chatId, int visibility);
+ Q_INVOKABLE void deleteChat(uint32_t chatId);
+ Q_INVOKABLE QString getChatEncrinfo(uint32_t chatId);
+ Q_INVOKABLE uint32_t getChatEphemeralTimer(uint32_t chatId);
Q_INVOKABLE DcChat *getChat(uint32_t chatId);
Q_INVOKABLE QVariantList getMsgIdList(uint32_t chatId);
Q_INVOKABLE int getFreshMsgCnt(uint32_t chatId);