Small fixes, including better external launcher
[fanfix.git] / src / be / nikiroo / fanfix / reader / Reader.java
index d540d39f9094edb4e9d1e08a16cedfe9b65a5298..5fe1c5d67d55bef4993bcd6e55ce7f6c95d8bb6d 100644 (file)
@@ -27,6 +27,8 @@ public interface Reader {
                GUI,
                /** A text (UTF-8) reader with menu and text windows */
                TUI,
+               /** A GUI reader implemented with the Android framework */
+               ANDROID,
 
                ;
 
@@ -40,11 +42,13 @@ public interface Reader {
                        String pkg = "be.nikiroo.fanfix.reader.";
                        switch (this) {
                        case CLI:
-                               return pkg + "CliReader";
+                               return pkg + "cli.CliReader";
                        case TUI:
-                               return pkg + "TuiReader";
+                               return pkg + "tui.TuiReader";
                        case GUI:
-                               return pkg + "GuiReader";
+                               return pkg + "ui.GuiReader";
+                       case ANDROID:
+                               return pkg + "android.AndroidReader";
                        }
 
                        return null;
@@ -158,4 +162,18 @@ public interface Reader {
         *            all
         */
        public void browse(String source);
+
+       /**
+        * Open the {@link Story} with an external reader (the program will be
+        * passed the main file associated with this {@link Story}).
+        * 
+        * @param lib
+        *            the {@link BasicLibrary} to select the {@link Story} from
+        * @param luid
+        *            the {@link Story} LUID
+        * 
+        * @throws IOException
+        *             in case of I/O error
+        */
+       public void openExternal(BasicLibrary lib, String luid) throws IOException;
 }