1 /****************************************************************************** 2 * 3 * InstallMgr.java - 4 * 5 * $Id: InstallMgr.java 3229 2014-05-09 09:32:36Z scribe $ 6 * 7 * Copyright 2009-2013 CrossWire Bible Society (http://www.crosswire.org) 8 * CrossWire Bible Society 9 * P. O. Box 2528 10 * Tempe, AZ 85280-2528 11 * 12 * This program is free software; you can redistribute it and/or modify it 13 * under the terms of the GNU General Public License as published by the 14 * Free Software Foundation version 2. 15 * 16 * This program is distributed in the hope that it will be useful, but 17 * WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 * General Public License for more details. 20 * 21 */ 22 23 package org.crosswire.android.sword; 24 25 public class InstallMgr { 26 27 public static interface InstallProgressReporter { update(long totalBytes, long completedBytes)28 public void update(long totalBytes, long completedBytes); preStatus(long totalBytes, long completedBytes, String message)29 public void preStatus(long totalBytes, long completedBytes, String message); 30 } 31 reInit()32 public native void reInit(); 33 setUserDisclaimerConfirmed()34 public native void setUserDisclaimerConfirmed(); syncConfig()35 public native int syncConfig(); uninstallModule(String modName)36 public native int uninstallModule(String modName); getRemoteSources()37 public native String [] getRemoteSources(); refreshRemoteSource(String sourceName)38 public native int refreshRemoteSource(String sourceName); getRemoteModInfoList(String sourceName)39 public native SWMgr.ModInfo [] getRemoteModInfoList(String sourceName); remoteInstallModule(String sourceName, String modName, InstallProgressReporter progressReporter)40 public native int remoteInstallModule(String sourceName, String modName, InstallProgressReporter progressReporter); remoteInstallModule(String sourceName, String modName)41 public int remoteInstallModule(String sourceName, String modName) { return remoteInstallModule(sourceName, modName, null); } getRemoteModuleByName(String source, String name)42 public native SWModule getRemoteModuleByName(String source, String name); 43 44 } 45 46