2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-28 12:47:43 +00:00

12 Commits

Author SHA1 Message Date
Albert Vaca Cintora
8c1603f6e4 Add DeviceInfo class
`DeviceInfo` contains all the properties we need to instantiate a `Device`:
id, name, type, cert, capabilities and protocol version. Before, we had a mix
of passing those around as arguments or passing identity packets (ie: json).
This simplifies the `Device` class quite a bit.

Now, `BaseLink` subclasses need to implement the `getDeviceInfo()` interface
that returns a `DeviceInfo`, which is what we will pass around and eventually
use to instantiate a `Device`.

This means that identity packets are an implementation detail of the
`LanLinkProvider` and that other implementations could get the `DeviceInfo`
in a different way.

In a future, we can add a mechanism for links to notify when their `DeviceInfo` changed.
This will allow us to better support device renames (which now are implemented by 
reconnecting to the device and don't always work) or sending the capabilities fields
later in the case of MacOS/iOS where we can't send them in a UDP packet due to the
size limit of 1500 bytes.
2023-06-27 11:14:36 +00:00
Albert Vaca Cintora
0f4643e502 Project-wide optimize imports 2023-03-05 22:11:58 +01:00
Albert Vaca Cintora
2b1e4dcb23 Bump deps 2023-01-02 22:00:32 +01:00
Nicolas Fella
b3b74f25f4 Convert license headers to SPDX 2020-08-17 16:17:20 +02:00
Isira Seneviratne
c6f8a2ecdc Fix test compilation errors. 2020-08-02 16:56:21 +00:00
Albert Vaca Cintora
b1904a6995 Fixed all tests
Now they are local tests and not Android tests
2019-02-11 21:44:55 +01:00
Nicolas Fella
f244daa5bf Organize imports 2018-12-24 17:43:46 +01:00
Nicolas Fella
a49a145d69 Only use required access modifiers 2018-10-26 23:59:20 +02:00
Nicolas Fella
2d0b97d252 Simplify asserts 2018-10-26 23:11:47 +02:00
Nicolas Fella
59c72c2107 Simplify asserts 2018-10-26 23:00:53 +02:00
Nicolas Fella
93251ee7a6 Remove methods that only call super 2018-09-29 21:02:03 +02:00
Albert Vaca
9b70e1e61f 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, apol

Differential Revision: https://phabricator.kde.org/D11035
2018-03-05 20:07:29 +01:00