[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdeconnect-kde/sms-history] plugins/telephony: Add basic support for requesting all conversations
From: Simon Redman <null () kde ! org>
Date: 2018-04-01 0:10:07
Message-ID: E1f2QZT-0005Ax-3g () code ! kde ! org
[Download RAW message or body]
Git commit 6aa50a32aab8cf0e987e5cf1d83e8f388bac9ced by Simon Redman.
Committed on 01/04/2018 at 00:09.
Pushed by sredman into branch 'sms-history'.
Add basic support for requesting all conversations
M +2 -1 plugins/telephony/kdeconnect_telephony.json
M +7 -0 plugins/telephony/telephonyplugin.cpp
M +6 -0 plugins/telephony/telephonyplugin.h
https://commits.kde.org/kdeconnect-kde/6aa50a32aab8cf0e987e5cf1d83e8f388bac=
9ced
diff --git a/plugins/telephony/kdeconnect_telephony.json b/plugins/telephon=
y/kdeconnect_telephony.json
index 2ea6e687..817ed94e 100644
--- a/plugins/telephony/kdeconnect_telephony.json
+++ b/plugins/telephony/kdeconnect_telephony.json
@@ -89,7 +89,8 @@
},
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.telephony.request",
- "kdeconnect.sms.request"
+ "kdeconnect.sms.request",
+ "kdeconnect.telephony.request_conversations"
],
"X-KdeConnect-SupportedPacketType": [
"kdeconnect.telephony"
diff --git a/plugins/telephony/telephonyplugin.cpp b/plugins/telephony/tele=
phonyplugin.cpp
index 5c50efa2..3a015a82 100644
--- a/plugins/telephony/telephonyplugin.cpp
+++ b/plugins/telephony/telephonyplugin.cpp
@@ -163,6 +163,13 @@ void TelephonyPlugin::showSendSmsDialog()
dialog->raise();
}
=
+void TelephonyPlugin::sendAllConversationsRequest()
+{
+ NetworkPacket np(PACKET_TYPE_TELEPHONY_REQUEST_CONVERSATIONS);
+
+ sendPacket(np);
+}
+
QString TelephonyPlugin::dbusPath() const
{
return "/modules/kdeconnect/devices/" + device()->id() + "/telephony";
diff --git a/plugins/telephony/telephonyplugin.h b/plugins/telephony/teleph=
onyplugin.h
index acfdb5d6..43fb22fc 100644
--- a/plugins/telephony/telephonyplugin.h
+++ b/plugins/telephony/telephonyplugin.h
@@ -31,6 +31,8 @@
#define PACKET_TYPE_TELEPHONY_REQUEST QStringLiteral("kdeconnect.telephony=
.request")
#define PACKET_TYPE_SMS_REQUEST QStringLiteral("kdeconnect.sms.request")
=
+#define PACKET_TYPE_TELEPHONY_REQUEST_CONVERSATIONS QStringLiteral("kdecon=
nect.telephony.request_conversations")
+
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_TELEPHONY)
=
class TelephonyPlugin
@@ -48,6 +50,10 @@ public:
=
public Q_SLOTS:
Q_SCRIPTABLE void sendSms(const QString& phoneNumber, const QString& m=
essageBody);
+ /**
+ * Send a request to the remote for all of its conversations
+ */
+ Q_SCRIPTABLE void sendAllConversationsRequest();
=
private Q_SLOTS:
void sendMutePacket();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic