Commit graph

55 commits

Author SHA1 Message Date
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
84bba9429f Merge branch 'master' into 1.x
# Conflicts:
#	core/backends/lan/downloadjob.cpp
#	core/backends/lan/downloadjob.h
#	core/filetransferjob.cpp
#	core/filetransferjob.h
#	plugins/notifications/sendreplydialog.cpp
#	plugins/notifications/sendreplydialog.h
#	plugins/telephony/sendsmsdialog.cpp
#	plugins/telephony/sendsmsdialog.h
2017-09-03 22:05:54 +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
Albert Vaca
239f7f6830 Expose isPluginEnabled and setPluginEnabled
BUG: 383795
2017-08-22 15:34:18 +02:00
Jean Vincent
25b86c6c7f Determine which IP address to use for sshfs
Summary:
There is currently an issue where the device doesn't send the correct IP address for sshfs when a VPN is present.

Instead of asking the device to find and send its address, we can store it from when the device link is created then reuse it.

Test Plan:
All unit tests pass.

In these different situations:
  - without a VPN
  - with a VPN running
  - with a VPN started then stopped (the tun interface might still be there)
Try to remotely browse the device. It should work in all cases.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, apol, nicolasfella, sredman

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6730
2017-07-22 11:18:06 +02:00
Aleix Pol
f65392ca6b Expose pair requests on the KCM 2017-02-20 21:00:26 +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
Aleix Pol
c038c41eec Remove unused enum 2017-01-13 17:48:37 +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
81634303b2 Make capabilities static
As discussed with Albert, move the population of capabilities into the
identity package, making them static along the execution of the link.

When we receive the identityPackage, we collect the plugins we can use with
the device and stick to those. This should simplify the implementation and
remove the possibility to lose packages if packages are received before the
capabilities are processed in the former approach.

REVIEW: 128386
2016-07-06 17:37:22 +02:00
Albert Vaca
7c0fbbc034 Unused include cleanup 2016-07-05 14:13:48 +02: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
29d3f9aa7a Expose protocol version 2016-04-14 18:52:31 -07:00
Albert Vaca
aa4150f0c9 Moved ConnectionStarted from DeviceLink to LanDeviceLink 2016-01-10 07:12:13 -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
David Edmundson
f1f3f48aaf Export pairStatus 2015-09-12 22:03:39 +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
Albert Vaca
217d4b60ff Fixed outging capabilities 2015-09-12 08:51:39 -07: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
Aleix Pol
6a379e9227 Rename missingPlugins to unsupportedPlugins 2015-09-08 17:38:33 +02:00
Aleix Pol
df3581459a Add a test that makes sure that capabilities are gathered correctly
While at it, fix the logic, because it wasn't working all that well.

Reviewed by Albert Vaca
2015-09-08 17:35:30 +02:00
Aleix Pol
4960247fb5 Add a package type that updates the device capabilities
Every time we reload the plugin list, report the plugins that we support.
If the remote devices' capabilities change, update the plugin list.

Reviewed by Albert Vaca
2015-09-07 20:03:05 +02:00
Aleix Pol
91351773fd Mark incompatible plugins as such in the kcm
If a plugin isn't available, display it as unsupported by the device. This
is figured out through capabilities.

Reviewed by Albert Vaca
2015-09-07 19:35:07 +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
2824e73617 Pairing handler implemented 2015-07-27 20:58:58 +05:30
Vineet Garg
27515546a0 Now per device per link type pairing handlers are there 2015-07-25 17:15:19 +05:30
Vineet Garg
eda2563d03 Fixed encryption info in cli 2015-07-19 20:25:28 +05:30
Vineet Garg
20e46418ba Encryption info in cli 2015-07-18 18:54:10 +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
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
Albert Vaca
08938689c5 Emit less redundant events 2015-06-21 19:39:04 -07:00
Aleix Pol
cee2c6b057 Remove unused declaration 2015-06-13 01:27:16 +02:00
Aleix Pol
ef788e0658 Restore removed API, deprecate
REVIEW: 124084
2015-06-12 17:54:47 +02:00
Aleix Pol
b592dc99a0 Merge pairingSuccessful and unpaired signals into pairingChanged(bool)
REVIEW: 124067
2015-06-11 16:19:00 +02:00
Albert Vaca
e5b897884c Added device status icons to be used in the KCM instead of the IM ones 2015-05-17 23:28:58 -07:00
Albert Vaca
563233cac7 Fixed unpair still using the old KConfig 2015-03-15 19:31:01 -07:00
Aleix Pol
6fe7a9b158 Make it possible for the DevicesModel to react to device name changes 2015-03-14 04:28:54 +01:00
Aleix Pol
9c45c5469c Prefer to specify the property
Tie the change signal to the getter, makes the interface easier to read
and opens the possibility to adopt certain optimizations in the Qt side.
2015-03-14 04:09:14 +01:00
Aleix Pol
807926473d Use better types to store the device internal data
https://marcmutz.wordpress.com/effective-qt/containers/
2015-03-14 04:07:55 +01:00
Aleix Pol
0e96d837ff Make sure the capabilities don't change over time by constifying
It exposed a problem later on, where we'd end up removing our own
capabilities into the remote's.
2015-03-14 02:44:21 +01:00
Albert Vaca
c7c91c1289 Added KdeConnectConfig class that aims to be a KConfig abstraction
Benefits:
- We had config files in different paths, now they will be centralized.
- Daemon, LanLinkProvider and NetworkPackage depend only on Qt now.
- KConfig is accessed with strings as keys, where a typo can go unnoticed.
- Daemon is now thinner, as it doesn't need to initialize config values.
- QCA::Initializer is in a single place now (was in Daemon and Plugin).
2015-03-01 20:16:07 -08:00
Aleix Pol
ef70772f70 Clean up generation of the host's private key
Only look for it in the writable path, as it won't ever be installed in a
common place.
Don't look for the path in the config file either.
Don't make it depend on the application name.

REVIEW: 122744
2015-03-02 00:49:44 +01:00
Aleix Pol
21ab5a4f81 Merge branch 'master' into frameworks
Mostly kDebug -> qCDebug
Also some KCmdLineArgs -> QCommandLineParser

Conflicts:
	cli/kdeconnect-cli.cpp
	core/CMakeLists.txt
	core/backends/lan/lanlinkprovider.cpp
	core/daemon.cpp
	core/pluginloader.cpp
	interfaces/CMakeLists.txt
	kio/kiokdeconnect.cpp
	plugins/mousepad/CMakeLists.txt
	plugins/mousepad/mousepadplugin.h
	plugins/mpriscontrol/mpriscontrolplugin.cpp
	plugins/sftp/sftpplugin.cpp
2014-11-04 19:12:29 +01:00
Aleix Pol
380006114a Use the incoming/outgoing capabilities for trimming loaded plugins
Only lets the plugins that support something offered on the other end or
that offer something supported on the other end. If we don't have
information about the other device, we enable everything like we used to.

Also refactors a bit the plugin loader, to be able to provide information
step by step.

Currently it works, but we need support for capabilities at least on
Android to start taking good advantage of it.

REVIEW: 118820
CCMAIL: kdeconnect@kde.org
2014-07-11 01:54:19 +02:00