
org.tinymediamanager.jsonrpc.api.call.Application Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kodi-json-rpc Show documentation
Show all versions of kodi-json-rpc Show documentation
This library is the result of freezy's Kodi JSON introspection, merged with dereulenspiegel's adoption
without android, and patched to Kodi 16 Jarvis.
The newest version!
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XBMC Remote; see the file license. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
* http://www.gnu.org/copyleft/gpl.html
*
*/
package org.tinymediamanager.jsonrpc.api.call;
import org.codehaus.jackson.JsonNode;
import org.tinymediamanager.jsonrpc.api.AbstractCall;
import org.tinymediamanager.jsonrpc.api.model.ApplicationModel;
import org.tinymediamanager.jsonrpc.api.model.GlobalModel;
public final class Application {
/**
* Retrieves the values of the given properties.
*
* This class represents the API method Application.GetProperties
*
* This class was generated automatically from XBMC's JSON-RPC introspect.
*/
public static class GetProperties extends AbstractCall {
public final static String API_TYPE = "Application.GetProperties";
/**
* Retrieves the values of the given properties.
*
* @param properties
* One or more of: volume, muted, name, version. See constants at
* {@link ApplicationModel.PropertyName}.
*/
public GetProperties(String... properties) {
super();
addParameter("properties", properties);
}
@Override
protected ApplicationModel.PropertyValue parseOne(JsonNode node) {
return new ApplicationModel.PropertyValue(node);
}
@Override
public String getName() {
return API_TYPE;
}
@Override
protected boolean returnsList() {
return false;
}
}
/**
* Quit application.
*
* This class represents the API method Application.Quit
*
* This class was generated automatically from XBMC's JSON-RPC introspect.
*/
public static class Quit extends AbstractCall {
public final static String API_TYPE = "Application.Quit";
/**
* Quit application.
*/
public Quit() {
super();
}
@Override
protected String parseOne(JsonNode node) {
return node.getTextValue();
}
@Override
public String getName() {
return API_TYPE;
}
@Override
protected boolean returnsList() {
return false;
}
}
/**
* Toggle mute/unmute.
*
* This class represents the API method Application.SetMute
*
* This class was generated automatically from XBMC's JSON-RPC introspect.
*/
public static class SetMute extends AbstractCall {
public final static String API_TYPE = "Application.SetMute";
/**
* Toggle mute/unmute.
*
* @param mute
*/
public SetMute(GlobalModel.Toggle mute) {
super();
addParameter("mute", mute);
}
@Override
protected Boolean parseOne(JsonNode node) {
return node.getBooleanValue();
}
@Override
public String getName() {
return API_TYPE;
}
@Override
protected boolean returnsList() {
return false;
}
}
/**
* Set the current volume.
*
* This class represents the API method Application.SetVolume
*
* This class was generated automatically from XBMC's JSON-RPC introspect.
*/
public static class SetVolume extends AbstractCall {
public final static String API_TYPE = "Application.SetVolume";
/**
* Set the current volume.
*
* @param volume
*/
public SetVolume(Integer volume) {
super();
addParameter("volume", volume);
}
/**
* Set the current volume.
*
* @param volume
* One of: increment, decrement. See constants at {@link GlobalModel.IncrementDecrement}.
*/
public SetVolume(String volume) {
super();
addParameter("volume", volume);
}
@Override
protected Integer parseOne(JsonNode node) {
return node.getIntValue();
}
@Override
public String getName() {
return API_TYPE;
}
@Override
protected boolean returnsList() {
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy