Multi-platform app that allows your devices to communicate
Find a file
Àlex Fiestas ba4c87abc1 Consume all pendingDatagrams from udpServer
This fixes a bug where receiving broadcast messages would stop working
in case 2 messages have been received at the same time.

The problem is that readReady will only emit once per batch of datagrams
received, in case we receive 2 datagrams but only consume 1, readReady
will never be emitted again.
2015-05-05 01:04:50 +02:00
cli Fix typo 2015-03-20 10:07:34 +02:00
cmake don't install library dev files until there is an API/ABI policy 2015-03-12 12:42:10 +01:00
core Consume all pendingDatagrams from udpServer 2015-05-05 01:04:50 +02:00
daemon Define interface name on the leaf class 2015-04-29 02:25:49 +02:00
fileitemactionplugin SVN_SILENT made messages (.desktop file) - always resolve ours 2015-05-03 10:29:27 +00:00
icon Ooops, deleted icons by mistake. 2015-04-19 22:16:31 -07:00
interfaces Returning a QIcon instead of a fixed size QPixmap for DecorationRole. 2015-04-19 22:21:37 -07:00
kcm Make it possible to fetch the device from the DevicesModel from QML 2015-04-15 13:00:23 +02:00
kcmplugin Move some find_package dependencies to the children directories as agreed 2015-04-10 17:48:48 +02:00
kio Move some find_package dependencies to the children directories as agreed 2015-04-10 17:48:48 +02:00
plasmoid Re-use the uri instead of creating new ones just because 2015-04-15 13:01:33 +02:00
plugins SVN_SILENT made messages (.desktop file) - always resolve ours 2015-05-02 11:45:00 +00:00
tests Fixed test 2015-04-19 22:29:03 -07:00
.gitignore Fixed compilation warnings in clang (one of them is actually an issue!) 2015-04-19 22:50:12 -07:00
.reviewboardrc Submit .reviewboardrc file 2014-06-18 02:42:07 +02:00
CMakeLists.txt Make sure we're not automatically casting QString directly into QUrl 2015-04-01 23:40:29 +02:00
COPYING add missing licence file 2013-09-13 19:30:36 +02:00
kdeconnect-non-plasma.desktop - Adde semicollon to validate desktop 2015-04-30 22:42:54 -03:00
kdeconnect-version.h.in Version number is now set in a single place 2015-02-04 23:52:07 -08:00
KDEConnectMacros.cmake Port away from KServiceTrader 2015-03-19 16:36:53 +01:00
README Documentation 2013-09-24 14:14:34 +02:00

Class diagram
==============

   Backend_1  ...  Backend_N
           \   |  /
            Daemon
           /   |  \
     Device_1  ...  Device_N
                   /         \
                   |-Plugin_1 |-DeviceLink_1
                   |-Plugin_2 |-DeviceLink_2
                   |- ...     |-...
                   |-Plugin_N |-DeviceLink_N


Daemon instantiates Backends

Backends manage to create DeviceLinks with the devices they can reach, and Q_EMIT them to the Daemon.

When the Daemon receives a DeviceLink from a backend:
    - If it already knows the Device, adds the new DeviceLink to the existing Device, as a new way to reach it.
    - If not, it creates a new untrusted (yet to be paired) Device.

Devices contain a list of DeviceLinks, plus a list of Plugins (instantiated automatically)

Information for and from Plugins is encapsulated in NetworkPackages.

When a DeviceLink receives a NetworkPackage from the device in the other end, Device will notify all the plugins.

When a Plugin wants to send a NetworkPackage, it does so using the pointer to Device



The NetworkPackage format
=========================

NetworkPackages are independent and self-contained pieces of information that
are sent from one device to another (via a DeviceLink) serialized in json.

The basic structure of a NetworkPackage is the following:

{
  "id": 123456789,
  "type": "org.kde.whatever",
  "body": {

   },
  "version": 5
}

Each type of package defines what it should contain inside its "body", so only
the emisor plugin and receiver plugin of this type of package need agree about
its content. Each plugin should provide a README explaining what does it write
in the "body" section, to ease porting to other platforms.

If the package has a payload attached, it will also contain two more fields:
 "payloadSize": The size of the file, or -1 if it is a stream without known end
 "payloadTransferInfo": Another JSON Object containing the information that the
                        backend wants to send to the peer backend, to actually
                        transfer the payload.

Encrypted network packages have the following format:

 "type": is always set to "kdeconnect.encrypted".
 "id": contains a new valid id (ie: not the same id as the unencrypted package).
 "version": contains the package version.
 "body": contains a "data" array that carries the original package encrypted.

The "data" array is filled the following way:

 1. The original package is serialized.
 2. The serialized string is divided in chunks small enough to be encrypted with
    the other device's public key.
 3. Each chunk is encrypted and appended to the array in order.