use of org.syncany.operations.daemon.Watch.SyncStatus in project syncany by syncany.
the class WatchServer method onListWatchesRequestReceived.
@Subscribe
public void onListWatchesRequestReceived(ListWatchesManagementRequest request) {
List<Watch> watchList = new ArrayList<Watch>();
for (File watchFolder : watchOperations.keySet()) {
boolean syncRunning = watchOperations.get(watchFolder).isSyncRunning();
SyncStatus syncStatus = (syncRunning) ? SyncStatus.SYNCING : SyncStatus.IN_SYNC;
watchList.add(new Watch(watchFolder, syncStatus));
}
eventBus.post(new ListWatchesManagementResponse(request.getId(), watchList));
}
use of org.syncany.operations.daemon.Watch.SyncStatus in project syncany by syncany.
the class WatchTest method testGetStatus.
@Test
public void testGetStatus() {
SyncStatus res = watch.getStatus();
assertNotNull(res);
assertEquals(status, res);
}
use of org.syncany.operations.daemon.Watch.SyncStatus in project syncany by syncany.
the class WatchTest method testGetStatus.
@Test
public void testGetStatus() {
SyncStatus res = watch.getStatus();
assertNotNull(res);
assertEquals(status, res);
}
Aggregations