Commit graph

25 commits

Author SHA1 Message Date
Àlex Fiestas
e3e0eac779 Removed extra lines and trailing spaces 2014-04-14 21:57:48 +02:00
Àlex Fiestas
2a235f6496 Add const in lanDeviceLink 2014-04-14 21:57:48 +02:00
Aleix Pol
ab8ea93812 When uploading a file start reading the file
Otherwise it will wait for ::readyRead() to be called indefinitely.
2014-03-03 04:51:36 +01:00
Albert Vaca
d782060b39 Code chages for compatibility with MSVC compiler
Thanks to Xiluembo
2013-11-18 02:34:34 +01:00
Albert Vaca
6e5de6f437 qDebug -> kDebug with namespaces
Added 3 namespaces: kdeconnect_kded, kdeconnect_kcm and libkdeconnect
2013-11-06 22:16:55 +01:00
Albert Vaca
52dceacd14 Trying to fix a crash in LanDeviceLink/SocketLineReader
ReadyRead is emitted more than once, and there is no data the second time
2013-11-06 21:34:54 +01:00
Albert Vaca
5bbfcd860f LanDeviceLink now waits to read an entire line before trying to read it
Packages always end in \n, so this way we make sure we have a complete
package to unserialize. Before this patch, some long packages that were
divided in chunks weren't received correctly.
2013-10-30 01:18:25 +01:00
Aleix Pol
faa3daa585 Code review
Fixes/adds some comments.
Proper use of some Qt API.

REVIEW: 113195
2013-10-11 15:20:04 +02:00
Albert Vaca
9af0bc342d LanDeviceLink now uses readLine instead of readAll 2013-10-05 17:20:13 +02:00
Albert Vaca
5cac14bc96 LanLinkProvider's onNetworkChange has no effect if onStop was called first 2013-10-05 15:56:06 +02:00
Albert Vaca
f53f70d7c4 Fixed file transfer
Apparently KIO is so dumb it can't create files
Also we have lots of commented qDebugs now
2013-09-27 00:01:59 +02:00
Albert Vaca
cfe13a739c Changed QSharedPointer<QIODevice> to <QTcpSocket>
So we don't need a separate pointer.
2013-09-26 21:34:08 +02:00
Albert Vaca
4bd5d2e427 Payloads are now QSharedPointer<QIODevice> instead of QIODevice* 2013-09-24 14:13:02 +02:00
Albert Vaca
e86897cfe3 Fixed file transfer, added file size to protocol (optional)
Increased protocol version to 5
Updated README
2013-09-20 16:03:17 +02:00
Albert Vaca
cbe275106c Added a qDebug with an error message in UploadJob 2013-09-20 16:03:17 +02:00
Albert Vaca
79a55d8ec0 Fixed landevice link not setting the payload to the proper package
Wrong variable name
2013-09-20 16:03:17 +02:00
Albert Vaca
ddbbafab63 Fixed crash
QIODevice was deleted when DownloadJob was autodeleted, causing dangling
pointers.
2013-09-20 16:03:17 +02:00
Albert Vaca
7d4143b944 First and untested implementation of payload transfer in LAN backend
Encryption not implemented yet for transfers, but should be easy to do
2013-09-14 17:30:12 +02:00
Albert Vaca
42e0b4a066 Moved cryptography layer down from Device to DeviceLink
DeviceLinks will need to know what they are sending and receiving to handle
payloads, so encryption can not happen above them.
2013-09-13 23:27:16 +02:00
Albert Vaca
d1f38a16b2 Fixed possible double-free crash 2013-09-13 21:20:23 +02:00
Tim Creech
817a6c8d3e Didn't build on FreeBSD because it does not define SOL_TCP
Replaced SOL_TCP with getprotobyname("TCP")->p_proto

BUG: 324766
2013-09-13 19:30:36 +02:00
Albert Vaca
111ee7f054 First iteration of filetransfer plugin
Now it just downloads to the user desktop payloads received in packages
with type kdeconnect.filetransfer.
Added the package type define.
Created an an auxiliar QFile-like class with a small needed modification.
Added a commented test in the filetransfer plugin code (to be moved).
2013-09-10 19:01:46 +02:00
Albert Vaca
13dcd01819 Added some comments and todos 2013-09-09 22:50:27 +02:00
Albert Vaca
2625150b68 Fixed bug where more than one loopbackdevicelink was created 2013-09-09 22:28:18 +02:00
Albert Vaca
91949acaa5 Refactor: Moved devicelinks and linkproviders to backends 2013-09-09 18:35:56 +02:00