summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/tasks/CreateTimerTask.java19
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/tasks/DeleteTimerTask.java3
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/tasks/ModifyTimerTask.java23
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/tasks/ToggleTimerTask.java3
4 files changed, 46 insertions, 2 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/tasks/CreateTimerTask.java b/vdrmanager/src/de/bjusystems/vdrmanager/tasks/CreateTimerTask.java
new file mode 100644
index 0000000..f9ab94b
--- /dev/null
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/tasks/CreateTimerTask.java
@@ -0,0 +1,19 @@
+package de.bjusystems.vdrmanager.tasks;
+
+import android.app.Activity;
+import de.bjusystems.vdrmanager.R;
+import de.bjusystems.vdrmanager.data.Timer;
+import de.bjusystems.vdrmanager.utils.svdrp.SetTimerClient;
+import de.bjusystems.vdrmanager.utils.svdrp.SetTimerClient.TimerOperation;
+
+public abstract class CreateTimerTask extends AsyncProgressTask<Timer> {
+
+ public CreateTimerTask(final Activity activity, final Timer timer) {
+ super(activity, new SetTimerClient(timer, TimerOperation.CREATE) {
+ @Override
+ public int getProgressTextId() {
+ return R.string.progress_timer_save;
+ }
+ });
+ }
+}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/tasks/DeleteTimerTask.java b/vdrmanager/src/de/bjusystems/vdrmanager/tasks/DeleteTimerTask.java
index 48cdd23..f4ea149 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/tasks/DeleteTimerTask.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/tasks/DeleteTimerTask.java
@@ -4,11 +4,12 @@ import android.app.Activity;
import de.bjusystems.vdrmanager.R;
import de.bjusystems.vdrmanager.data.Timer;
import de.bjusystems.vdrmanager.utils.svdrp.SetTimerClient;
+import de.bjusystems.vdrmanager.utils.svdrp.SetTimerClient.TimerOperation;
public abstract class DeleteTimerTask extends AsyncProgressTask<Timer> {
public DeleteTimerTask(final Activity activity, final Timer timer) {
- super(activity, new SetTimerClient(timer, true) {
+ super(activity, new SetTimerClient(timer, TimerOperation.DELETE) {
@Override
public int getProgressTextId() {
return R.string.progress_timer_delete;
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/tasks/ModifyTimerTask.java b/vdrmanager/src/de/bjusystems/vdrmanager/tasks/ModifyTimerTask.java
new file mode 100644
index 0000000..57fba6e
--- /dev/null
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/tasks/ModifyTimerTask.java
@@ -0,0 +1,23 @@
+package de.bjusystems.vdrmanager.tasks;
+
+import android.app.Activity;
+import de.bjusystems.vdrmanager.R;
+import de.bjusystems.vdrmanager.data.Timer;
+import de.bjusystems.vdrmanager.utils.svdrp.SetTimerClient;
+import de.bjusystems.vdrmanager.utils.svdrp.SetTimerClient.TimerOperation;
+
+public abstract class ModifyTimerTask extends AsyncProgressTask<Timer> {
+
+ public ModifyTimerTask(final Activity activity, final Timer timer) {
+ super(activity, new SetTimerClient(timer, TimerOperation.MODIFY) {
+ @Override
+ public int getProgressTextId() {
+ return R.string.progress_timer_modify;
+ }
+
+
+ });
+
+
+ }
+}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/tasks/ToggleTimerTask.java b/vdrmanager/src/de/bjusystems/vdrmanager/tasks/ToggleTimerTask.java
index ee146e5..a3b5d6a 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/tasks/ToggleTimerTask.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/tasks/ToggleTimerTask.java
@@ -4,11 +4,12 @@ import android.app.Activity;
import de.bjusystems.vdrmanager.R;
import de.bjusystems.vdrmanager.data.Timer;
import de.bjusystems.vdrmanager.utils.svdrp.SetTimerClient;
+import de.bjusystems.vdrmanager.utils.svdrp.SetTimerClient.TimerOperation;
public abstract class ToggleTimerTask extends AsyncProgressTask<Timer> {
public ToggleTimerTask(final Activity activity, final Timer timer) {
- super(activity, new SetTimerClient(timer, false) {
+ super(activity, new SetTimerClient(timer, TimerOperation.MODIFY) {
boolean enabled = timer.isEnabled();
@Override