mirror of https://github.com/tasks/tasks
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.2 KiB
Kotlin
48 lines
1.2 KiB
Kotlin
package org.tasks.jobs
|
|
|
|
import android.net.Uri
|
|
import com.todoroo.andlib.utility.DateUtilities.now
|
|
import com.todoroo.astrid.data.Task
|
|
import org.tasks.BuildConfig
|
|
import org.tasks.data.CaldavAccount
|
|
import org.tasks.data.Place
|
|
|
|
interface WorkManager {
|
|
|
|
fun updateCalendar(task: Task)
|
|
|
|
fun migrateLocalTasks(caldavAccount: CaldavAccount)
|
|
|
|
suspend fun sync(immediate: Boolean)
|
|
|
|
suspend fun startEnqueuedSync()
|
|
|
|
fun reverseGeocode(place: Place)
|
|
|
|
fun updateBackgroundSync()
|
|
|
|
suspend fun scheduleRefresh(timestamp: Long = now() + 5_000)
|
|
|
|
fun scheduleNotification(scheduledTime: Long)
|
|
|
|
fun scheduleBackup()
|
|
|
|
fun scheduleConfigRefresh()
|
|
|
|
fun scheduleDriveUpload(uri: Uri, purge: Boolean)
|
|
|
|
fun cancelNotifications()
|
|
|
|
fun updatePurchases()
|
|
|
|
companion object {
|
|
val REMOTE_CONFIG_INTERVAL_HOURS = if (BuildConfig.DEBUG) 1 else 12.toLong()
|
|
const val TAG_BACKUP = "tag_backup"
|
|
const val TAG_REFRESH = "tag_refresh"
|
|
const val TAG_SYNC = "tag_sync"
|
|
const val TAG_BACKGROUND_SYNC = "tag_background_sync"
|
|
const val TAG_REMOTE_CONFIG = "tag_remote_config"
|
|
const val TAG_MIGRATE_LOCAL = "tag_migrate_local"
|
|
const val TAG_UPDATE_PURCHASES = "tag_update_purchases"
|
|
}
|
|
} |