1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.fourthline.cling.support.avtransport.callback;
17
18 import org.fourthline.cling.controlpoint.ActionCallback;
19 import org.fourthline.cling.model.action.ActionInvocation;
20 import org.fourthline.cling.model.meta.Service;
21 import org.fourthline.cling.model.types.UnsignedIntegerFourBytes;
22
23 import java.util.logging.Logger;
24
25
26
27
28
29 public abstract class Play extends ActionCallback {
30
31 private static Logger log = Logger.getLogger(Play.class.getName());
32
33 public Play(Service service) {
34 this(new UnsignedIntegerFourBytes(0), service, "1");
35 }
36
37 public Play(Service service, String speed) {
38 this(new UnsignedIntegerFourBytes(0), service, speed);
39 }
40
41 public Play(UnsignedIntegerFourBytes instanceId, Service service) {
42 this(instanceId, service, "1");
43 }
44
45 public Play(UnsignedIntegerFourBytes instanceId, Service service, String speed) {
46 super(new ActionInvocation(service.getAction("Play")));
47 getActionInvocation().setInput("InstanceID", instanceId);
48 getActionInvocation().setInput("Speed", speed);
49 }
50
51 @Override
52 public void success(ActionInvocation invocation) {
53 log.fine("Execution successful");
54 }
55 }