search: cleanup
[nikiroo-utils.git] / src / be / nikiroo / fanfix / reader / Reader.java
index 59ed024f42380a8a50f2b3e5fa199146d9092459..a0a8e806656711ca098664bdec7c9a77bda6f9fb 100644 (file)
@@ -170,6 +170,18 @@ public interface Reader {
         */
        public void browse(String source);
 
+       /**
+        * Display all supports that allow search operations.
+        * 
+        * @param sync
+        *            execute the process synchronously (wait until it is terminated
+        *            before returning)
+        * 
+        * @throws IOException
+        *             in case of I/O error
+        */
+       public void search(boolean sync) throws IOException;
+
        /**
         * Search for the given terms and find stories that correspond if possible.
         * 
@@ -183,12 +195,15 @@ public interface Reader {
         * @param item
         *            the item to select (0 = do not select a specific item but show
         *            all the page, items start at 1)
+        * @param sync
+        *            execute the process synchronously (wait until it is terminated
+        *            before returning)
         * 
         * @throws IOException
         *             in case of I/O error
         */
-       public void search(SupportType searchOn, String keywords, int page, int item)
-                       throws IOException;
+       public void search(SupportType searchOn, String keywords, int page,
+                       int item, boolean sync) throws IOException;
 
        /**
         * Search based upon a hierarchy of tags, or search for (sub)tags.
@@ -208,19 +223,22 @@ public interface Reader {
         *            the website to search on
         * @param page
         *            the page of results to show (0 = request the maximum number of
-        *            pages, pages start at 1)
+        *            pages, pages <b>start at 1</b>)
         * @param item
         *            the item to select (0 = do not select a specific item but show
-        *            all the page, items start at 1)
+        *            all the page, items <b>start at 1</b>)
+        * @param sync
+        *            execute the process synchronously (wait until it is terminated
+        *            before returning)
         * @param tags
-        *            the tags display names to search for (this is a tag
+        *            the tags indices to search for (this is a tag
         *            <b>hierarchy</b>, <b>NOT</b> a multiple tags choice)
         * 
         * @throws IOException
         *             in case of I/O error
         */
        public void searchTag(SupportType searchOn, int page, int item,
-                       String... tags) throws IOException;
+                       boolean sync, Integer... tags) throws IOException;
 
        /**
         * Open the {@link Story} with an external reader (the program should be