]> git.basschouten.com Git - openhab-addons.git/blob
6b3a7b32038582121e698988f26bb5eeb66140c9
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.yamahareceiver.internal.protocol;
14
15 import java.io.IOException;
16
17 import org.openhab.binding.yamahareceiver.internal.state.ZoneControlState;
18
19 /**
20  * The zone control protocol interface
21  *
22  * @author David Graeff - Initial contribution
23  */
24 public interface ZoneControl extends IStateUpdatable {
25     /**
26      * Switches the zone on/off (off equals network standby here).
27      *
28      * @param on The new power state
29      *
30      * @throws IOException
31      * @throws ReceivedMessageParseException
32      */
33     void setPower(boolean on) throws IOException, ReceivedMessageParseException;
34
35     /**
36      * Sets the absolute volume in decibel.
37      *
38      * @param volume Absolute value in decibel ([-80,+12]).
39      * @throws IOException
40      */
41     void setVolumeDB(float volume) throws IOException, ReceivedMessageParseException;
42
43     /**
44      * Sets the volume in percent
45      *
46      * @param volume
47      * @throws IOException
48      */
49     void setVolume(float volume) throws IOException, ReceivedMessageParseException;
50
51     /**
52      * Increase or decrease the volume by the given percentage.
53      *
54      * @param percent
55      * @throws IOException
56      */
57     void setVolumeRelative(ZoneControlState state, float percent) throws IOException, ReceivedMessageParseException;
58
59     void setMute(boolean mute) throws IOException, ReceivedMessageParseException;
60
61     void setInput(String name) throws IOException, ReceivedMessageParseException;
62
63     void setSurroundProgram(String name) throws IOException, ReceivedMessageParseException;
64
65     void setDialogueLevel(int level) throws IOException, ReceivedMessageParseException;
66
67     /**
68      * Sets the active scene for the zone.
69      *
70      * @param scene
71      * @throws IOException
72      * @throws ReceivedMessageParseException
73      */
74     void setScene(String scene) throws IOException, ReceivedMessageParseException;
75 }