1 /*** 2 * Ambient - A music player for the Android platform 3 Copyright (C) 2007 Martin Vysny 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 package sk.baka.ambient; 19 20 /*** 21 * Notifies about a background task progress. May be used for a progress 22 * reporting. 23 * 24 * @author mvy 25 */ 26 public interface IBackgroundTask { 27 /*** 28 * Informs that a background task has been started or has ended. 29 * 30 * @param taskCount 31 * current task count. Ignored if used for progress reporting. 32 * @param arbitraryTaskName 33 * a name of random active task. <code>null</code> if no tasks 34 * are executed or the executor failed to obtain a name. If used 35 * for a progress reporting then this is the new name of the 36 * task. 37 * @param progress 38 * total current progress of all tasks. If used for a progress 39 * reporting then this is the progress of this task. 40 * @param maxProgress 41 * total maximum progress of all tasks. If used for a progress 42 * reporting then this is the maximum progress of this task. 43 */ 44 void backgroundTask(final int taskCount, final String arbitraryTaskName, 45 final int progress, final int maxProgress); 46 }