2014-05-08 21:39:29 -04:00
|
|
|
package org.bspeice.minimalbible.activities.downloader;
|
2014-05-08 20:39:38 -04:00
|
|
|
|
2014-05-08 21:39:29 -04:00
|
|
|
import org.bspeice.minimalbible.MinimalBible;
|
2014-05-24 21:12:20 -04:00
|
|
|
import org.bspeice.minimalbible.activities.downloader.manager.BookDownloadManager;
|
|
|
|
import org.bspeice.minimalbible.activities.downloader.manager.BookDownloadThread;
|
2014-05-08 21:39:29 -04:00
|
|
|
import org.bspeice.minimalbible.activities.downloader.manager.BookRefreshTask;
|
|
|
|
import org.bspeice.minimalbible.activities.downloader.manager.DownloadManager;
|
2014-05-25 17:48:39 -04:00
|
|
|
import org.bspeice.minimalbible.activities.downloader.manager.InstalledManager;
|
2014-05-24 22:13:23 -04:00
|
|
|
import org.bspeice.minimalbible.activities.downloader.manager.RefreshManager;
|
2014-05-24 21:12:20 -04:00
|
|
|
import org.crosswire.common.progress.JobManager;
|
2014-05-07 02:06:38 -04:00
|
|
|
|
2014-05-24 22:13:23 -04:00
|
|
|
import java.sql.Ref;
|
|
|
|
|
2014-05-07 02:06:38 -04:00
|
|
|
import javax.inject.Singleton;
|
|
|
|
|
|
|
|
import dagger.Module;
|
|
|
|
import dagger.Provides;
|
2014-05-19 22:52:00 -04:00
|
|
|
import de.devland.esperandro.Esperandro;
|
2014-05-07 02:06:38 -04:00
|
|
|
import de.greenrobot.event.EventBus;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Module mappings for the classes under the Download Activity
|
|
|
|
*/
|
|
|
|
@Module(
|
|
|
|
injects = {
|
|
|
|
BookListFragment.class,
|
2014-05-08 21:39:29 -04:00
|
|
|
DownloadManager.class,
|
2014-05-19 23:20:47 -04:00
|
|
|
BookRefreshTask.class,
|
2014-05-24 21:12:20 -04:00
|
|
|
BookItemHolder.class,
|
|
|
|
BookDownloadManager.class,
|
2014-05-24 22:13:23 -04:00
|
|
|
BookDownloadThread.class,
|
2014-05-25 17:48:39 -04:00
|
|
|
RefreshManager.class,
|
|
|
|
InstalledManager.class
|
2014-05-07 02:06:38 -04:00
|
|
|
}
|
|
|
|
)
|
|
|
|
public class ActivityDownloaderModule {
|
|
|
|
|
|
|
|
@Provides
|
|
|
|
EventBus provideBus() {
|
|
|
|
return new EventBus();
|
|
|
|
}
|
2014-05-08 21:39:29 -04:00
|
|
|
|
2014-05-08 23:47:07 -04:00
|
|
|
@Provides //@Singleton
|
2014-05-19 22:52:00 -04:00
|
|
|
DownloadPrefs provideDownloadPrefs() {
|
|
|
|
return Esperandro.getPreferences(DownloadPrefs.class, MinimalBible.getAppContext());
|
2014-05-08 21:39:29 -04:00
|
|
|
}
|
2014-05-07 02:06:38 -04:00
|
|
|
}
|