Commit graph

2200 commits

Author SHA1 Message Date
Erik Duisters
273c9bb6e4 Handle errorMessage in kdeconnect.sftp packet 2019-01-22 18:42:00 +01:00
Simon Redman
74ba660cad Cache and delete old ConversationsDbusInterfaces to avoid memory leak
Summary:
After using the ConversationsDbusInterface for a little while, there can be significant (MBs) memory usage of cached messages. The QDBusAbstractAdaptor does not like to be manually deleted, but it looks like it is safe to do so after constructing a new one

This contradicts the comment in the BatteryPlugin and the BatteryDbusInterface, which says deletelater() is not safe. Has Qt been updated since then?

Test Plan:
- Run daemon
- Hopefully experience no crashes after many phone reconnects

Reviewers: #kde_connect, apol, albertvaka

Reviewed By: #kde_connect, apol, albertvaka

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16553
2019-01-21 12:01:26 -07:00
Matthijs Tijink
e77c1c87ac Add description of bluetooth multiplexing protocol
Summary:
As mentioned on telegram, there are some fundamental issues with bluetooth. The only approach I could get working was multiplexing: manually sending multiple streams of data over a single connection.

This is the description of that multiplexing protocol. I have an implementation of this protocol, but I'd first like some feedback to see if this is what we're going to use before finishing up those patches.

See the document itself for more details. I make the protocol forward-compatible, although I don't expect we will need ever that.

Test Plan: None, this is just a description.

Reviewers: #kde_connect, andyholmes, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17987
2019-01-19 14:03:37 +01:00
Nicolas Fella
1b20ecec32 Allow newer TLS versions
Summary:
Instead of mandating TLS V1.0 use 1.0 or later.
BUG: 400338

Test Plan: Phone connects

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: thomasp, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D18217
2019-01-18 08:59:45 +01:00
Erik Duisters
4834b63537 Just set UDSEntry::UDS_NAME to the actual directory name instead of the hardcoded string "folder" and don't set UDSEntry::UDS_DISPLAY_NAME at all
Summary: There is no reason to set UDSEntry::UDS_NAME to "folder" and then override it with UDSEntry::UDS_DISPLAY_NAME

Test Plan:
Apply patch, click android device in dolphin's Devices list
Verify phones sdcards are listed as befor

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D18223
2019-01-16 14:56:24 +01:00
l10n daemon script
708262e195 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-14 05:31:55 +01:00
l10n daemon script
0b1fbde12d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-09 05:31:18 +01:00
Erik Duisters
9f5cdf1a21 Do not close m_socket in socketError()
Summary:
When android closes the payload socket (cancel share) calling m_socket.close() results
in a recursive call to onError eventually leading to a segmentation violation

Test Plan:
Install D16491, share a large file from desktop to android and cancel the share on Android through
 the notification. kdeconnectd crashes almost 100% of the time. (It doesn't crash when it detects
 a disconnect in sendNextPacket)

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17628
2019-01-06 12:43:10 +01:00
l10n daemon script
71c5a1b248 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-06 05:29:27 +01:00
Simon Redman
bafbc344b9 Implement Drag n Drop file transfer on the plasmoid
Summary:
A DropArea has been added to the ListItem representing a device in the
plasmoid based on what is done in the Quickshare plasmoid. This enables
Drag n Drop of files onto a section of the plasmoid to transfer files.

The DropArea has the size of the ListItem which is a rectangle
including the title of the device down to the button to share text.
Additionally, there is a tooltip area covering the DropArea to indicate
that it is possible to drop a file to send it to the device. Multiple files
can be sent at once.

Ref T8288

Test Plan: Drag and Drop one or many files onto the widget, the files should be transferred to the connected device.

Reviewers: #kde_connect, sredman

Reviewed By: #kde_connect, sredman

Subscribers: sredman, kdeconnect

Tags: #kde_connect

Maniphest Tasks: T8288

Differential Revision: https://phabricator.kde.org/D17611
2019-01-02 10:26:40 -07:00
Matthijs Tijink
97551d09ff Add handling for the identity packet to be split across two messages.
Summary: If the identity packet is split across two packets, then save it until we get a notification that more data is available for reading over the bluetooth link.

Test Plan: Connect a phone and laptop over Bluetooth, and verify that both the phone and laptop are able to see each other, and that either side can start and successfully go through the pairing process.

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17789
2018-12-31 13:25:59 +01:00
Nicolas Fella
bafef14c52 Add .vscode to gitignore 2018-12-29 19:04:28 +01:00
Nicolas Fella
23703423fb Coding style 2018-12-25 01:52:16 +01:00
Nicolas Fella
a45921685b Extract code to methods 2018-12-25 01:42:42 +01:00
Nicolas Fella
6262c09de8 [cli] Show all reachable devices
Summary:
Devices that were reachable but not paired were not shown. This makes it impossible to initiate paring

BUG: 402088

Test Plan:
Have a unpaired device reachable. Without the patch kdeconnect-cli -l does not show it. With the patch it is shown

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17788
2018-12-25 01:38:17 +01:00
Nicolas Fella
b73472735f Remove comment 2018-12-25 01:04:22 +01:00
Nicolas Fella
8f16c3fd9a Remove unneeded methods
Remove unneeded declaration
2018-12-25 00:58:03 +01:00
Nicolas Fella
b4e61678a4 Remove unneeded variable 2018-12-25 00:35:32 +01:00
l10n daemon script
e36bf748cc SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-12-23 05:14:11 +01:00
Jun Bo Bi
f4c7e12ea6 [mpriscontrol] add primitive windows support
Summary: Added primitive support for the mpriscontrol plugin on Windows by simulating VK_MEDIA key presses. I took a look into `ISystemMediaTransportControls`, but there doesn't seem to query it since it's per app. Leaving simulating key presses our only option for now. Completes T10000

Reviewers: kdeconnect, #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka

Tags: #kde_connect, #windows

Maniphest Tasks: T10000

Differential Revision: https://phabricator.kde.org/D17702
2018-12-21 19:24:06 +01:00
Billy Laws
27f47ce8d4 Add a progress slider to mpris remote in app
Summary:
The progress slider can be mooved to seek through the song and
will display song length and current position on sides.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17417
2018-12-18 02:50:54 +01:00
Simon Redman
5b213e6144 [SMS App] Improve filter
Summary:
- Allow filter box to handle keystrokes passed to the ListView
 - This is a little cheesy, but fixes T8341

- Pin filter box to always be visible

- Clear filter on Esc

Test Plan:
- Try typing a contact you would like to search for
 - Before: Every time you type a new letter, the filter box would lose focus and you would have to click it to give it focus again
 - Now: You can type smoothly

- Try scrolling the list
 - Before: The filter box disappeared off the top of the screen
 - Now: The filter box is always visible

- Try pressing escape
 - Before: Nothing
 - Now: Filter clears

- Bonus: When using the arrow keys to navigate, before the filter was manually handling those and the view would not loop. Now, the view loops if you try to select an item past the beginning or end (Easiest to see with highlighting from D17612)

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect

Tags: #kde_connect

Maniphest Tasks: T8341

Differential Revision: https://phabricator.kde.org/D17614
2018-12-17 09:25:56 -07:00
Simon Redman
657dede4bf Add contributors to smsapp QML files 2018-12-15 17:26:44 -07:00
Nicolas Fella
af9eedad47 Remove deprecated ApplicationHeader 2018-12-14 18:15:07 +01:00
Simon Redman
9009439956 Handle case where more messages were requested but there were no more available from the remote
Previously, we would have a thread which was never woken. Now we wake the thread and it does its thing, even though we were not able to do anything about its request

Resolves https://bugs.kde.org/show_bug.cgi?id=400488
2018-12-14 09:59:42 -07:00
Simon Redman
2c35c1af51 [SMS App] Allow scrolling up to load and display older messages
Summary:
Scroll up to show older messages

Newly received messages will not force the view to the bottom unless the new message is being added "very close" to the visible area

Test Plan:
Message History:
 - Open conversation
 - Scroll/Drag up to load older messages

New Message:
 - Open conversation
 - Scroll to bottom
 - Verify that a newly-received or newly-sent message is added to the GUI
 - Scroll up
 - Verify that sending/receiving a message does not disturb the view
 - Scroll back to verify that the new message was indeed added to the list

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, nicolasfella, kdeconnect

Tags: #kde_connect

Maniphest Tasks: T9556

Differential Revision: https://phabricator.kde.org/D15979
2018-12-12 22:50:50 -07:00
Simon Redman
7025fd6795 Un-break build. Apparently I didn't test as I thought I had. 2018-12-12 22:49:33 -07:00
Simon Redman
019e8d6a1c [SMS App] Make requestMoreMessages asynchronous, blocking, and caching
Summary:
The most serious change from this patch is to move the asynchronous replying to a request from the app for more messages to a newly-spawned, self-destructing thread. Within that thread, we block until the remote device replies with the requested messages.

All gotten messages are cached in the ConversationDbusInterface, so all future requests are fast and don't hit the remote device.

Test Plan: After applying this diff, the messaging app should show 10 messages every time it is opened

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, apol, nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16475
2018-12-12 22:42:56 -07:00
Simon Redman
5cdfb9b087 [Desktop] Change ThreadID to long
Summary: Change ThreadID to long

Test Plan:
Messages should send and receive as before. Additionally, if your device has assigned extremely large ThreadIDs, the SMS plugin should no longer crash.

This patch corresponds to the Android-side revision D17517

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17516
2018-12-11 18:03:30 -07:00
Yuri Chornoivan
5c468f0ecd Fix minor typos 2018-12-11 19:23:06 +02:00
Billy Laws
86e5cd48a0 Suppoer sharing text from kdeconnect-cli
Summary:
Can be used with the share-text argument like
kdeconnect-cli -d adsjsakldsjsa --share-text "hello"

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17242
2018-12-07 18:06:44 +00:00
Nicolas Fella
63a353550c Add icons to indicator
Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17407
2018-12-07 17:32:03 +01:00
Nicolas Fella
d26d2ada78 Don't use kcmshell5 for opening the KCM
Summary:
kcmshell5 depends on plasma-workspace. By using our own tiny wrapper for opening the KCM we avoid pulling
in plasma-workspace and everything that comes with it on non-Plasma systems.

Test Plan: kdeconnect-settings shows the KCM

Reviewers: #kde_connect, sredman

Reviewed By: #kde_connect, sredman

Subscribers: sredman, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17383
2018-12-06 23:10:05 +01:00
l10n daemon script
686af65e10 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-12-04 05:37:53 +01:00
l10n daemon script
590afee817 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-12-03 05:29:48 +01:00
Albert Vaca
d017d5293a Make plugin less verbose 2018-12-02 19:26:36 +01:00
l10n daemon script
baef9265d9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-12-02 05:23:51 +01:00
Erik Duisters
b6c15289f5 Combine multiple upload jobs into a single KCompositeJob so only 1 notification will be shown
Summary:
Combine multiple upload jobs for files into a single KCompositeJob so only 1 notification will be shown
Includes changes introduced in D16279

Test Plan:
1. Share of multiple files is performed using 1 composite job

   Setup:
	- Select multiple (big) files in dolphin and share with an Android device
   Result:
	- The files will be transferred using 1 CompositeUploadJob and showing only 1 notification

2. Share of file while another share is already running adds job to existing composite job

   Setup:
	- Select multiple (big) files in dolphin and share with an Android device
	- Share an additional file with the same Android device
   Result:
	- The files are all transferred using 1 CompositeUploadJob and showing only 1 notification
	- The notification is updated after adding the last file

3. Other packets are transmitted as usual

   Setup:
        - Setup sharing desktop notification with device
	- Share a big file with an Android device
	- Generate a desktop notification (eg. sending or receiving an email)

   Result:
	- Notification packet is send immediately

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, apol, nicolasfella, broulik, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17081
2018-11-30 08:26:00 +01:00
Billy Laws
c6fc4d92b7 Make the message TextField expanding, wrapping and scrollable
Summary:
A scrollbar will show if the entered text fills more than 1/3rd
of the screen, pressing enter will send the message and shift +
enter will add a new line.

Reviewers: #kde_connect, sredman

Reviewed By: #kde_connect, sredman

Subscribers: sredman, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17224
2018-11-29 18:02:42 +00:00
Erik Duisters
538872ddc8 Handle receiving empty file from Android
Summary: When a file share is received the share plugin  does not detect that an empty file is being shared

Test Plan:
Send an empty file from android
The empty file should be created

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17175
2018-11-28 15:50:06 +01:00
Varun Patel
a7db44aca2 Updated README.md
Summary: Updated outdated README as discussed in a GCI task, including updating features list and adding a link to build instructions.

Test Plan: N/A

Reviewers: albertvaka, #kde_connect

Reviewed By: albertvaka, #kde_connect

Subscribers: sredman, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17036
2018-11-28 14:38:20 +01:00
Billy Laws
05a34747f3 Add mute button with dynamic icon to MPRIS volume control
Summary:
The icon changes depending on the slider value and clicking it
will switch the volume between 0 and 100

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: apol, broulik, albertvaka, nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16962
2018-11-27 21:30:25 +00:00
Nicolas Fella
793c74e89e Show text when device is not reachable 2018-11-26 22:56:26 +01:00
Alex Kovrigin
1cee137dcb Align behaviour of the desktop app with the Android app
Summary: Now devices are shown same as in Android app, as in Kirigami app (kcapp)

Test Plan:
* Build kdeconnect, using the experimental version
* Try pairing, unpairing, connecting and disconnected devices.
* See the difference.

Reviewers: albertvaka, #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16935
2018-11-26 22:15:01 +01:00
Aleix Pol
7ef1da4914 Fix comment 2018-11-26 20:42:18 +01:00
Erik Duisters
2c9fde483a Show progress when sending a file from desktop
Summary:
Show progress when sending a file from the desktop

BUG: 355044

Test Plan:
Complete transfer:
-Right click on a big file in dolphin
-Select Send to xx via KDE Connect
-Open the Notifications widget and verify progress is shown correctly

Stop transfer:
-Right click on a big file in dolphin
-Select Send to xx via KDE Connect
-Open The Notifications widget and press the stop/kill button
-Observe that the file upload is stopped

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: apol, broulik, nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16279
2018-11-26 18:32:43 +01:00
Nicolas Fella
2de96e86ac Revert "Fix device name display in app"
This reverts commit 3865307619.
2018-11-26 15:51:28 +01:00
Nicolas Fella
99e335ede2 Revert "Fix devicename in Plasmoid"
This reverts commit e029c61935.
2018-11-26 15:50:44 +01:00
Nicolas Fella
2e26abbd18 Revert "Allow accessing deviceName from qml"
This reverts commit e47fb17006.

It broke the name in various QML places because display was not available as a role any more. The ones inside KDE Connect were easily fixed, but Purpose is hard to fix
in a fully compatible way
2018-11-26 15:48:35 +01:00
Nicolas Fella
ded463eb49 [clazy] Properly emit signals
Test Plan: Receive a file

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17166
2018-11-26 13:25:16 +01:00