]> git.basschouten.com Git - openhab-addons.git/blob
ae49e5c2ec0a4723a04cb33ce6c27c3b82187b5b
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.model;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 import com.google.gson.annotations.SerializedName;
18
19 /**
20  * Class representing Kodi system properties (https://kodi.wiki/view/JSON-RPC_API/v9#System.Property.Value)
21  *
22  * @author Christoph Weitkamp - Initial contribution
23  */
24 @NonNullByDefault
25 public class KodiSystemProperties {
26     @SerializedName("canhibernate")
27     private boolean canHibernate;
28     @SerializedName("canreboot")
29     private boolean canReboot;
30     @SerializedName("cansuspend")
31     private boolean canSuspend;
32     @SerializedName("canshutdown")
33     private boolean canShutdown;
34
35     public boolean canHibernate() {
36         return canHibernate;
37     }
38
39     public void setCanHibernate(boolean canHibernate) {
40         this.canHibernate = canHibernate;
41     }
42
43     public boolean canReboot() {
44         return canReboot;
45     }
46
47     public void setCanReboot(boolean canReboot) {
48         this.canReboot = canReboot;
49     }
50
51     public boolean canSuspend() {
52         return canSuspend;
53     }
54
55     public void setCansuspend(boolean canSuspend) {
56         this.canSuspend = canSuspend;
57     }
58
59     public boolean canShutdown() {
60         return canShutdown;
61     }
62
63     public void setCanShutdown(boolean canShutdown) {
64         this.canShutdown = canShutdown;
65     }
66
67     public boolean canQuit() {
68         return !canHibernate && !canReboot && !canShutdown && !canSuspend;
69     }
70 }