2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.pulseaudio.internal.items;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * GenericAudioItems are any kind of items that deal with audio data and can be
20 * muted or their volume can be changed.
22 * @author Tobias Bräutigam - Initial contribution
25 public abstract class AbstractAudioDeviceConfig extends AbstractDeviceConfig {
35 protected @Nullable State state;
36 protected boolean muted;
38 protected @Nullable Module module;
40 public AbstractAudioDeviceConfig(int id, String name, @Nullable Module module) {
45 public @Nullable Module getModule() {
49 public @Nullable State getState() {
53 public void setState(State state) {
57 public boolean isMuted() {
61 public void setMuted(boolean muted) {
65 public int getVolume() {
69 public void setVolume(int volume) {
74 public String toString() {
75 return this.getClass().getSimpleName() + " #" + id + " (Module: " + module + ") " + name + ", muted: " + muted
76 + ", state: " + state + ", volume: " + volume;