Commit graph

76 commits

Author SHA1 Message Date
Albert Vaca
b009c5fd0b Add a function to list device names
To ease dbus scripting
2018-03-24 17:37:06 +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
Nicolas Fella
9336c05360 Fix build with Bluetooth enabled
Summary: A variable was not renamed correctly because nobody tested it with Bluetooth enabled

Test Plan: compiles

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D7777
2017-09-16 14:03:51 +02: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
Jean Vincent
c864267f04 Replace Q_FOREACH with C++11 range-for
Summary:
The use of Q_FOREACH is advised against (https://doc.qt.io/qt-5/qtglobal.html#Q_FOREACH) since Qt 5.7 and will eventually be removed from Qt.

I replaced all occurrences with the range-for loop introduced in C++11 (except for the one in daemon.cpp in deviceIdByName which might have a bug / typo in it).

I added const to the container or casted it with qAsConst when appropriate to avoid unnecessary copies.

(This is my first submission. I did all the unit tests, and they all passed but I don't know how to show it here.)

Reviewers: #kde_connect, nicolasfella, apol

Reviewed By: #kde_connect, nicolasfella, apol

Subscribers: albertvaka, apol, nicolasfella

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6724
2017-07-21 09:57:19 +02:00
Àlex Fiestas
c0a417e9e4
Make Bluetooth optional
This way we can merge this code in master with the hope of it getting
more attention.
2017-05-24 23:54:59 +02:00
Albert Vaca
6792b45fae
Adapt to new API in master 2017-05-24 23:54:58 +02:00
Saikrishna Arcot
d711547ab5
Add initial Bluetooth backend implementation.
KDE Connect runs, and the bluetooth service gets published in the SDP
(service discovery protocol), which other devices use to determine what
services are available.

The getPairedDevices() method in the link provider class uses D-Bus to get
the list of paired devices, since Qt doesn't have a method giving that
information. As a result, that part of the code only works on Linux.

REVIEW: 122174
2017-05-24 23:54:58 +02:00
Albert Vaca
7cc39aada8 Added an option to the cli to return your own device id 2017-02-24 22:37:22 +01: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
Aleix Pol
ea41d3786e Expose pairing state for devices
Will allow to have information about whether we're pairing, mostly for
better GUI.

Pair-programmed with Albert Vaca
2017-01-25 00:22:22 +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
1a2b227dff Q_GLOBAL_STATIC is unnecessary on basic data types. 2016-11-26 16:21:30 +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
a1340c8042 Fixed old style connects with clazy 2016-11-26 15:14:19 +01:00
Albert Vaca
1a1f94fd94 Fixed old style connects with clazy 2016-11-26 15:12:38 +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
d9e7f308c2 Show the announcedName in the qml app
Makes it possible to display it and modify it
Introduces a DBusProperty component that can be used if we don't want
to go through the QtDBus property generation hell.
2016-08-21 19:38:15 +02:00
Albert Vaca
6248f03256 Made a QString const refrence. 2016-07-07 01:09:07 +02:00
Albert Vaca
7c0fbbc034 Unused include cleanup 2016-07-05 14:13:48 +02:00
Albert Vaca
e880e14ed5 Preffer Q_FOREACH to foreach 2016-06-21 14:50:17 +02:00
Aleix Pol
c7429b56b7 In the CLI interface, make it possible to refer a device by name
Only works with trusted devices
2016-06-06 01:21:37 +02:00
Albert Vaca
aa4150f0c9 Moved ConnectionStarted from DeviceLink to LanDeviceLink 2016-01-10 07:12:13 -08:00
Albert Vaca
1848e96a91 Fixed old signal name 2015-12-17 05:54:37 -08:00
Aleix Pol
97d97ffa1b Fix connect 2015-12-06 01:18:27 +01:00
Albert Vaca
cf6cbd2925 WIPx3! 2015-12-01 10:45:14 -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
David Edmundson
97034e3bbd Don't cleanup devices if pairing 2015-09-12 22:03:56 +02:00
Aleix Pol
2c2cb21ee1 Don't clean the devices that looked us up in the first place 2015-09-12 20:53:05 +02:00
Aleix Pol
4730022810 Pass arguments as const-reference 2015-09-12 09:45:59 +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
Albert Vaca
4c98e2e7b3 Less verbose output 2015-09-11 02:29:57 -07:00
Aleix Pol
a9d2840664 Use acquire and release instead of a boolean property
This way we hope we won't end up without discovery if 2 instances need
discovery at the same time.

Reviewed by Albert Vaca
2015-09-09 20:09:04 +02:00
Aleix Pol
32daa4e51f Fix misbehaviour
Delete devices, not links
2015-09-09 13:42:28 +02:00
Aleix Pol
77e92262fe Fix build 2015-09-09 13:03:08 +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
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
78e9c08732 Merge branch 'master' into ssl
Conflicts:
	core/backends/lan/socketlinereader.h
	core/backends/lan/uploadjob.h
	core/networkpackage.h
2015-08-25 03:43:41 +05:30
Boris Egorov
1924173df2 Fix various krazy2 warnings
Fix following krazy2 warning types:
[explicit], [endswithnewline], [doublequote_chars], [includes], [normalize],
[postfixop], [spelling]

See http://ebn.kde.org/krazy/reports/playground/base/kdeconnect-kde/index.html
for details.

SLOT/SIGNAL normalization done with Qt normalize utility:
https://github.com/qtproject/qtrepotools/tree/master/util/normalize

REVIEW: 124857
2015-08-21 22:38:54 +06:00
Vineet Garg
c5a399b94b Fixed code identation issue 2015-08-12 23:49:15 +05:30
Vineet Garg
cf3d37b504 Fixed issue pointed out on RR
Fixed some pairing handler issues
2015-08-11 09:04:02 +05:30
Vineet Garg
eda2563d03 Fixed encryption info in cli 2015-07-19 20:25:28 +05:30
Vineet Garg
e6da860fb7 Fixed issues pointed out on CR 2015-07-14 17:34:04 +05:30
Vineet Garg
7c777e6279 Implemented pairing handler interface 2015-07-10 03:21:08 +05:30
Vineet Garg
148a713176 Initial working implementation of ssl 2015-07-05 18:53:53 +05:30
Albert Vaca
77256e1932 Devices where not removed if they were unpaired after going offline 2015-06-21 19:40:05 -07:00
Albert Vaca
08938689c5 Emit less redundant events 2015-06-21 19:39:04 -07:00
Albert Vaca
09557b8a14 Moved network change detection from daemon to lanlink 2015-06-14 13:54:52 -07:00