]> git.basschouten.com Git - openhab-addons.git/blob
55fe3af1522ae4464d231bd25a8036ff886d5cea
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.kodi.internal;
14
15 import java.util.EventListener;
16 import java.util.List;
17
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.kodi.internal.model.KodiAudioStream;
20 import org.openhab.binding.kodi.internal.model.KodiSubtitle;
21 import org.openhab.binding.kodi.internal.model.KodiSystemProperties;
22 import org.openhab.binding.kodi.internal.protocol.KodiConnection;
23 import org.openhab.core.library.types.RawType;
24
25 /**
26  * Interface which has to be implemented by a class in order to get status
27  * updates from a {@link KodiConnection}
28  *
29  * @author Paul Frank - Initial contribution
30  * @author Christoph Weitkamp - Added channels for opening PVR TV or Radio streams
31  * @author Christoph Weitkamp - Improvements for playing audio notifications
32  */
33 public interface KodiEventListener extends EventListener {
34     public enum KodiState {
35         PLAY,
36         PAUSE,
37         END,
38         STOP,
39         REWIND,
40         FASTFORWARD
41     }
42
43     public enum KodiPlaylistState {
44         ADD,
45         ADDED,
46         INSERT,
47         REMOVE,
48         REMOVED,
49         CLEAR
50     }
51
52     void updateConnectionState(boolean connected);
53
54     void updateScreenSaverState(boolean screenSaveActive);
55
56     void updatePlaylistState(KodiPlaylistState playlistState);
57
58     void updateVolume(int volume);
59
60     void updatePlayerState(KodiState state);
61
62     void updateMuted(boolean muted);
63
64     void updateMediaID(int mediaid);
65
66     void updateUniqueIDDouban(String uniqueid);
67
68     void updateUniqueIDImdb(String uniqueid);
69
70     void updateUniqueIDTmdb(String uniqueid);
71
72     void updateUniqueIDImdbtvshow(String uniqueid);
73
74     void updateUniqueIDTmdbtvshow(String uniqueid);
75
76     void updateUniqueIDTmdbepisode(String uniqueid);
77
78     void updateTitle(String title);
79
80     void updateOriginalTitle(String originaltitle);
81
82     void updateShowTitle(String title);
83
84     void updateAlbum(String album);
85
86     void updateArtistList(List<String> artistList);
87
88     void updateMediaType(String mediaType);
89
90     void updateGenreList(List<String> genreList);
91
92     void updatePVRChannel(String channel);
93
94     void updateThumbnail(@Nullable RawType thumbnail);
95
96     void updateFanart(@Nullable RawType fanart);
97
98     void updateAudioStreamOptions(List<KodiAudioStream> audioStreamList);
99
100     void updateAudioCodec(String codec);
101
102     void updateAudioName(String name);
103
104     void updateAudioIndex(int index);
105
106     void updateAudioChannels(int channels);
107
108     void updateAudioLanguage(String language);
109
110     void updateVideoCodec(String codec);
111
112     void updateVideoIndex(int index);
113
114     void updateVideoWidth(int width);
115
116     void updateVideoHeight(int height);
117
118     void updateSubtitleOptions(List<KodiSubtitle> subtitleList);
119
120     void updateSubtitleEnabled(boolean enabled);
121
122     void updateSubtitleIndex(int index);
123
124     void updateSubtitleName(String name);
125
126     void updateSubtitleLanguage(String language);
127
128     void updateCurrentTime(long currentTime);
129
130     void updateCurrentTimePercentage(double currentTimePercentage);
131
132     void updateDuration(long duration);
133
134     void updateSystemProperties(@Nullable KodiSystemProperties systemProperties);
135
136     void updateEpisode(int episode);
137
138     void updateSeason(int season);
139
140     void updateMediaFile(String mediafile);
141
142     void updateRating(double rating);
143
144     void updateUserRating(double rating);
145
146     void updateMpaa(String mpaa);
147
148     void updateCurrentProfile(String profile);
149 }