1 /*
2  *   Copyright (C) 2020 by Chernov A.A.
3  *   valexlin@gmail.com
4  *
5  *   This program is free software: you can redistribute it and/or modify
6  *   it under the terms of the GNU General Public License as published by
7  *   the Free Software Foundation, either version 2 of the License, or
8  *   (at your option) any later version.
9  *
10  *   This program is distributed in the hope that it will be useful,
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *   GNU General Public License for more details.
14  *
15  *   You should have received a copy of the GNU General Public License
16  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.coolreader.sync2;
20 
21 import org.coolreader.crengine.BookInfo;
22 import org.coolreader.crengine.FileInfo;
23 import org.coolreader.crengine.Properties;
24 
25 // Synchronization status listener interface
26 public interface OnSyncStatusListener {
onSyncStarted(Synchronizer.SyncDirection direction, boolean showProgress, boolean interactively)27 	void onSyncStarted(Synchronizer.SyncDirection direction, boolean showProgress, boolean interactively);
28 
OnSyncProgress(Synchronizer.SyncDirection direction, boolean showProgress, int current, int total, boolean interactively)29 	void OnSyncProgress(Synchronizer.SyncDirection direction, boolean showProgress, int current, int total, boolean interactively);
30 
onSyncCompleted(Synchronizer.SyncDirection direction, boolean showProgress, boolean interactively)31 	void onSyncCompleted(Synchronizer.SyncDirection direction, boolean showProgress, boolean interactively);
32 
onSyncError(Synchronizer.SyncDirection direction, String errorString)33 	void onSyncError(Synchronizer.SyncDirection direction, String errorString);
34 
onAborted(Synchronizer.SyncDirection direction)35 	void onAborted(Synchronizer.SyncDirection direction);
36 
onSettingsLoaded(Properties settings, boolean interactively)37 	void onSettingsLoaded(Properties settings, boolean interactively);
38 
onBookmarksLoaded(BookInfo bookInfo, boolean interactively)39 	void onBookmarksLoaded(BookInfo bookInfo, boolean interactively);
40 
onCurrentBookInfoLoaded(FileInfo fileInfo, boolean interactively)41 	void onCurrentBookInfoLoaded(FileInfo fileInfo, boolean interactively);
42 
onFileNotFound(FileInfo fileInfo)43 	void onFileNotFound(FileInfo fileInfo);
44 }
45