1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-04-17 20:31:23 +00:00
Files
NewPipe/app/src/main/java/us/shandian/giga/get/DownloadDataSource.java
Coffeemakr b03723c3fb Code improvements
* Replace unchecked casts with checked casts
 * remove Utility.finViewById
 * Fix return activity checking
 * Create UserAction enum
 * Fix typos
 * Add instrumented test for error info
 * ErrorInfo make fields final
 * Log exception using logger
 * Add inherited annotations
 * Resolve deprecation warnings
 * Remove unused methods from utility
 * Reformat code
 * Remove unused methods from Utility and improve getFileExt
 * Create OnScrollBelowItemsListener
2017-06-28 18:56:05 +02:00

40 lines
974 B
Java

package us.shandian.giga.get;
import java.util.List;
/**
* Provides access to the storage of {@link DownloadMission}s
*/
public interface DownloadDataSource {
/**
* Load all missions
*
* @return a list of download missions
*/
List<DownloadMission> loadMissions();
/**
* Add a download mission to the storage
*
* @param downloadMission the download mission to add
* @return the identifier of the mission
*/
void addMission(DownloadMission downloadMission);
/**
* Update a download mission which exists in the storage
*
* @param downloadMission the download mission to update
* @throws IllegalArgumentException if the mission was not added to storage
*/
void updateMission(DownloadMission downloadMission);
/**
* Delete a download mission
*
* @param downloadMission the mission to delete
*/
void deleteMission(DownloadMission downloadMission);
}