Commit graph

176 commits

Author SHA1 Message Date
Olivier Goffart
24af9f38f4 Merge branch 'csync_lgpl' into propagator-ng
Conflicts:
	src/mirall/csyncthread.cpp
	src/mirall/csyncthread.h
	src/mirall/folder.cpp
	src/mirall/progressdispatcher.h
	src/mirall/syncfileitem.h
2013-08-21 13:19:02 +02:00
Klaas Freitag
98efab83a1 Compile against ocsync based on csync 0.50 2013-08-20 13:26:03 +02:00
Klaas Freitag
192212c682 Handle quota exceeding as error. 2013-08-15 08:15:43 +02:00
Olivier Goffart
e4128cd5d8 progress with new propagator 2013-08-14 19:59:16 +02:00
Olivier Goffart
f8e6326880 Default to not cancel
So that the owncloudcmd client is not blocked
2013-08-14 15:44:30 +02:00
Olivier Goffart
67c5f513aa Fix compilation after merge 2013-08-14 15:36:34 +02:00
Olivier Goffart
0589bfc51b Merge branch 'master' into propagator-ng
This just fix the conflict.
Do not compile or work yet

Conflicts:
	src/CMakeLists.txt
	src/mirall/csyncthread.cpp
	src/mirall/csyncthread.h
	src/mirall/owncloudfolder.cpp
	src/mirall/syncfileitem.h
	test/CMakeLists.txt
2013-08-14 15:19:21 +02:00
Olivier Goffart
c2cc9e62a7 Fix the brandwith limit
The unit in mirall are in kbytes/s,  but csync expect  byte/s
2013-08-14 14:57:56 +02:00
Klaas Freitag
0a9491ff46 Improved timestamp formatting in item sync progress dialog. 2013-08-14 08:04:46 +02:00
Klaas Freitag
364d4340fd Show a more informative problem message in progress. 2013-08-07 12:15:28 +02:00
Klaas Freitag
9c289334e9 Handle notifications for deletes. 2013-08-06 18:04:08 +02:00
Daniel Molkentin
0932ee6051 Merge branch 'shibboleth'
Conflicts:
	src/CMakeLists.txt
	src/mirall/application.h
2013-08-05 19:54:06 +02:00
Klaas Freitag
67f57a443c Disable unknown csync flags for now. 2013-08-05 12:30:24 +02:00
Klaas Freitag
16d81db117 Show deletes in progress. 2013-08-05 09:39:06 +02:00
Krzesimir Nowak
78b6f4df01 Move the creds/ and wizard/ directories one level higher. 2013-08-01 16:53:43 +02:00
Krzesimir Nowak
eacb849353 Fix credentials handling in csync.
CSync module's properties can be set only after it was initialized, so
we split the sync context vfunc into two: the one ran before
initialization and the one ran before sync beginning.
2013-08-01 16:53:43 +02:00
Krzesimir Nowak
92af3ea725 Add and use credentials abstraction. Implement HTTP and dummy credentials.
To achieve that MirallConfigFile now exports several general
settings-related methods for subclasses (here: for HttpConfigFile), so
it does not have to contain any code targeted for specific
credentials.
2013-08-01 16:53:43 +02:00
Klaas Freitag
a64724be0e More sophisticated progress, add Recent Changes Menu to tray.
ProgressDispatcher now stores a queue of events as well as sync
problems, better known as soft errors. The tray menu displays a
sub menu with 5 recent changes and adds a more... button that
shows a warning icon if soft errors had happend.
More to implement.
2013-07-30 22:24:48 +02:00
Klaas Freitag
84e8ab5b71 Make progress aware of errors, first step. 2013-07-30 22:24:48 +02:00
Klaas Freitag
3a9ab3a86f Consolidated progress displaying to a single slot from csync. 2013-07-26 13:44:38 +02:00
Klaas Freitag
8f912ca0c5 Adopt to new progress API in csync, WIP 2013-07-25 16:28:45 +02:00
Olivier Goffart
a827056d28 Fix upload limit 2013-07-25 11:21:02 +02:00
Daniel Molkentin
bca295183b Make use of bandwidth limiting, split general/network settings.
Fixes #14
2013-07-24 19:53:20 +02:00
Daniel Molkentin
a3b3c28694 CSyncThread: Fix unreachable code 2013-07-23 14:34:06 +02:00
Klaas Freitag
976c41a3b8 Beautified ProgressDispatcher 2013-07-23 13:32:33 +02:00
Klaas Freitag
1cc60e755b Rather show overall progress in settings dialog. 2013-07-19 17:05:46 +02:00
Klaas Freitag
992dffa032 Add an overall progress counter to progressDispatcher 2013-07-19 13:05:30 +02:00
Markus Goetz
ab7bfabf12 Put cookies into csync
We already have the auth cookies from the quota request,
so put them into csync to avoid a 401 roundtrip
2013-07-17 16:27:18 +02:00
Klaas Freitag
6b5b9db20a Handle progress through ProgressDispatcher class, WIP. 2013-07-11 12:32:58 +02:00
Olivier Goffart
a8707b681d Report proper error when csync_init fails
Fix mirall issue #705
2013-06-19 18:17:32 +02:00
Olivier Goffart
5d8f9f5346 Silent clang warning 2013-06-19 18:16:43 +02:00
Daniel Molkentin
01ad3c4d81 Remove more dead code for readability 2013-06-19 11:31:09 +02:00
Olivier Goffart
334443adbb Fix crash when removing a folder
The problem is that the module_property of csync are not really tight to
a context, but are global to all the contextes.
Which means csync_owncloud may still have a pointer to the destroyed
context of the destroyed folder.
By always resetting the context pointer, we make sure there is no stale
pointers there
2013-06-12 12:23:12 +02:00
Olivier Goffart
541239c17b Make the message box more explicit when all files have been removed
Also clean the db if the user wish to keep the files
2013-06-10 15:58:02 +02:00
Olivier Goffart
d2579a7754 Warn if we detect that all fles are about to be removed. 2013-06-08 15:41:53 +02:00
Olivier Goffart
07ce6cfa79 don't use member variable of the propagator 2013-05-16 14:50:36 +02:00
Olivier Goffart
9ce47c9675 make the propagator asynchronous 2013-05-16 13:54:22 +02:00
Olivier Goffart
40255d643c propagator-ng: adapt to the merge of rename_folders branch 2013-05-15 15:22:20 +02:00
Olivier Goffart
0b1ecd0ac6 propagator-ng: Abort on fatal error 2013-05-08 13:30:30 +02:00
Olivier Goffart
2193da0ab5 Fix a few FIXME 2013-05-07 17:47:29 +02:00
Olivier Goffart
0636ae6f28 propagator-ng: be able to resume download 2013-05-06 16:59:11 +02:00
Olivier Goffart
02957aba45 propagator-ng: Emit the fileReceived signal 2013-05-05 12:46:40 +02:00
Klaas Freitag
721a8f79ab Improve error handling, add error string to each individual file item. 2013-05-05 11:47:19 +02:00
Klaas Freitag
c956d11183 More error handling of propagator, some cleanups. 2013-05-04 17:14:47 +02:00
Olivier Goffart
c041076c95 Handle renames 2013-05-04 15:32:11 +02:00
Olivier Goffart
e1e8842548 New owncloud propagator that skip the vio abstraction layer
The vio abstraction layer within csync is inneficient for the owncloud
use case because not all calls maps well to the POSIX interface. We can
be much more efficient by doing exactly what we need.

Also, this will allow us to scedule better the calls and possibly to use
threads.
2013-05-04 11:02:30 +02:00
Klaas Freitag
8928c87fc3 Removed silly configDir hack from thread. 2013-04-22 15:06:28 +02:00
Klaas Freitag
9f0348979b Simplify csyncthread with keeping csync ctx intact 2013-04-20 13:15:27 +03:00
Klaas Freitag
a4be3f304d Set log verbosity before calling csync_init. 2013-04-17 15:29:44 +02:00
Daniel Molkentin
acdb624713 safer approach for detecting duplicate sync runs 2013-04-15 15:55:54 +02:00
Daniel Molkentin
3cae8e7124 Remove debugging code 2013-04-15 14:32:23 +02:00
Klaas Freitag
aa6160ab62 Fixed some valgrind warnings. 2013-04-08 14:50:47 +02:00
Daniel Molkentin
f74aa1e9a6 terminate if more than one thread is being started. 2013-04-04 17:25:53 +02:00
Klaas Freitag
ae558a5889 Add a appNameGUI method to the theming. 2013-02-21 12:21:42 +01:00
Klaas Freitag
55a4fd752d Fix commit fd83bf - add treewalk success check. 2013-02-20 17:26:07 +01:00
Klaas Freitag
fd83bf2089 Remove unused variable doTreeWalk. 2013-02-20 10:06:45 +01:00
Daniel Molkentin
5954fb280c Centralize error handling for csync steps
...as a preparation for offline handling.
As a side-effect, removed the last instance
of goto in mirall.
2013-02-15 19:29:27 +01:00
Daniel Molkentin
1c70fb3ba4 Set csync config dir in mirall properly
Otherwise canceling the sync cannot remove the lock file
2013-02-14 17:36:11 +01:00
Daniel Molkentin
8dd97a358a Introduce SyncPrepare state
SyncPrepare is when the folder class prepares the actual syncing,
i.e. does treewalks and runs the reconceiler in case of mirall. The actual
SyncRunning state will only be entered if there is actually anything to
sync.

Fixes #289
2013-02-14 17:36:11 +01:00
Daniel Molkentin
7794480da0 csync: Put up the QNAM key chain for comparison
Comparing with the CA certs will not help with
intermediates, and other cases.
2013-01-21 13:33:33 +01:00
Daniel Molkentin
0171b8b998 Make hash formatting static
no need for class instanciation.
2013-01-21 13:33:33 +01:00
Daniel Molkentin
f678629734 Fix proxy auth
- The port was not set correctly
- The password was read base64 encoded, but not read stored as such
2013-01-16 17:50:26 +01:00
Daniel Molkentin
45c82a2746 Go offline when server is in maintenance. 2013-01-16 14:41:12 +01:00
Klaas Freitag
bc3938daa7 A new sync file protocol dialog. 2013-01-15 20:42:09 +01:00
Klaas Freitag
07034daffe Take valid caList from QSslSocket::defaultCA. 2013-01-14 12:13:51 +01:00
Klaas Freitag
dca8ecb929 Remove bogus spaces. 2013-01-14 12:13:50 +01:00
Klaas Freitag
f4019f5a5a Show backend error messages to user. 2012-12-20 20:51:43 +01:00
Klaas Freitag
c3f6153f94 Fixed QString -> const char* conversions to handle UTF8 correctly. 2012-12-20 16:49:29 +01:00
Klaas Freitag
87aa3d7c60 More detailed error handling. 2012-12-20 16:49:29 +01:00
Klaas Freitag
144a2832b9 Loop over all certificates to match the approved one. 2012-12-20 16:49:29 +01:00
Klaas Freitag
30494eee75 Added utility class with format fingerprint method.
Removed other obsolete formatting method.
2012-12-13 21:36:44 +01:00
Klaas Freitag
c6edde1365 Fix merging. 2012-12-13 19:52:07 +01:00
Daniel Molkentin
6e3b5e075a Fix crash 2012-12-12 20:06:59 +01:00
Daniel Molkentin
3cb2e74d12 Notify user about new files.
Let's see if its too annoying,
we can still add a timer later
2012-12-12 15:00:38 +01:00
Daniel Molkentin
41082c5e81 Fix proxy error
This was caused by an incorrect translation to a string type.
2012-12-12 15:00:38 +01:00
Klaas Freitag
1eabdee253 Enable logging through new csync logging api 2012-12-07 09:03:24 +01:00
Klaas Freitag
029535bcea Removed another scary thing: qstrdup for proxy type. 2012-12-06 19:05:25 +01:00
Klaas Freitag
8af257a4cd Start fs watching with a delay of 2 seconds to don't catch the journal changes. 2012-12-06 18:38:45 +01:00
Klaas Freitag
fbae2d7330 Further cleanups that were possible by new change notification. 2012-12-06 18:35:02 +01:00
Klaas Freitag
f296fad4bb Set csync context as module parameter 2012-12-06 17:57:00 +01:00
Daniel Molkentin
e2d8105f0d Remove debug 2012-12-06 17:54:44 +01:00
Daniel Molkentin
287c073f00 Remove code for local sync runs
Rely entirely on folderwatcher. Local
sync runs can be implemented in terms
of a dummy folderwatcher if we want
to support systems without fs monitoring
again..
2012-12-06 17:53:04 +01:00
Daniel Molkentin
6678beadab Hack: Sleep 2 secs after sync run
This avoids that we get notified by the system
about writing of the csync db (IO has latency).
2012-12-06 17:53:04 +01:00
Daniel Molkentin
f20db6bbc1 Implement folder watching for OS X using FSEvents 2012-12-06 17:53:04 +01:00
Daniel Molkentin
b65fd11a36 Remove superfluous include 2012-12-05 16:46:27 +01:00
Daniel Molkentin
36c9a29a7b Move Logger into its own file, move it to libsync.
This fixes a linker error.
2012-12-05 16:45:28 +01:00
Klaas Freitag
6ba098d26d Make use of the new csync_set_module_properties and remove stuff from
before.
2012-12-05 12:30:28 +01:00
Klaas Freitag
22128781be Use new logging api of csync. 2012-12-04 17:24:46 +01:00
Klaas Freitag
9e66de07f9 Better error message for propagate fail. 2012-11-16 12:32:07 +01:00
Klaas Freitag
78c1bc6b22 Cleanup of sync result treewalk, build up journal in owncloudfolder. 2012-10-29 12:24:20 +01:00
Daniel Molkentin
3db60b4fe7 Massive simplification of proxy support.
Purposefully separated from last commit, but
associated with it: No more need for special
cases after libocsync got fixed do adhere properly.
2012-10-09 02:35:08 +02:00
Klaas Freitag
b41d8c3c12 Removed app name from strings even more and replaced by theme string. 2012-09-27 17:22:08 +02:00
Klaas Freitag
180b99c02e Change the csync config dir to the users app path, not longer .csync. 2012-09-27 12:27:40 +02:00
Daniel Molkentin
2de9cc9590 Use the themes appName() instead of "ownCloud".
This turns the Theme class into a singleton.
2012-09-24 17:57:20 +02:00
Klaas Freitag
8f40b2a276 Use delete[] to free mem from qstrdup, thanks valgrind. 2012-09-19 13:51:27 +03:00
Klaas Freitag
824bd1e087 Fix memory allocation for proxy struct in thread. 2012-08-30 18:50:42 +03:00
Klaas Freitag
fd7cb38c16 Use qthread more correct, see
http://labs.qt.nokia.com/2006/12/04/threading-without-the-headache/
2012-08-26 11:47:45 +02:00
Klaas Freitag
d733aac0e8 Fix QLatin1String issues. 2012-08-17 18:13:17 +03:00
Klaas Freitag
74c6c4e7c9 cleanups and improved error messaging on proxy problems. 2012-08-09 15:13:20 +03:00
Klaas Freitag
9e30fe4ea5 Do not stop syncing if local directories are write protected. 2012-08-09 12:12:54 +03:00