aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context.cpp8
-rw-r--r--context.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/context.cpp b/context.cpp
index cc415f0..0951241 100644
--- a/context.cpp
+++ b/context.cpp
@@ -103,6 +103,14 @@ Context::getBlobdir()
return result;
}
+bool
+Context::setConfig(QString key, QString value)
+{
+ QByteArray utf8Key = key.toUtf8();
+ QByteArray utf8Value = value.toUtf8();
+ return dc_set_config(m_context, utf8Key.constData(), utf8Value.constData());
+}
+
QString
Context::getConfig(QString key)
{
diff --git a/context.h b/context.h
index 5bd043d..eda080a 100644
--- a/context.h
+++ b/context.h
@@ -32,6 +32,7 @@ public:
Q_INVOKABLE DcContact *getContact(uint32_t contactId);
Q_INVOKABLE uint32_t sendTextMessage(uint32_t chatId, QString textToSend);
QString getBlobdir();
+ Q_INVOKABLE bool setConfig(QString key, QString value);
Q_INVOKABLE QString getConfig(QString key);
Q_INVOKABLE QString getMessageInfo(uint32_t msgId);