Commit graph

29 commits

Author SHA1 Message Date
Billy Laws
5c86da54aa Add QML support for shareplugin
Summary: This will allow it to be used in the plasmoid and QML app via dbus.

Reviewers: nicolasfella

Reviewed By: nicolasfella

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16551
2018-10-31 19:40:10 +01:00
Simon Redman
bcc9fb06db Split SMS and Telephony plugin on desktop
Summary:
Telephony and SMS handling are quite distinct so they should be in separate plugins for better maintainability, given that @sredman has big plans with SMS.
This diff should be fully backwards compatible, but whether we really want to do that is up to discussion

Test Plan: Only supeficially tested. Receive an SMS (old way), Notification is shown

Reviewers: #kde_connect, sredman

Reviewed By: sredman

Subscribers: albertvaka, apol, sredman, kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D13594
2018-09-10 11:31:05 +02:00
Aleix Pol
31e93ef7bf (WIP) Upgrade Telephony plugin to read SMS history (KDE side)
Summary:
For real usecases of SMS support, we will almost always need access to the message history in some way

Specifically resolve T8338

Incidentally resolve T6651 since Telephony shall no longer create a notification

Test Plan:
Setup:
- Build corresponding Android-side diff (D11698)
- Build this diff

Step 1: Does anything at all work?
- Put a breakpoint in the handleBatchMessages method of the telephony plugin, ideally after constructing a Message object
- Use DBus to poke /modules/kdeconnect/devices/<deviceID>/telephony.requestAllConversations()
- Verify that the constructed Message is one you sent or received and that it is the most recent in the corresponding conversation

Step 2: DBus
- Open the Interface org.kde.kdeconnect.device.conversations of /modules/kdeconnect/devices/<deviceId>
- Poke activeConversations and verify an empty array is returned
- Poke requestAllConversationThreads
- Poke activeConversations and verify that a list of numbers has been returned. These are conversationIds
- Use a conversationId to call getFirstFromConversation
  - Verify that the returned Message object is one which you recognize
  - Note that if the message is an MMS it will be blank and meaningless. Try a different conversationId. MMS support "coming soon!"

Step 3: SMS App
- Use ccmake (or similar) to set SMSAPP_ENABLE to ON
- Build the project
- Run ./bin/kdeconnect-sms
- Verify that the app shows a list of everyone you have an SMS conversation with (MMS messages are stripped out)
  - If you have the Contacts plugin working, verify that most contacts have their name and photo instead of their phone number

Reviewers: #kde_connect, nicolasfella, apol

Reviewed By: #kde_connect, nicolasfella, apol

Subscribers: andyholmes, apol, nicolasfella, #kde_connect

Tags: #kde_connect

Maniphest Tasks: T8338, T6651

Differential Revision: https://phabricator.kde.org/D11854
2018-06-09 13:35:26 -06:00
Aleix Pol
c863feef58 Optionally include sms app
Creates a tiny messaging app that uses KPeople to query the contacts and
KDE connect telephony plugins to send plugins.
To be ready, still needs some work on the contacts sync side and some
messages history would be nice.
2018-03-25 20:48:38 +02:00
Friedrich W. H. Kossebau
f7656cef2c Remove unneeded moc include 2018-03-17 23:38:34 +01:00
Matthijs Tijink
227e264042 Fix "error activiting kdeconnectd" for kdeconnect-cli
Summary:
Kdeconnect-cli always displayed one or more "error activating kdeconnectd: QDBusError("", "")" messages.

This diff uses the reply of starting the kdeconnect daemon correctly, so this does not happen anymore.

Test Plan: Kdeconnect-cli and the daemon still work, but kdeconnect-cli does not show the error message anymore. I verified that if, for some reason, the daemon could not start, it does display an error.

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol

Differential Revision: https://phabricator.kde.org/D9058
2017-12-03 19:20:57 +01:00
Jean Vincent
72535ecf48 Make member variable names, & placement and * placement more coherent
Summary:
Change all member variables to the form m_fooBar because it is the preferred form in Qt (it was half and half between this and mFooBar, and a minority didn't have anything).
Place all references and pointers on the side of the type since it is the majority.

Basically:
 - mFoo -> m_foo
 - foo -> m_foo (if it is a member variable)
 - Type &ref -> Type& ref
 - Type *ptr -> Type* ptr

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, nicolasfella, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D7312
2017-09-03 21:45:08 +02:00
Aleix Pol
6c77bc5a9f Debug pairing handlers
Make sure we don't emit if it doesn't actually change
Make sure if it changed when we react to a pairing

Pair-programmed with Albert Vaca
2017-01-25 01:18:14 +01:00
Holger Kaelberer
30cffbd96e Add remotekeyboard plugin
BUG: 370919
REVIEW: 129727
2017-01-23 09:08:27 +01:00
Aleix Pol
a164983b6f Revert "kdeconnect-kde: Add remotekeyboard plugin"
This reverts commit 040ad7357b.

Sorry, didn't mean to push that myself ^^'
2017-01-11 17:20:22 +01:00
Holger Kaelberer
040ad7357b kdeconnect-kde: Add remotekeyboard plugin
Allow to inject keypress events to remote peers (most notably Android devices)

Notes / open issues / possible improvements:

- For the json-payload I used the syntax of the key-events as sent by mousepad-plugin with the addition of a "sendAck"-flag. If "sendAck" is set to true the remote peer should echo a key-event if it could be handled, thus allowing the local client to find out whether the key was accepted. For performance reasons, it's allowed to send multi-char strings in the "key" property (performs much better if you send a whole string via "echo '...' |  kdeconnect-cli ..." e.g.)

- kdeconnect-cli: For now takes a string and transforms it into single key-events for visible characters only. In a first implementation I used a kbhit() helper that used termios.h to catch and relay keypresses interactively (including some special-events), which was not optimal. A better approch might be to use linux input-api directly. Would this be an option regarding cross-platform compatibility or can I assume to develop for Linux only? Being a command-line guy, I'd really like to have a fully featured kdeconnect-cli interface ;-)

- Factor out the Qt::Key-to-internal keymap to some core-helper because it corresponds to the mapping in the mousepad-plugin?

- The plasmoid is not perfect as it is: A single line containing a non-echoing TextField (i.e. it eats all the KeyPress events), and only ack-ed keypress-packets from the peer device are injected if they contain visible keys. Advantage: the user sees whether his key-presses are accepted by the peer device. Disadvantage: The echoed text does not correspond 1:1 to what is shown on the peer's display, user might be confused when typing without success. I played around with different variations each of which with its proper shortcomings:
1. An echoing Textfield for typing: Has the advantage that the user can directly see what he is typing, which makes interaction in the typing field easier, BUT messes up interaction if the Editor on the peer is changed silently and does not notify the user if his keypresses are not handled by the peer.
2. A non-echoing TextField for typing PLUS a readonly one for printing visible echoed keys. Disadvantage: same as for the previous one and uses more space on the plasmoid.
Comments? Ideas?

REVIEW: 129727
BUG: 370919
2017-01-10 21:12:42 +01:00
Albert Vaca
6a2a0b1c76 Merge branch '1.x'
# Conflicts:
#	plugins/mpriscontrol/mpriscontrolplugin.cpp
#	plugins/sendnotifications/kdeconnect_sendnotifications.json
2016-11-26 16:40:24 +01:00
Albert Vaca
60331ccbf1 Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
Albert Vaca
3d0f7c3fcb Changed signal reachableStatusChanged() to reachableChanged(bool)
And proxied it on the C++ dbus interface.
2016-11-23 17:24:35 +01:00
Aleix Pol
6ece5665cd Expose nameChanged through dbus 2016-08-21 13:53:40 +02:00
Aleix Pol
bdff499965 Remote Commands plugin
Allows executing remote plugins from this client

Reviewed by Albert Vaca
2016-06-12 20:16:58 +02:00
Albert Vaca
0c95010c3b Merge branch 'master' into sslrefactor
# Conflicts:
#	core/device.cpp
#	interfaces/devicesmodel.cpp
2016-04-14 19:00:42 -07:00
David Kahles
12ccbaef98 Improve NotificationsModel
Don't refresh the whole notification list, if a notification is added or
removed.

REVIEW: 127565
2016-04-05 23:33:45 +02:00
Albert Vaca
cf6cbd2925 WIPx3! 2015-12-01 10:45:14 -08:00
David Edmundson
9985a59608 Find my phone plugin
Add a plugin that sends a package to ring an alarm on a phone

Also adjusts plasmoid to have a button to invoke this.
2015-09-11 21:12:12 +02:00
Aleix Pol
972c260628 Make sure kdeconnectd gets started when required
BUG: 352522
BUG: 352520
2015-09-10 20:21:41 +02:00
Aleix Pol
be2a3252c2 Make it possible to lock the screen from KDE Connect
Connects to freedesktop ScreenSaver interface and un/locks it upon request.

REVIEW: 124170
2015-07-22 03:37:34 +02:00
Aleix Pol
058f7c7c90 Implement the touchpad forwarding into kcapp
This way the computer's cursor can be controlled from the device. Keyboard
is not yet implemented.
2015-07-22 03:21:28 +02:00
Aleix Pol
06493a8192 Keep track of whether the daemon is alive
Listen to dbus registrations. Remove all devices if the service dies,
create all devices back when restored.
Same for the NotificationsModel.

REVIEW: 124183
2015-06-25 21:19:23 +02:00
Aleix Pol
43451d6ae1 Simplify Device::id management
Removes the id->row mapping. It was broken as the indices weren't updated
when a row was added or removed.
Stop exposing Device::id through dbus, just store it in the interface
class.
* It's redundant as it's part of the interface definition
* If we keep it it will save us quite some dbus round-trips
* It will be reliable, as nowadays id() sometimes QString() if the dbus
connection is invalid.

REVIEW: 124158
2015-06-24 20:57:17 +02:00
Aleix Pol
5c79e8a7a6 Implement an MPRIS client plugin
Makes it possible to control remote MPRIS instances.

REVIEW: 124100
2015-06-18 04:01:01 +02:00
Aleix Pol
7c2e2fb726 QML-ify
Add API to call random public plugin methods
qdbusxml2cpp is not generating the Q_PROPERTY attribute. For now [1], add
it ourselves by addding a proxy signal.

REVIEW: 124077
2015-06-13 01:28:36 +02:00
Albert Vaca
18ba161f17 Fully replaced KDED for autostart + dbus activation, so we work outside KDE 2015-02-23 22:12:45 -08:00
Aleix Pol
b88897847b Reorganize sources
We broke kded into core and kded, core contains the library with the backends
and plugins.
Also we renamed libkdeconnect to interfaces.
2014-06-14 15:22:40 +02:00
Renamed from libkdeconnect/dbusinterfaces.cpp (Browse further)