]> git.basschouten.com Git - openhab-addons.git/blob
91c7e898516bc02efc91c9e92a422ecf92321e93
[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.local;
17
18 import java.util.List;
19 import java.util.SortedMap;
20
21 import javax.ws.rs.client.ClientBuilder;
22
23 import org.openhab.binding.lametrictime.api.local.impl.LaMetricTimeLocalImpl;
24 import org.openhab.binding.lametrictime.api.local.model.Api;
25 import org.openhab.binding.lametrictime.api.local.model.Application;
26 import org.openhab.binding.lametrictime.api.local.model.Audio;
27 import org.openhab.binding.lametrictime.api.local.model.Bluetooth;
28 import org.openhab.binding.lametrictime.api.local.model.Device;
29 import org.openhab.binding.lametrictime.api.local.model.Display;
30 import org.openhab.binding.lametrictime.api.local.model.Notification;
31 import org.openhab.binding.lametrictime.api.local.model.UpdateAction;
32 import org.openhab.binding.lametrictime.api.local.model.WidgetUpdates;
33 import org.openhab.binding.lametrictime.api.local.model.Wifi;
34
35 public interface LaMetricTimeLocal
36 {
37     public Api getApi();
38
39     public Device getDevice();
40
41     public String createNotification(Notification notification) throws NotificationCreationException;
42
43     public List<Notification> getNotifications();
44
45     public Notification getCurrentNotification();
46
47     public Notification getNotification(String id) throws NotificationNotFoundException;
48
49     public void deleteNotification(String id) throws NotificationNotFoundException;
50
51     public Display getDisplay();
52
53     public Display updateDisplay(Display display) throws UpdateException;
54
55     public Audio getAudio();
56
57     public Audio updateAudio(Audio audio) throws UpdateException;
58
59     public Bluetooth getBluetooth();
60
61     public Bluetooth updateBluetooth(Bluetooth bluetooth) throws UpdateException;
62
63     public Wifi getWifi();
64
65     public void updateApplication(String packageName,
66                                   String accessToken,
67                                   WidgetUpdates widgetUpdates) throws UpdateException;
68
69     public SortedMap<String, Application> getApplications();
70
71     public Application getApplication(String packageName) throws ApplicationNotFoundException;
72
73     public void activatePreviousApplication();
74
75     public void activateNextApplication();
76
77     public void activateApplication(String packageName,
78                                     String widgetId) throws ApplicationActivationException;
79
80     public void doAction(String packageName,
81                          String widgetId,
82                          UpdateAction action) throws ApplicationActionException;
83
84     public static LaMetricTimeLocal create(LocalConfiguration config)
85     {
86         return new LaMetricTimeLocalImpl(config);
87     }
88
89     public static LaMetricTimeLocal create(LocalConfiguration config, ClientBuilder clientBuilder)
90     {
91         return new LaMetricTimeLocalImpl(config, clientBuilder);
92     }
93 }