import be.nikiroo.fanfix.Instance;
import be.nikiroo.fanfix.reader.BasicReader;
import be.nikiroo.fanfix.reader.Reader;
+import be.nikiroo.fanfix.supported.SupportType;
/**
* This {@link Reader}is based upon the TUI widget library 'jexer'
@Override
public void read(boolean sync) throws IOException {
+ // TODO
+ if (!sync) {
+ // How could you do a not-sync in TUI mode?
+ throw new java.lang.IllegalStateException(
+ "Async mode not implemented yet.");
+ }
+
try {
TuiReaderApplication app = new TuiReaderApplication(this,
guessBackendType());
- new Thread(app).start();
+ app.run();
} catch (Exception e) {
Instance.getTraceHandler().error(e);
}
try {
TuiReaderApplication app = new TuiReaderApplication(this, source,
guessBackendType());
- new Thread(app).start();
+ app.run();
} catch (Exception e) {
Instance.getTraceHandler().error(e);
}
}
+
+ @Override
+ public void search(boolean sync) throws IOException {
+ // TODO
+ if (sync) {
+ throw new java.lang.IllegalStateException("Not implemented yet.");
+ }
+ }
+
+ @Override
+ public void search(SupportType searchOn, String keywords, int page,
+ int item, boolean sync) {
+ // TODO
+ if (sync) {
+ throw new java.lang.IllegalStateException("Not implemented yet.");
+ }
+ }
+
+ @Override
+ public void searchTag(SupportType searchOn, int page, int item,
+ boolean sync, Integer... tags) {
+ // TODO
+ if (sync) {
+ throw new java.lang.IllegalStateException("Not implemented yet.");
+ }
+ }
}