1 /* 2 * Copyright (C) 2019-2020 Matthieu Gautier <mgautier@kymeria.fr> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 3 of the License, or 7 * any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 * MA 02110-1301, USA. 18 */ 19 20 package org.kiwix.kiwixlib; 21 22 public class Filter 23 { 24 local(boolean accept)25 public native Filter local(boolean accept); remote(boolean accept)26 public native Filter remote(boolean accept); valid(boolean accept)27 public native Filter valid(boolean accept); acceptTags(String[] tags)28 public native Filter acceptTags(String[] tags); rejectTags(String[] tags)29 public native Filter rejectTags(String[] tags); lang(String lang)30 public native Filter lang(String lang); publisher(String publisher)31 public native Filter publisher(String publisher); creator(String creator)32 public native Filter creator(String creator); maxSize(long size)33 public native Filter maxSize(long size); query(String query)34 public native Filter query(String query); 35 36 Filter()37 public Filter() { allocate(); } 38 39 @Override finalize()40 protected void finalize() { dispose(); } allocate()41 private native void allocate(); dispose()42 private native void dispose(); 43 private long nativeHandle; 44 } 45