GUI.java
Go to the documentation of this file.
00001 /*
00002  *      Copyright (C) 2005-2013 Team XBMC
00003  *      http://xbmc.org
00004  *
00005  *  This Program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2, or (at your option)
00008  *  any later version.
00009  *
00010  *  This Program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with XBMC Remote; see the file license.  If not, write to
00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00018  *  http://www.gnu.org/copyleft/gpl.html
00019  *
00020  */
00021 package org.xbmc.android.jsonrpc.api.call;
00022 
00023 import android.os.Parcel;
00024 import android.os.Parcelable;
00025 import org.codehaus.jackson.JsonNode;
00026 import org.xbmc.android.jsonrpc.api.AbstractCall;
00027 import org.xbmc.android.jsonrpc.api.model.GUIModel;
00028 import org.xbmc.android.jsonrpc.api.model.GlobalModel;
00029 
00030 public final class GUI {
00031 
00039         public static class ActivateWindow extends AbstractCall<String> {
00040                 public final static String API_TYPE = "GUI.ActivateWindow";
00041 
00042                 @Override
00043                 public void writeToParcel(Parcel parcel, int flags) {
00044                         super.writeToParcel(parcel, flags);
00045                         parcel.writeValue(mResult);
00046                 }
00047 
00051                 protected ActivateWindow(Parcel parcel) {
00052                         super(parcel);
00053                 }
00054 
00058                 public static final Parcelable.Creator<ActivateWindow> CREATOR = new Parcelable.Creator<ActivateWindow>() {
00059                         @Override
00060                         public ActivateWindow createFromParcel(Parcel parcel) {
00061                                 return new ActivateWindow(parcel);
00062                         }
00063                         @Override
00064                         public ActivateWindow[] newArray(int n) {
00065                                 return new ActivateWindow[n];
00066                         }
00067                 };
00068 
00074                 public ActivateWindow(String window, String... parameters) {
00075                         super();
00076                         addParameter("window", window);
00077                         addParameter("parameters", parameters);
00078                 }
00079 
00084                 public ActivateWindow(String window) {
00085                         super();
00086                         addParameter("window", window);
00087                 }
00088 
00089                 @Override
00090                 protected String parseOne(JsonNode node) {
00091                         return node.getTextValue();
00092                 }
00093 
00094                 @Override
00095                 public String getName() {
00096                         return API_TYPE;
00097                 }
00098 
00099                 @Override
00100                 protected boolean returnsList() {
00101                         return false;
00102                 }
00103         }
00104 
00112         public static class GetProperties extends AbstractCall<GUIModel.PropertyValue> {
00113                 public final static String API_TYPE = "GUI.GetProperties";
00114 
00115                 @Override
00116                 public void writeToParcel(Parcel parcel, int flags) {
00117                         super.writeToParcel(parcel, flags);
00118                         parcel.writeParcelable(mResult, flags);
00119                 }
00120 
00124                 protected GetProperties(Parcel parcel) {
00125                         super(parcel);
00126                 }
00127 
00131                 public static final Parcelable.Creator<GetProperties> CREATOR = new Parcelable.Creator<GetProperties>() {
00132                         @Override
00133                         public GetProperties createFromParcel(Parcel parcel) {
00134                                 return new GetProperties(parcel);
00135                         }
00136                         @Override
00137                         public GetProperties[] newArray(int n) {
00138                                 return new GetProperties[n];
00139                         }
00140                 };
00141 
00146                 public GetProperties(String... properties) {
00147                         super();
00148                         addParameter("properties", properties);
00149                 }
00150 
00151                 @Override
00152                 protected GUIModel.PropertyValue parseOne(JsonNode node) {
00153                         return new GUIModel.PropertyValue(node);
00154                 }
00155 
00156                 @Override
00157                 public String getName() {
00158                         return API_TYPE;
00159                 }
00160 
00161                 @Override
00162                 protected boolean returnsList() {
00163                         return false;
00164                 }
00165         }
00166 
00174         public static class SetFullscreen extends AbstractCall<Boolean> {
00175                 public final static String API_TYPE = "GUI.SetFullscreen";
00176 
00177                 @Override
00178                 public void writeToParcel(Parcel parcel, int flags) {
00179                         super.writeToParcel(parcel, flags);
00180                         parcel.writeValue(mResult);
00181                 }
00182 
00186                 protected SetFullscreen(Parcel parcel) {
00187                         super(parcel);
00188                 }
00189 
00193                 public static final Parcelable.Creator<SetFullscreen> CREATOR = new Parcelable.Creator<SetFullscreen>() {
00194                         @Override
00195                         public SetFullscreen createFromParcel(Parcel parcel) {
00196                                 return new SetFullscreen(parcel);
00197                         }
00198                         @Override
00199                         public SetFullscreen[] newArray(int n) {
00200                                 return new SetFullscreen[n];
00201                         }
00202                 };
00203 
00208                 public SetFullscreen(GlobalModel.Toggle fullscreen) {
00209                         super();
00210                         addParameter("fullscreen", fullscreen);
00211                 }
00212 
00213                 @Override
00214                 protected Boolean parseOne(JsonNode node) {
00215                         return node.getBooleanValue();
00216                 }
00217 
00218                 @Override
00219                 public String getName() {
00220                         return API_TYPE;
00221                 }
00222 
00223                 @Override
00224                 protected boolean returnsList() {
00225                         return false;
00226                 }
00227         }
00228 
00236         public static class ShowNotification extends AbstractCall<String> {
00237                 public final static String API_TYPE = "GUI.ShowNotification";
00238 
00239                 @Override
00240                 public void writeToParcel(Parcel parcel, int flags) {
00241                         super.writeToParcel(parcel, flags);
00242                         parcel.writeValue(mResult);
00243                 }
00244 
00248                 protected ShowNotification(Parcel parcel) {
00249                         super(parcel);
00250                 }
00251 
00255                 public static final Parcelable.Creator<ShowNotification> CREATOR = new Parcelable.Creator<ShowNotification>() {
00256                         @Override
00257                         public ShowNotification createFromParcel(Parcel parcel) {
00258                                 return new ShowNotification(parcel);
00259                         }
00260                         @Override
00261                         public ShowNotification[] newArray(int n) {
00262                                 return new ShowNotification[n];
00263                         }
00264                 };
00265 
00273                 public ShowNotification(String title, String message, String image, Integer displaytime) {
00274                         super();
00275                         addParameter("title", title);
00276                         addParameter("message", message);
00277                         addParameter("image", image);
00278                         addParameter("displaytime", displaytime);
00279                 }
00280 
00286                 public ShowNotification(String title, String message) {
00287                         super();
00288                         addParameter("title", title);
00289                         addParameter("message", message);
00290                 }
00291 
00298                 public ShowNotification(String title, String message, String image) {
00299                         super();
00300                         addParameter("title", title);
00301                         addParameter("message", message);
00302                         addParameter("image", image);
00303                 }
00304 
00311                 public ShowNotification(String title, String message, Integer displaytime) {
00312                         super();
00313                         addParameter("title", title);
00314                         addParameter("message", message);
00315                         addParameter("displaytime", displaytime);
00316                 }
00317 
00318                 @Override
00319                 protected String parseOne(JsonNode node) {
00320                         return node.getTextValue();
00321                 }
00322 
00323                 @Override
00324                 public String getName() {
00325                         return API_TYPE;
00326                 }
00327 
00328                 @Override
00329                 protected boolean returnsList() {
00330                         return false;
00331                 }
00332         }
00333 }


smarthome_media_kodi_driver
Author(s): Mickael Gaillard , Erwan Le Huitouze
autogenerated on Thu Jun 6 2019 21:03:49