Commit graph

38 commits

Author SHA1 Message Date
Rob Emery
ad75b438cb Implementing link priorities
Now that devices can potentially be connected via both network and bluetooth simultaneously we should prioritise connections over the highest performing link (probably wifi/network). To this end the
m_deviceLinks are now sorted based on priority with the fastest links first; this means that when Device::sendPacket is scheduling to send a packet, it should always use the fastest link first.
2023-10-01 10:39:59 +00:00
Alexander Lohnau
2e67f95017 Add explicit moc includes to cpp files
The rationale is explained in https://planet.kde.org/friedrich-kossebau-2023-06-28-include-also-moc-files-of-headers/

In case of KDEConnect, it impressively speeds up compilation. Before it
took 390 seconds on a clean build and with this change it took 330 seconds.
This is due to the mocs_compilation having to include the header files
and thus all their headers. Due to the lots of small plugins we have,
this means that the same headers must be compiled plenty of times.
When we include the moc files directly in the C++ file, they are already
available.
2023-07-30 07:27:45 +00:00
Albert Vaca Cintora
beb7e94cbb Cleanup 2023-06-27 13:15:11 +02:00
Albert Vaca Cintora
db546e7608 Add DeviceInfo class
Equivalent to this Android MR (see description there): https://invent.kde.org/network/kdeconnect-android/-/merge_requests/374
2023-06-27 11:10:59 +00:00
Albert Vaca Cintora
46dd0c59da Remove unused priority() method 2023-06-22 23:46:44 +02:00
Albert Vaca Cintora
fbaf5ade71 Remove unused name method 2023-06-02 16:38:52 +00:00
Albert Vaca Cintora
064ddfa3fe Refactor PairingHandler
We now have a single PairingHandler for all types of links.

The implementation now is more aligned with the one for Android.
2023-06-02 16:38:52 +00:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
Albert Vaca Cintora
e7518493df Add a verification key that's displayed when pairing
The key is a sha256 of both devices' certificates. Both should generate the
same key, so hey user can check they are pairing against the right device.

Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
2020-11-26 11:28:49 +01:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Nicolas Fella
1f23fa27b2 Don't use QString::null 2019-02-03 02:00:36 +01:00
Albert Vaca
f47f517827 Rename NetworkPackage -> NetworkPacket
Summary: KDE Connect, now with correct naming!

Test Plan: It still builds.

Reviewers: #kde_connect, apol, nicolasfella

Reviewed By: #kde_connect, apol, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D11036
2018-03-05 20:03:23 +01:00
Albert Vaca
60331ccbf1 Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
Aleix Pol
596e4484f4 Clean up use of virtual and override keywords
Only use virtual when actually virtual, to override just use override.
2016-06-20 19:22:29 +02:00
Albert Vaca
6cde0271fb Removed loopbackpairinghandler 2016-02-12 07:59:12 -08:00
Albert Vaca
aa4150f0c9 Moved ConnectionStarted from DeviceLink to LanDeviceLink 2016-01-10 07:12:13 -08:00
Albert Vaca
f5404ea11b Removed more references to publicKey 2015-12-17 08:22:18 -08:00
Albert Vaca
dd7d4093ed Removed sendPackageEncrypted from DeviceLink 2015-12-17 07:43:52 -08:00
Albert Vaca
03926cc3bf WIPx4 2015-12-02 11:04:35 -08:00
Albert Vaca
cf6cbd2925 WIPx3! 2015-12-01 10:45:14 -08:00
Albert Vaca
82bc73dd9b WIPx2 2015-12-01 07:25:34 -08:00
Albert Vaca
16f9af908a WIP 2015-11-30 10:36:01 -08:00
Albert Vaca
30d2dd991b Merge branch 'master' into sslmaster 2015-11-30 03:40:07 -08:00
Vineet Garg
646196b3eb Added loopback pairing handler 2015-09-14 16:36:04 +05:30
Aleix Pol
f7423c6ad6 Better use of error information 2015-09-12 09:47:47 +02:00
Aleix Pol
5e0a7a34b9 Merge branch 'master' into ssl
# Conflicts:
#	cli/kdeconnect-cli.cpp
#	core/backends/lan/landevicelink.cpp
#	core/backends/lan/landevicelink.h
#	core/backends/lan/lanlinkprovider.cpp
#	core/backends/lan/lanlinkprovider.h
#	core/backends/lan/socketlinereader.h
#	core/backends/lan/uploadjob.cpp
#	core/backends/lan/uploadjob.h
#	core/backends/loopback/loopbackdevicelink.h
#	core/daemon.cpp
#	core/daemon.h
#	core/device.cpp
#	core/device.h
2015-09-11 17:25:23 +02:00
Aleix Pol
26b0ec8b98 Make sure we don't disconnect from discovering remotes
Otherwise it's hard to let other devices connect to us, without having both
devices in discoverability mode.

Reviewed by Albert Vaca
2015-09-09 13:01:38 +02:00
Aleix Pol
817fcbc9d6 Merge branch 'stable' 2015-09-08 10:51:41 +02:00
Aleix Pol
d58f6314fe run Clang Modernize
Minus the auto change
2015-09-08 10:47:37 +02:00
Aleix Pol
4023bf0599 Only keep connections alive with unpaired devices when discovery is enabled
At the moment, we were keeping the connection alive with every reachable
device. While this works optimally for most use-cases, on networks with
several devices with KDE Connect, the amount of connections grows
exponentially.

Reviewed by Albert Vaca

CCBUG: 352424
2015-09-08 09:30:55 +02:00
Aleix Pol
d835d01a09 Add a test for file sending, using the loopback device
Extends unit testing by making sure that file sharing works locally.

REVIEW: 125086
2015-09-07 15:03:04 +02:00
Vineet Garg
6fe1399a18 Fixed minor issues in pairing handler 2015-08-13 14:56:28 +05:30
Vineet Garg
27515546a0 Now per device per link type pairing handlers are there 2015-07-25 17:15:19 +05:30
Albert Vaca
dacaee6629 Fixed daemon sending lots of identity packets at startup
The way we were detecting the active network interfaces caused to detect
all of them at the application startup.
2015-04-04 16:32:15 -07:00
Albert Vaca
aaa034b9d6 Removed reference to KDED 2015-02-23 22:14:22 -08:00
Àlex Fiestas
d971269bd5 Remove kdebugnamespace completely and replace by core_debug
In those places that belong to "core" we use core_debug, in any other
place we have added custom logging categories so we use those instead.
2014-09-22 00:59:34 +02: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