diff options
author | link2xt <link2xt@testrun.org> | 2021-03-01 00:21:55 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-03-01 00:21:55 +0300 |
commit | 88d351d4a271fa13f5ca43be01ab14267f04366a (patch) | |
tree | 790a2f95f3e0a3e0e9ad970b5834f6667c954c83 /context.cpp | |
parent | 3931e2843bd01740a861e98c39cd8f133867b989 (diff) | |
download | kdeltachat-88d351d4a271fa13f5ca43be01ab14267f04366a.tar.gz kdeltachat-88d351d4a271fa13f5ca43be01ab14267f04366a.zip |
Implement more context methods
Diffstat (limited to 'context.cpp')
-rw-r--r-- | context.cpp | 27 |
1 files changed, 27 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) { |