]> git.basschouten.com Git - openhab-addons.git/blob
41cac54803bfe48ddb77a25025ccd2e7e5a6cbf8
[openhab-addons.git] /
1 /**
2  * Copyright 2017-2018 Gregory Moyer and contributors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openhab.binding.lametrictime.api.model;
17
18 import org.openhab.binding.lametrictime.api.local.model.UpdateAction;
19
20 public class RadioApp extends CoreApplication
21 {
22     private static final String NAME = "com.lametric.radio";
23
24     private static final String ACTION_NEXT = "radio.next";
25     private static final String ACTION_PLAY = "radio.play";
26     private static final String ACTION_PREV = "radio.prev";
27     private static final String ACTION_STOP = "radio.stop";
28
29     public RadioApp()
30     {
31         super(NAME);
32     }
33
34     public CoreAction next()
35     {
36         return new CoreAction(this, new UpdateAction().withId(ACTION_NEXT));
37     }
38
39     public CoreAction play()
40     {
41         return new CoreAction(this, new UpdateAction().withId(ACTION_PLAY));
42     }
43
44     public CoreAction previous()
45     {
46         return new CoreAction(this, new UpdateAction().withId(ACTION_PREV));
47     }
48
49     public CoreAction stop()
50     {
51         return new CoreAction(this, new UpdateAction().withId(ACTION_STOP));
52     }
53 }