00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 package org.xbmc.android.jsonrpc.api.call;
00022
00023 import android.os.Parcel;
00024 import android.os.Parcelable;
00025 import java.util.ArrayList;
00026 import org.codehaus.jackson.JsonNode;
00027 import org.codehaus.jackson.node.ArrayNode;
00028 import org.codehaus.jackson.node.ObjectNode;
00029 import org.xbmc.android.jsonrpc.api.AbstractCall;
00030 import org.xbmc.android.jsonrpc.api.AbstractModel;
00031 import org.xbmc.android.jsonrpc.api.model.AudioModel;
00032 import org.xbmc.android.jsonrpc.api.model.LibraryModel;
00033 import org.xbmc.android.jsonrpc.api.model.ListModel;
00034
00035 public final class AudioLibrary {
00036
00044 public static class Clean extends AbstractCall<String> {
00045 public final static String API_TYPE = "AudioLibrary.Clean";
00046
00047 @Override
00048 public void writeToParcel(Parcel parcel, int flags) {
00049 super.writeToParcel(parcel, flags);
00050 parcel.writeValue(mResult);
00051 }
00052
00056 protected Clean(Parcel parcel) {
00057 super(parcel);
00058 }
00059
00063 public static final Parcelable.Creator<Clean> CREATOR = new Parcelable.Creator<Clean>() {
00064 @Override
00065 public Clean createFromParcel(Parcel parcel) {
00066 return new Clean(parcel);
00067 }
00068 @Override
00069 public Clean[] newArray(int n) {
00070 return new Clean[n];
00071 }
00072 };
00073
00077 public Clean() {
00078 super();
00079 }
00080
00081 @Override
00082 protected String parseOne(JsonNode node) {
00083 return node.getTextValue();
00084 }
00085
00086 @Override
00087 public String getName() {
00088 return API_TYPE;
00089 }
00090
00091 @Override
00092 protected boolean returnsList() {
00093 return false;
00094 }
00095 }
00096
00104 public static class Export extends AbstractCall<String> {
00105 public final static String API_TYPE = "AudioLibrary.Export";
00106
00107 @Override
00108 public void writeToParcel(Parcel parcel, int flags) {
00109 super.writeToParcel(parcel, flags);
00110 parcel.writeValue(mResult);
00111 }
00112
00116 protected Export(Parcel parcel) {
00117 super(parcel);
00118 }
00119
00123 public static final Parcelable.Creator<Export> CREATOR = new Parcelable.Creator<Export>() {
00124 @Override
00125 public Export createFromParcel(Parcel parcel) {
00126 return new Export(parcel);
00127 }
00128 @Override
00129 public Export[] newArray(int n) {
00130 return new Export[n];
00131 }
00132 };
00133
00138 public Export(OptionsPath options) {
00139 super();
00140 addParameter("options", options);
00141 }
00142
00147 public Export(OptionsImagesOverwrite options) {
00148 super();
00149 addParameter("options", options);
00150 }
00151
00152 @Override
00153 protected String parseOne(JsonNode node) {
00154 return node.getTextValue();
00155 }
00156
00157 @Override
00158 public String getName() {
00159 return API_TYPE;
00160 }
00161
00162 @Override
00163 protected boolean returnsList() {
00164 return false;
00165 }
00166
00171 public static class OptionsPath extends AbstractModel {
00172
00173
00174 public static final String PATH = "path";
00175
00176
00177 public final String path;
00178
00182 public OptionsPath(String path) {
00183 this.path = path;
00184 }
00185
00186 @Override
00187 public JsonNode toJsonNode() {
00188 final ObjectNode node = OM.createObjectNode();
00189 node.put(PATH, path);
00190 return node;
00191 }
00192
00198 @Override
00199 public void writeToParcel(Parcel parcel, int flags) {
00200 parcel.writeValue(path);
00201 }
00202
00206 protected OptionsPath(Parcel parcel) {
00207 path = parcel.readString();
00208 }
00209
00213 public static final Parcelable.Creator<OptionsPath> CREATOR = new Parcelable.Creator<OptionsPath>() {
00214 @Override
00215 public OptionsPath createFromParcel(Parcel parcel) {
00216 return new OptionsPath(parcel);
00217 }
00218 @Override
00219 public OptionsPath[] newArray(int n) {
00220 return new OptionsPath[n];
00221 }
00222 };
00223
00224 @Override
00225 public int describeContents() {
00226 return 0;
00227 }
00228 }
00229
00234 public static class OptionsImagesOverwrite extends AbstractModel {
00235
00236
00237 public static final String IMAGES = "images";
00238 public static final String OVERWRITE = "overwrite";
00239
00240
00241 public final Boolean images;
00242 public final Boolean overwrite;
00243
00248 public OptionsImagesOverwrite(Boolean images, Boolean overwrite) {
00249 this.images = images;
00250 this.overwrite = overwrite;
00251 }
00252
00253 @Override
00254 public JsonNode toJsonNode() {
00255 final ObjectNode node = OM.createObjectNode();
00256 node.put(IMAGES, images);
00257 node.put(OVERWRITE, overwrite);
00258 return node;
00259 }
00260
00266 @Override
00267 public void writeToParcel(Parcel parcel, int flags) {
00268 parcel.writeInt(images ? 1 : 0);
00269 parcel.writeInt(overwrite ? 1 : 0);
00270 }
00271
00275 protected OptionsImagesOverwrite(Parcel parcel) {
00276 images = parcel.readInt() == 1;
00277 overwrite = parcel.readInt() == 1;
00278 }
00279
00283 public static final Parcelable.Creator<OptionsImagesOverwrite> CREATOR = new Parcelable.Creator<OptionsImagesOverwrite>() {
00284 @Override
00285 public OptionsImagesOverwrite createFromParcel(Parcel parcel) {
00286 return new OptionsImagesOverwrite(parcel);
00287 }
00288 @Override
00289 public OptionsImagesOverwrite[] newArray(int n) {
00290 return new OptionsImagesOverwrite[n];
00291 }
00292 };
00293
00294 @Override
00295 public int describeContents() {
00296 return 0;
00297 }
00298 }
00299 }
00300
00308 public static class GetAlbumDetails extends AbstractCall<AudioModel.AlbumDetail> {
00309 public final static String API_TYPE = "AudioLibrary.GetAlbumDetails";
00310
00311 @Override
00312 public void writeToParcel(Parcel parcel, int flags) {
00313 super.writeToParcel(parcel, flags);
00314 parcel.writeParcelable(mResult, flags);
00315 }
00316
00320 protected GetAlbumDetails(Parcel parcel) {
00321 super(parcel);
00322 }
00323
00327 public static final Parcelable.Creator<GetAlbumDetails> CREATOR = new Parcelable.Creator<GetAlbumDetails>() {
00328 @Override
00329 public GetAlbumDetails createFromParcel(Parcel parcel) {
00330 return new GetAlbumDetails(parcel);
00331 }
00332 @Override
00333 public GetAlbumDetails[] newArray(int n) {
00334 return new GetAlbumDetails[n];
00335 }
00336 };
00337 public final static String RESULT = "albumdetails";
00338
00344 public GetAlbumDetails(Integer albumid, String... properties) {
00345 super();
00346 addParameter("albumid", albumid);
00347 addParameter("properties", properties);
00348 }
00349
00350 @Override
00351 protected AudioModel.AlbumDetail parseOne(JsonNode node) {
00352 return new AudioModel.AlbumDetail((ObjectNode)node.get(RESULT));
00353 }
00354
00355 @Override
00356 public String getName() {
00357 return API_TYPE;
00358 }
00359
00360 @Override
00361 protected boolean returnsList() {
00362 return false;
00363 }
00364 }
00365
00373 public static class GetAlbums extends AbstractCall<AudioModel.AlbumDetail> {
00374 public final static String API_TYPE = "AudioLibrary.GetAlbums";
00375
00376 @Override
00377 public void writeToParcel(Parcel parcel, int flags) {
00378 super.writeToParcel(parcel, flags);
00379 parcel.writeParcelable(mResult, flags);
00380 }
00381
00385 protected GetAlbums(Parcel parcel) {
00386 super(parcel);
00387 }
00388
00392 public static final Parcelable.Creator<GetAlbums> CREATOR = new Parcelable.Creator<GetAlbums>() {
00393 @Override
00394 public GetAlbums createFromParcel(Parcel parcel) {
00395 return new GetAlbums(parcel);
00396 }
00397 @Override
00398 public GetAlbums[] newArray(int n) {
00399 return new GetAlbums[n];
00400 }
00401 };
00402 public final static String RESULT = "albums";
00403
00411 public GetAlbums(ListModel.Limits limits, ListModel.Sort sort, FilterGenreId filter, String... properties) {
00412 super();
00413 addParameter("limits", limits);
00414 addParameter("sort", sort);
00415 addParameter("filter", filter);
00416 addParameter("properties", properties);
00417 }
00418
00426 public GetAlbums(ListModel.Limits limits, ListModel.Sort sort, FilterGenre filter, String... properties) {
00427 super();
00428 addParameter("limits", limits);
00429 addParameter("sort", sort);
00430 addParameter("filter", filter);
00431 addParameter("properties", properties);
00432 }
00433
00441 public GetAlbums(ListModel.Limits limits, ListModel.Sort sort, FilterArtistId filter, String... properties) {
00442 super();
00443 addParameter("limits", limits);
00444 addParameter("sort", sort);
00445 addParameter("filter", filter);
00446 addParameter("properties", properties);
00447 }
00448
00456 public GetAlbums(ListModel.Limits limits, ListModel.Sort sort, FilterArtist filter, String... properties) {
00457 super();
00458 addParameter("limits", limits);
00459 addParameter("sort", sort);
00460 addParameter("filter", filter);
00461 addParameter("properties", properties);
00462 }
00463
00471 public GetAlbums(ListModel.Limits limits, ListModel.Sort sort, ListModel.AlbumFilter filter, String... properties) {
00472 super();
00473 addParameter("limits", limits);
00474 addParameter("sort", sort);
00475 addParameter("filter", filter);
00476 addParameter("properties", properties);
00477 }
00478
00483 public GetAlbums(String... properties) {
00484 super();
00485 addParameter("properties", properties);
00486 }
00487
00493 public GetAlbums(ListModel.Limits limits, String... properties) {
00494 super();
00495 addParameter("limits", limits);
00496 addParameter("properties", properties);
00497 }
00498
00504 public GetAlbums(ListModel.Sort sort, String... properties) {
00505 super();
00506 addParameter("sort", sort);
00507 addParameter("properties", properties);
00508 }
00509
00516 public GetAlbums(ListModel.Limits limits, ListModel.Sort sort, String... properties) {
00517 super();
00518 addParameter("limits", limits);
00519 addParameter("sort", sort);
00520 addParameter("properties", properties);
00521 }
00522
00528 public GetAlbums(FilterGenreId filter, String... properties) {
00529 super();
00530 addParameter("filter", filter);
00531 addParameter("properties", properties);
00532 }
00533
00540 public GetAlbums(ListModel.Limits limits, FilterGenreId filter, String... properties) {
00541 super();
00542 addParameter("limits", limits);
00543 addParameter("filter", filter);
00544 addParameter("properties", properties);
00545 }
00546
00552 public GetAlbums(FilterGenre filter, String... properties) {
00553 super();
00554 addParameter("filter", filter);
00555 addParameter("properties", properties);
00556 }
00557
00564 public GetAlbums(ListModel.Limits limits, FilterGenre filter, String... properties) {
00565 super();
00566 addParameter("limits", limits);
00567 addParameter("filter", filter);
00568 addParameter("properties", properties);
00569 }
00570
00576 public GetAlbums(FilterArtistId filter, String... properties) {
00577 super();
00578 addParameter("filter", filter);
00579 addParameter("properties", properties);
00580 }
00581
00588 public GetAlbums(ListModel.Limits limits, FilterArtistId filter, String... properties) {
00589 super();
00590 addParameter("limits", limits);
00591 addParameter("filter", filter);
00592 addParameter("properties", properties);
00593 }
00594
00600 public GetAlbums(FilterArtist filter, String... properties) {
00601 super();
00602 addParameter("filter", filter);
00603 addParameter("properties", properties);
00604 }
00605
00612 public GetAlbums(ListModel.Limits limits, FilterArtist filter, String... properties) {
00613 super();
00614 addParameter("limits", limits);
00615 addParameter("filter", filter);
00616 addParameter("properties", properties);
00617 }
00618
00624 public GetAlbums(ListModel.AlbumFilter filter, String... properties) {
00625 super();
00626 addParameter("filter", filter);
00627 addParameter("properties", properties);
00628 }
00629
00636 public GetAlbums(ListModel.Limits limits, ListModel.AlbumFilter filter, String... properties) {
00637 super();
00638 addParameter("limits", limits);
00639 addParameter("filter", filter);
00640 addParameter("properties", properties);
00641 }
00642
00643 @Override
00644 protected ArrayList<AudioModel.AlbumDetail> parseMany(JsonNode node) {
00645 final ArrayNode albums = parseResults(node, RESULT);
00646 if (albums != null) {
00647 final ArrayList<AudioModel.AlbumDetail> ret = new ArrayList<AudioModel.AlbumDetail>(albums.size());
00648 for (int i = 0; i < albums.size(); i++) {
00649 final ObjectNode item = (ObjectNode)albums.get(i);
00650 ret.add(new AudioModel.AlbumDetail(item));
00651 }
00652 return ret;
00653 } else {
00654 return new ArrayList<AudioModel.AlbumDetail>(0);
00655 }
00656 }
00657
00658 @Override
00659 public String getName() {
00660 return API_TYPE;
00661 }
00662
00663 @Override
00664 protected boolean returnsList() {
00665 return true;
00666 }
00667
00672 public static class FilterGenreId extends AbstractModel {
00673
00674
00675 public static final String GENREID = "genreid";
00676
00677
00678 public final Integer genreid;
00679
00683 public FilterGenreId(Integer genreid) {
00684 this.genreid = genreid;
00685 }
00686
00687 @Override
00688 public JsonNode toJsonNode() {
00689 final ObjectNode node = OM.createObjectNode();
00690 node.put(GENREID, genreid);
00691 return node;
00692 }
00693
00699 @Override
00700 public void writeToParcel(Parcel parcel, int flags) {
00701 parcel.writeValue(genreid);
00702 }
00703
00707 protected FilterGenreId(Parcel parcel) {
00708 genreid = parcel.readInt();
00709 }
00710
00714 public static final Parcelable.Creator<FilterGenreId> CREATOR = new Parcelable.Creator<FilterGenreId>() {
00715 @Override
00716 public FilterGenreId createFromParcel(Parcel parcel) {
00717 return new FilterGenreId(parcel);
00718 }
00719 @Override
00720 public FilterGenreId[] newArray(int n) {
00721 return new FilterGenreId[n];
00722 }
00723 };
00724
00725 @Override
00726 public int describeContents() {
00727 return 0;
00728 }
00729 }
00730
00735 public static class FilterGenre extends AbstractModel {
00736
00737
00738 public static final String GENRE = "genre";
00739
00740
00741 public final String genre;
00742
00746 public FilterGenre(String genre) {
00747 this.genre = genre;
00748 }
00749
00750 @Override
00751 public JsonNode toJsonNode() {
00752 final ObjectNode node = OM.createObjectNode();
00753 node.put(GENRE, genre);
00754 return node;
00755 }
00756
00762 @Override
00763 public void writeToParcel(Parcel parcel, int flags) {
00764 parcel.writeValue(genre);
00765 }
00766
00770 protected FilterGenre(Parcel parcel) {
00771 genre = parcel.readString();
00772 }
00773
00777 public static final Parcelable.Creator<FilterGenre> CREATOR = new Parcelable.Creator<FilterGenre>() {
00778 @Override
00779 public FilterGenre createFromParcel(Parcel parcel) {
00780 return new FilterGenre(parcel);
00781 }
00782 @Override
00783 public FilterGenre[] newArray(int n) {
00784 return new FilterGenre[n];
00785 }
00786 };
00787
00788 @Override
00789 public int describeContents() {
00790 return 0;
00791 }
00792 }
00793
00798 public static class FilterArtistId extends AbstractModel {
00799
00800
00801 public static final String ARTISTID = "artistid";
00802
00803
00804 public final Integer artistid;
00805
00809 public FilterArtistId(Integer artistid) {
00810 this.artistid = artistid;
00811 }
00812
00813 @Override
00814 public JsonNode toJsonNode() {
00815 final ObjectNode node = OM.createObjectNode();
00816 node.put(ARTISTID, artistid);
00817 return node;
00818 }
00819
00825 @Override
00826 public void writeToParcel(Parcel parcel, int flags) {
00827 parcel.writeValue(artistid);
00828 }
00829
00833 protected FilterArtistId(Parcel parcel) {
00834 artistid = parcel.readInt();
00835 }
00836
00840 public static final Parcelable.Creator<FilterArtistId> CREATOR = new Parcelable.Creator<FilterArtistId>() {
00841 @Override
00842 public FilterArtistId createFromParcel(Parcel parcel) {
00843 return new FilterArtistId(parcel);
00844 }
00845 @Override
00846 public FilterArtistId[] newArray(int n) {
00847 return new FilterArtistId[n];
00848 }
00849 };
00850
00851 @Override
00852 public int describeContents() {
00853 return 0;
00854 }
00855 }
00856
00861 public static class FilterArtist extends AbstractModel {
00862
00863
00864 public static final String ARTIST = "artist";
00865
00866
00867 public final String artist;
00868
00872 public FilterArtist(String artist) {
00873 this.artist = artist;
00874 }
00875
00876 @Override
00877 public JsonNode toJsonNode() {
00878 final ObjectNode node = OM.createObjectNode();
00879 node.put(ARTIST, artist);
00880 return node;
00881 }
00882
00888 @Override
00889 public void writeToParcel(Parcel parcel, int flags) {
00890 parcel.writeValue(artist);
00891 }
00892
00896 protected FilterArtist(Parcel parcel) {
00897 artist = parcel.readString();
00898 }
00899
00903 public static final Parcelable.Creator<FilterArtist> CREATOR = new Parcelable.Creator<FilterArtist>() {
00904 @Override
00905 public FilterArtist createFromParcel(Parcel parcel) {
00906 return new FilterArtist(parcel);
00907 }
00908 @Override
00909 public FilterArtist[] newArray(int n) {
00910 return new FilterArtist[n];
00911 }
00912 };
00913
00914 @Override
00915 public int describeContents() {
00916 return 0;
00917 }
00918 }
00919 }
00920
00928 public static class GetArtistDetails extends AbstractCall<AudioModel.ArtistDetail> {
00929 public final static String API_TYPE = "AudioLibrary.GetArtistDetails";
00930
00931 @Override
00932 public void writeToParcel(Parcel parcel, int flags) {
00933 super.writeToParcel(parcel, flags);
00934 parcel.writeParcelable(mResult, flags);
00935 }
00936
00940 protected GetArtistDetails(Parcel parcel) {
00941 super(parcel);
00942 }
00943
00947 public static final Parcelable.Creator<GetArtistDetails> CREATOR = new Parcelable.Creator<GetArtistDetails>() {
00948 @Override
00949 public GetArtistDetails createFromParcel(Parcel parcel) {
00950 return new GetArtistDetails(parcel);
00951 }
00952 @Override
00953 public GetArtistDetails[] newArray(int n) {
00954 return new GetArtistDetails[n];
00955 }
00956 };
00957 public final static String RESULT = "artistdetails";
00958
00964 public GetArtistDetails(Integer artistid, String... properties) {
00965 super();
00966 addParameter("artistid", artistid);
00967 addParameter("properties", properties);
00968 }
00969
00970 @Override
00971 protected AudioModel.ArtistDetail parseOne(JsonNode node) {
00972 return new AudioModel.ArtistDetail((ObjectNode)node.get(RESULT));
00973 }
00974
00975 @Override
00976 public String getName() {
00977 return API_TYPE;
00978 }
00979
00980 @Override
00981 protected boolean returnsList() {
00982 return false;
00983 }
00984 }
00985
00993 public static class GetArtists extends AbstractCall<AudioModel.ArtistDetail> {
00994 public final static String API_TYPE = "AudioLibrary.GetArtists";
00995
00996 @Override
00997 public void writeToParcel(Parcel parcel, int flags) {
00998 super.writeToParcel(parcel, flags);
00999 parcel.writeParcelable(mResult, flags);
01000 }
01001
01005 protected GetArtists(Parcel parcel) {
01006 super(parcel);
01007 }
01008
01012 public static final Parcelable.Creator<GetArtists> CREATOR = new Parcelable.Creator<GetArtists>() {
01013 @Override
01014 public GetArtists createFromParcel(Parcel parcel) {
01015 return new GetArtists(parcel);
01016 }
01017 @Override
01018 public GetArtists[] newArray(int n) {
01019 return new GetArtists[n];
01020 }
01021 };
01022 public final static String RESULT = "artists";
01023
01032 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, ListModel.Sort sort, FilterGenreId filter, String... properties) {
01033 super();
01034 addParameter("albumartistsonly", albumartistsonly);
01035 addParameter("limits", limits);
01036 addParameter("sort", sort);
01037 addParameter("filter", filter);
01038 addParameter("properties", properties);
01039 }
01040
01049 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, ListModel.Sort sort, FilterGenre filter, String... properties) {
01050 super();
01051 addParameter("albumartistsonly", albumartistsonly);
01052 addParameter("limits", limits);
01053 addParameter("sort", sort);
01054 addParameter("filter", filter);
01055 addParameter("properties", properties);
01056 }
01057
01066 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, ListModel.Sort sort, FilterAlbumId filter, String... properties) {
01067 super();
01068 addParameter("albumartistsonly", albumartistsonly);
01069 addParameter("limits", limits);
01070 addParameter("sort", sort);
01071 addParameter("filter", filter);
01072 addParameter("properties", properties);
01073 }
01074
01083 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, ListModel.Sort sort, FilterAlbum filter, String... properties) {
01084 super();
01085 addParameter("albumartistsonly", albumartistsonly);
01086 addParameter("limits", limits);
01087 addParameter("sort", sort);
01088 addParameter("filter", filter);
01089 addParameter("properties", properties);
01090 }
01091
01100 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, ListModel.Sort sort, FilterSongId filter, String... properties) {
01101 super();
01102 addParameter("albumartistsonly", albumartistsonly);
01103 addParameter("limits", limits);
01104 addParameter("sort", sort);
01105 addParameter("filter", filter);
01106 addParameter("properties", properties);
01107 }
01108
01117 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, ListModel.Sort sort, ListModel.ArtistFilter filter, String... properties) {
01118 super();
01119 addParameter("albumartistsonly", albumartistsonly);
01120 addParameter("limits", limits);
01121 addParameter("sort", sort);
01122 addParameter("filter", filter);
01123 addParameter("properties", properties);
01124 }
01125
01130 public GetArtists(String... properties) {
01131 super();
01132 addParameter("properties", properties);
01133 }
01134
01140 public GetArtists(Boolean albumartistsonly, String... properties) {
01141 super();
01142 addParameter("albumartistsonly", albumartistsonly);
01143 addParameter("properties", properties);
01144 }
01145
01151 public GetArtists(ListModel.Limits limits, String... properties) {
01152 super();
01153 addParameter("limits", limits);
01154 addParameter("properties", properties);
01155 }
01156
01163 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, String... properties) {
01164 super();
01165 addParameter("albumartistsonly", albumartistsonly);
01166 addParameter("limits", limits);
01167 addParameter("properties", properties);
01168 }
01169
01175 public GetArtists(ListModel.Sort sort, String... properties) {
01176 super();
01177 addParameter("sort", sort);
01178 addParameter("properties", properties);
01179 }
01180
01187 public GetArtists(Boolean albumartistsonly, ListModel.Sort sort, String... properties) {
01188 super();
01189 addParameter("albumartistsonly", albumartistsonly);
01190 addParameter("sort", sort);
01191 addParameter("properties", properties);
01192 }
01193
01200 public GetArtists(ListModel.Limits limits, ListModel.Sort sort, String... properties) {
01201 super();
01202 addParameter("limits", limits);
01203 addParameter("sort", sort);
01204 addParameter("properties", properties);
01205 }
01206
01214 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, ListModel.Sort sort, String... properties) {
01215 super();
01216 addParameter("albumartistsonly", albumartistsonly);
01217 addParameter("limits", limits);
01218 addParameter("sort", sort);
01219 addParameter("properties", properties);
01220 }
01221
01227 public GetArtists(FilterGenreId filter, String... properties) {
01228 super();
01229 addParameter("filter", filter);
01230 addParameter("properties", properties);
01231 }
01232
01239 public GetArtists(Boolean albumartistsonly, FilterGenreId filter, String... properties) {
01240 super();
01241 addParameter("albumartistsonly", albumartistsonly);
01242 addParameter("filter", filter);
01243 addParameter("properties", properties);
01244 }
01245
01252 public GetArtists(ListModel.Limits limits, FilterGenreId filter, String... properties) {
01253 super();
01254 addParameter("limits", limits);
01255 addParameter("filter", filter);
01256 addParameter("properties", properties);
01257 }
01258
01266 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, FilterGenreId filter, String... properties) {
01267 super();
01268 addParameter("albumartistsonly", albumartistsonly);
01269 addParameter("limits", limits);
01270 addParameter("filter", filter);
01271 addParameter("properties", properties);
01272 }
01273
01280 public GetArtists(ListModel.Sort sort, FilterGenreId filter, String... properties) {
01281 super();
01282 addParameter("sort", sort);
01283 addParameter("filter", filter);
01284 addParameter("properties", properties);
01285 }
01286
01294 public GetArtists(Boolean albumartistsonly, ListModel.Sort sort, FilterGenreId filter, String... properties) {
01295 super();
01296 addParameter("albumartistsonly", albumartistsonly);
01297 addParameter("sort", sort);
01298 addParameter("filter", filter);
01299 addParameter("properties", properties);
01300 }
01301
01307 public GetArtists(FilterGenre filter, String... properties) {
01308 super();
01309 addParameter("filter", filter);
01310 addParameter("properties", properties);
01311 }
01312
01319 public GetArtists(Boolean albumartistsonly, FilterGenre filter, String... properties) {
01320 super();
01321 addParameter("albumartistsonly", albumartistsonly);
01322 addParameter("filter", filter);
01323 addParameter("properties", properties);
01324 }
01325
01332 public GetArtists(ListModel.Limits limits, FilterGenre filter, String... properties) {
01333 super();
01334 addParameter("limits", limits);
01335 addParameter("filter", filter);
01336 addParameter("properties", properties);
01337 }
01338
01346 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, FilterGenre filter, String... properties) {
01347 super();
01348 addParameter("albumartistsonly", albumartistsonly);
01349 addParameter("limits", limits);
01350 addParameter("filter", filter);
01351 addParameter("properties", properties);
01352 }
01353
01360 public GetArtists(ListModel.Sort sort, FilterGenre filter, String... properties) {
01361 super();
01362 addParameter("sort", sort);
01363 addParameter("filter", filter);
01364 addParameter("properties", properties);
01365 }
01366
01374 public GetArtists(Boolean albumartistsonly, ListModel.Sort sort, FilterGenre filter, String... properties) {
01375 super();
01376 addParameter("albumartistsonly", albumartistsonly);
01377 addParameter("sort", sort);
01378 addParameter("filter", filter);
01379 addParameter("properties", properties);
01380 }
01381
01387 public GetArtists(FilterAlbumId filter, String... properties) {
01388 super();
01389 addParameter("filter", filter);
01390 addParameter("properties", properties);
01391 }
01392
01399 public GetArtists(Boolean albumartistsonly, FilterAlbumId filter, String... properties) {
01400 super();
01401 addParameter("albumartistsonly", albumartistsonly);
01402 addParameter("filter", filter);
01403 addParameter("properties", properties);
01404 }
01405
01412 public GetArtists(ListModel.Limits limits, FilterAlbumId filter, String... properties) {
01413 super();
01414 addParameter("limits", limits);
01415 addParameter("filter", filter);
01416 addParameter("properties", properties);
01417 }
01418
01426 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, FilterAlbumId filter, String... properties) {
01427 super();
01428 addParameter("albumartistsonly", albumartistsonly);
01429 addParameter("limits", limits);
01430 addParameter("filter", filter);
01431 addParameter("properties", properties);
01432 }
01433
01440 public GetArtists(ListModel.Sort sort, FilterAlbumId filter, String... properties) {
01441 super();
01442 addParameter("sort", sort);
01443 addParameter("filter", filter);
01444 addParameter("properties", properties);
01445 }
01446
01454 public GetArtists(Boolean albumartistsonly, ListModel.Sort sort, FilterAlbumId filter, String... properties) {
01455 super();
01456 addParameter("albumartistsonly", albumartistsonly);
01457 addParameter("sort", sort);
01458 addParameter("filter", filter);
01459 addParameter("properties", properties);
01460 }
01461
01467 public GetArtists(FilterAlbum filter, String... properties) {
01468 super();
01469 addParameter("filter", filter);
01470 addParameter("properties", properties);
01471 }
01472
01479 public GetArtists(Boolean albumartistsonly, FilterAlbum filter, String... properties) {
01480 super();
01481 addParameter("albumartistsonly", albumartistsonly);
01482 addParameter("filter", filter);
01483 addParameter("properties", properties);
01484 }
01485
01492 public GetArtists(ListModel.Limits limits, FilterAlbum filter, String... properties) {
01493 super();
01494 addParameter("limits", limits);
01495 addParameter("filter", filter);
01496 addParameter("properties", properties);
01497 }
01498
01506 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, FilterAlbum filter, String... properties) {
01507 super();
01508 addParameter("albumartistsonly", albumartistsonly);
01509 addParameter("limits", limits);
01510 addParameter("filter", filter);
01511 addParameter("properties", properties);
01512 }
01513
01520 public GetArtists(ListModel.Sort sort, FilterAlbum filter, String... properties) {
01521 super();
01522 addParameter("sort", sort);
01523 addParameter("filter", filter);
01524 addParameter("properties", properties);
01525 }
01526
01534 public GetArtists(Boolean albumartistsonly, ListModel.Sort sort, FilterAlbum filter, String... properties) {
01535 super();
01536 addParameter("albumartistsonly", albumartistsonly);
01537 addParameter("sort", sort);
01538 addParameter("filter", filter);
01539 addParameter("properties", properties);
01540 }
01541
01547 public GetArtists(FilterSongId filter, String... properties) {
01548 super();
01549 addParameter("filter", filter);
01550 addParameter("properties", properties);
01551 }
01552
01559 public GetArtists(Boolean albumartistsonly, FilterSongId filter, String... properties) {
01560 super();
01561 addParameter("albumartistsonly", albumartistsonly);
01562 addParameter("filter", filter);
01563 addParameter("properties", properties);
01564 }
01565
01572 public GetArtists(ListModel.Limits limits, FilterSongId filter, String... properties) {
01573 super();
01574 addParameter("limits", limits);
01575 addParameter("filter", filter);
01576 addParameter("properties", properties);
01577 }
01578
01586 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, FilterSongId filter, String... properties) {
01587 super();
01588 addParameter("albumartistsonly", albumartistsonly);
01589 addParameter("limits", limits);
01590 addParameter("filter", filter);
01591 addParameter("properties", properties);
01592 }
01593
01600 public GetArtists(ListModel.Sort sort, FilterSongId filter, String... properties) {
01601 super();
01602 addParameter("sort", sort);
01603 addParameter("filter", filter);
01604 addParameter("properties", properties);
01605 }
01606
01614 public GetArtists(Boolean albumartistsonly, ListModel.Sort sort, FilterSongId filter, String... properties) {
01615 super();
01616 addParameter("albumartistsonly", albumartistsonly);
01617 addParameter("sort", sort);
01618 addParameter("filter", filter);
01619 addParameter("properties", properties);
01620 }
01621
01627 public GetArtists(ListModel.ArtistFilter filter, String... properties) {
01628 super();
01629 addParameter("filter", filter);
01630 addParameter("properties", properties);
01631 }
01632
01639 public GetArtists(Boolean albumartistsonly, ListModel.ArtistFilter filter, String... properties) {
01640 super();
01641 addParameter("albumartistsonly", albumartistsonly);
01642 addParameter("filter", filter);
01643 addParameter("properties", properties);
01644 }
01645
01652 public GetArtists(ListModel.Limits limits, ListModel.ArtistFilter filter, String... properties) {
01653 super();
01654 addParameter("limits", limits);
01655 addParameter("filter", filter);
01656 addParameter("properties", properties);
01657 }
01658
01666 public GetArtists(Boolean albumartistsonly, ListModel.Limits limits, ListModel.ArtistFilter filter, String... properties) {
01667 super();
01668 addParameter("albumartistsonly", albumartistsonly);
01669 addParameter("limits", limits);
01670 addParameter("filter", filter);
01671 addParameter("properties", properties);
01672 }
01673
01680 public GetArtists(ListModel.Sort sort, ListModel.ArtistFilter filter, String... properties) {
01681 super();
01682 addParameter("sort", sort);
01683 addParameter("filter", filter);
01684 addParameter("properties", properties);
01685 }
01686
01694 public GetArtists(Boolean albumartistsonly, ListModel.Sort sort, ListModel.ArtistFilter filter, String... properties) {
01695 super();
01696 addParameter("albumartistsonly", albumartistsonly);
01697 addParameter("sort", sort);
01698 addParameter("filter", filter);
01699 addParameter("properties", properties);
01700 }
01701
01702 @Override
01703 protected ArrayList<AudioModel.ArtistDetail> parseMany(JsonNode node) {
01704 final ArrayNode artists = parseResults(node, RESULT);
01705 if (artists != null) {
01706 final ArrayList<AudioModel.ArtistDetail> ret = new ArrayList<AudioModel.ArtistDetail>(artists.size());
01707 for (int i = 0; i < artists.size(); i++) {
01708 final ObjectNode item = (ObjectNode)artists.get(i);
01709 ret.add(new AudioModel.ArtistDetail(item));
01710 }
01711 return ret;
01712 } else {
01713 return new ArrayList<AudioModel.ArtistDetail>(0);
01714 }
01715 }
01716
01717 @Override
01718 public String getName() {
01719 return API_TYPE;
01720 }
01721
01722 @Override
01723 protected boolean returnsList() {
01724 return true;
01725 }
01726
01731 public static class FilterGenreId extends AbstractModel {
01732
01733
01734 public static final String GENREID = "genreid";
01735
01736
01737 public final Integer genreid;
01738
01742 public FilterGenreId(Integer genreid) {
01743 this.genreid = genreid;
01744 }
01745
01746 @Override
01747 public JsonNode toJsonNode() {
01748 final ObjectNode node = OM.createObjectNode();
01749 node.put(GENREID, genreid);
01750 return node;
01751 }
01752
01758 @Override
01759 public void writeToParcel(Parcel parcel, int flags) {
01760 parcel.writeValue(genreid);
01761 }
01762
01766 protected FilterGenreId(Parcel parcel) {
01767 genreid = parcel.readInt();
01768 }
01769
01773 public static final Parcelable.Creator<FilterGenreId> CREATOR = new Parcelable.Creator<FilterGenreId>() {
01774 @Override
01775 public FilterGenreId createFromParcel(Parcel parcel) {
01776 return new FilterGenreId(parcel);
01777 }
01778 @Override
01779 public FilterGenreId[] newArray(int n) {
01780 return new FilterGenreId[n];
01781 }
01782 };
01783
01784 @Override
01785 public int describeContents() {
01786 return 0;
01787 }
01788 }
01789
01794 public static class FilterGenre extends AbstractModel {
01795
01796
01797 public static final String GENRE = "genre";
01798
01799
01800 public final String genre;
01801
01805 public FilterGenre(String genre) {
01806 this.genre = genre;
01807 }
01808
01809 @Override
01810 public JsonNode toJsonNode() {
01811 final ObjectNode node = OM.createObjectNode();
01812 node.put(GENRE, genre);
01813 return node;
01814 }
01815
01821 @Override
01822 public void writeToParcel(Parcel parcel, int flags) {
01823 parcel.writeValue(genre);
01824 }
01825
01829 protected FilterGenre(Parcel parcel) {
01830 genre = parcel.readString();
01831 }
01832
01836 public static final Parcelable.Creator<FilterGenre> CREATOR = new Parcelable.Creator<FilterGenre>() {
01837 @Override
01838 public FilterGenre createFromParcel(Parcel parcel) {
01839 return new FilterGenre(parcel);
01840 }
01841 @Override
01842 public FilterGenre[] newArray(int n) {
01843 return new FilterGenre[n];
01844 }
01845 };
01846
01847 @Override
01848 public int describeContents() {
01849 return 0;
01850 }
01851 }
01852
01857 public static class FilterAlbumId extends AbstractModel {
01858
01859
01860 public static final String ALBUMID = "albumid";
01861
01862
01863 public final Integer albumid;
01864
01868 public FilterAlbumId(Integer albumid) {
01869 this.albumid = albumid;
01870 }
01871
01872 @Override
01873 public JsonNode toJsonNode() {
01874 final ObjectNode node = OM.createObjectNode();
01875 node.put(ALBUMID, albumid);
01876 return node;
01877 }
01878
01884 @Override
01885 public void writeToParcel(Parcel parcel, int flags) {
01886 parcel.writeValue(albumid);
01887 }
01888
01892 protected FilterAlbumId(Parcel parcel) {
01893 albumid = parcel.readInt();
01894 }
01895
01899 public static final Parcelable.Creator<FilterAlbumId> CREATOR = new Parcelable.Creator<FilterAlbumId>() {
01900 @Override
01901 public FilterAlbumId createFromParcel(Parcel parcel) {
01902 return new FilterAlbumId(parcel);
01903 }
01904 @Override
01905 public FilterAlbumId[] newArray(int n) {
01906 return new FilterAlbumId[n];
01907 }
01908 };
01909
01910 @Override
01911 public int describeContents() {
01912 return 0;
01913 }
01914 }
01915
01920 public static class FilterAlbum extends AbstractModel {
01921
01922
01923 public static final String ALBUM = "album";
01924
01925
01926 public final String album;
01927
01931 public FilterAlbum(String album) {
01932 this.album = album;
01933 }
01934
01935 @Override
01936 public JsonNode toJsonNode() {
01937 final ObjectNode node = OM.createObjectNode();
01938 node.put(ALBUM, album);
01939 return node;
01940 }
01941
01947 @Override
01948 public void writeToParcel(Parcel parcel, int flags) {
01949 parcel.writeValue(album);
01950 }
01951
01955 protected FilterAlbum(Parcel parcel) {
01956 album = parcel.readString();
01957 }
01958
01962 public static final Parcelable.Creator<FilterAlbum> CREATOR = new Parcelable.Creator<FilterAlbum>() {
01963 @Override
01964 public FilterAlbum createFromParcel(Parcel parcel) {
01965 return new FilterAlbum(parcel);
01966 }
01967 @Override
01968 public FilterAlbum[] newArray(int n) {
01969 return new FilterAlbum[n];
01970 }
01971 };
01972
01973 @Override
01974 public int describeContents() {
01975 return 0;
01976 }
01977 }
01978
01983 public static class FilterSongId extends AbstractModel {
01984
01985
01986 public static final String SONGID = "songid";
01987
01988
01989 public final Integer songid;
01990
01994 public FilterSongId(Integer songid) {
01995 this.songid = songid;
01996 }
01997
01998 @Override
01999 public JsonNode toJsonNode() {
02000 final ObjectNode node = OM.createObjectNode();
02001 node.put(SONGID, songid);
02002 return node;
02003 }
02004
02010 @Override
02011 public void writeToParcel(Parcel parcel, int flags) {
02012 parcel.writeValue(songid);
02013 }
02014
02018 protected FilterSongId(Parcel parcel) {
02019 songid = parcel.readInt();
02020 }
02021
02025 public static final Parcelable.Creator<FilterSongId> CREATOR = new Parcelable.Creator<FilterSongId>() {
02026 @Override
02027 public FilterSongId createFromParcel(Parcel parcel) {
02028 return new FilterSongId(parcel);
02029 }
02030 @Override
02031 public FilterSongId[] newArray(int n) {
02032 return new FilterSongId[n];
02033 }
02034 };
02035
02036 @Override
02037 public int describeContents() {
02038 return 0;
02039 }
02040 }
02041 }
02042
02050 public static class GetGenres extends AbstractCall<LibraryModel.GenreDetail> {
02051 public final static String API_TYPE = "AudioLibrary.GetGenres";
02052
02053 @Override
02054 public void writeToParcel(Parcel parcel, int flags) {
02055 super.writeToParcel(parcel, flags);
02056 parcel.writeParcelable(mResult, flags);
02057 }
02058
02062 protected GetGenres(Parcel parcel) {
02063 super(parcel);
02064 }
02065
02069 public static final Parcelable.Creator<GetGenres> CREATOR = new Parcelable.Creator<GetGenres>() {
02070 @Override
02071 public GetGenres createFromParcel(Parcel parcel) {
02072 return new GetGenres(parcel);
02073 }
02074 @Override
02075 public GetGenres[] newArray(int n) {
02076 return new GetGenres[n];
02077 }
02078 };
02079 public final static String RESULT = "genres";
02080
02087 public GetGenres(ListModel.Limits limits, ListModel.Sort sort, String... properties) {
02088 super();
02089 addParameter("limits", limits);
02090 addParameter("sort", sort);
02091 addParameter("properties", properties);
02092 }
02093
02098 public GetGenres(String... properties) {
02099 super();
02100 addParameter("properties", properties);
02101 }
02102
02108 public GetGenres(ListModel.Limits limits, String... properties) {
02109 super();
02110 addParameter("limits", limits);
02111 addParameter("properties", properties);
02112 }
02113
02114 @Override
02115 protected ArrayList<LibraryModel.GenreDetail> parseMany(JsonNode node) {
02116 final ArrayNode genres = parseResults(node, RESULT);
02117 if (genres != null) {
02118 final ArrayList<LibraryModel.GenreDetail> ret = new ArrayList<LibraryModel.GenreDetail>(genres.size());
02119 for (int i = 0; i < genres.size(); i++) {
02120 final ObjectNode item = (ObjectNode)genres.get(i);
02121 ret.add(new LibraryModel.GenreDetail(item));
02122 }
02123 return ret;
02124 } else {
02125 return new ArrayList<LibraryModel.GenreDetail>(0);
02126 }
02127 }
02128
02129 @Override
02130 public String getName() {
02131 return API_TYPE;
02132 }
02133
02134 @Override
02135 protected boolean returnsList() {
02136 return true;
02137 }
02138 }
02139
02147 public static class GetRecentlyAddedAlbums extends AbstractCall<AudioModel.AlbumDetail> {
02148 public final static String API_TYPE = "AudioLibrary.GetRecentlyAddedAlbums";
02149
02150 @Override
02151 public void writeToParcel(Parcel parcel, int flags) {
02152 super.writeToParcel(parcel, flags);
02153 parcel.writeParcelable(mResult, flags);
02154 }
02155
02159 protected GetRecentlyAddedAlbums(Parcel parcel) {
02160 super(parcel);
02161 }
02162
02166 public static final Parcelable.Creator<GetRecentlyAddedAlbums> CREATOR = new Parcelable.Creator<GetRecentlyAddedAlbums>() {
02167 @Override
02168 public GetRecentlyAddedAlbums createFromParcel(Parcel parcel) {
02169 return new GetRecentlyAddedAlbums(parcel);
02170 }
02171 @Override
02172 public GetRecentlyAddedAlbums[] newArray(int n) {
02173 return new GetRecentlyAddedAlbums[n];
02174 }
02175 };
02176 public final static String RESULT = "albums";
02177
02184 public GetRecentlyAddedAlbums(ListModel.Limits limits, ListModel.Sort sort, String... properties) {
02185 super();
02186 addParameter("limits", limits);
02187 addParameter("sort", sort);
02188 addParameter("properties", properties);
02189 }
02190
02195 public GetRecentlyAddedAlbums(String... properties) {
02196 super();
02197 addParameter("properties", properties);
02198 }
02199
02205 public GetRecentlyAddedAlbums(ListModel.Limits limits, String... properties) {
02206 super();
02207 addParameter("limits", limits);
02208 addParameter("properties", properties);
02209 }
02210
02211 @Override
02212 protected ArrayList<AudioModel.AlbumDetail> parseMany(JsonNode node) {
02213 final ArrayNode albums = parseResults(node, RESULT);
02214 if (albums != null) {
02215 final ArrayList<AudioModel.AlbumDetail> ret = new ArrayList<AudioModel.AlbumDetail>(albums.size());
02216 for (int i = 0; i < albums.size(); i++) {
02217 final ObjectNode item = (ObjectNode)albums.get(i);
02218 ret.add(new AudioModel.AlbumDetail(item));
02219 }
02220 return ret;
02221 } else {
02222 return new ArrayList<AudioModel.AlbumDetail>(0);
02223 }
02224 }
02225
02226 @Override
02227 public String getName() {
02228 return API_TYPE;
02229 }
02230
02231 @Override
02232 protected boolean returnsList() {
02233 return true;
02234 }
02235 }
02236
02244 public static class GetRecentlyAddedSongs extends AbstractCall<AudioModel.SongDetail> {
02245 public final static String API_TYPE = "AudioLibrary.GetRecentlyAddedSongs";
02246
02247 @Override
02248 public void writeToParcel(Parcel parcel, int flags) {
02249 super.writeToParcel(parcel, flags);
02250 parcel.writeParcelable(mResult, flags);
02251 }
02252
02256 protected GetRecentlyAddedSongs(Parcel parcel) {
02257 super(parcel);
02258 }
02259
02263 public static final Parcelable.Creator<GetRecentlyAddedSongs> CREATOR = new Parcelable.Creator<GetRecentlyAddedSongs>() {
02264 @Override
02265 public GetRecentlyAddedSongs createFromParcel(Parcel parcel) {
02266 return new GetRecentlyAddedSongs(parcel);
02267 }
02268 @Override
02269 public GetRecentlyAddedSongs[] newArray(int n) {
02270 return new GetRecentlyAddedSongs[n];
02271 }
02272 };
02273 public final static String RESULT = "songs";
02274
02282 public GetRecentlyAddedSongs(Integer albumlimit, ListModel.Limits limits, ListModel.Sort sort, String... properties) {
02283 super();
02284 addParameter("albumlimit", albumlimit);
02285 addParameter("limits", limits);
02286 addParameter("sort", sort);
02287 addParameter("properties", properties);
02288 }
02289
02294 public GetRecentlyAddedSongs(String... properties) {
02295 super();
02296 addParameter("properties", properties);
02297 }
02298
02304 public GetRecentlyAddedSongs(Integer albumlimit, String... properties) {
02305 super();
02306 addParameter("albumlimit", albumlimit);
02307 addParameter("properties", properties);
02308 }
02309
02315 public GetRecentlyAddedSongs(ListModel.Limits limits, String... properties) {
02316 super();
02317 addParameter("limits", limits);
02318 addParameter("properties", properties);
02319 }
02320
02327 public GetRecentlyAddedSongs(Integer albumlimit, ListModel.Limits limits, String... properties) {
02328 super();
02329 addParameter("albumlimit", albumlimit);
02330 addParameter("limits", limits);
02331 addParameter("properties", properties);
02332 }
02333
02339 public GetRecentlyAddedSongs(ListModel.Sort sort, String... properties) {
02340 super();
02341 addParameter("sort", sort);
02342 addParameter("properties", properties);
02343 }
02344
02351 public GetRecentlyAddedSongs(Integer albumlimit, ListModel.Sort sort, String... properties) {
02352 super();
02353 addParameter("albumlimit", albumlimit);
02354 addParameter("sort", sort);
02355 addParameter("properties", properties);
02356 }
02357
02358 @Override
02359 protected ArrayList<AudioModel.SongDetail> parseMany(JsonNode node) {
02360 final ArrayNode songs = parseResults(node, RESULT);
02361 if (songs != null) {
02362 final ArrayList<AudioModel.SongDetail> ret = new ArrayList<AudioModel.SongDetail>(songs.size());
02363 for (int i = 0; i < songs.size(); i++) {
02364 final ObjectNode item = (ObjectNode)songs.get(i);
02365 ret.add(new AudioModel.SongDetail(item));
02366 }
02367 return ret;
02368 } else {
02369 return new ArrayList<AudioModel.SongDetail>(0);
02370 }
02371 }
02372
02373 @Override
02374 public String getName() {
02375 return API_TYPE;
02376 }
02377
02378 @Override
02379 protected boolean returnsList() {
02380 return true;
02381 }
02382 }
02383
02391 public static class GetRecentlyPlayedAlbums extends AbstractCall<AudioModel.AlbumDetail> {
02392 public final static String API_TYPE = "AudioLibrary.GetRecentlyPlayedAlbums";
02393
02394 @Override
02395 public void writeToParcel(Parcel parcel, int flags) {
02396 super.writeToParcel(parcel, flags);
02397 parcel.writeParcelable(mResult, flags);
02398 }
02399
02403 protected GetRecentlyPlayedAlbums(Parcel parcel) {
02404 super(parcel);
02405 }
02406
02410 public static final Parcelable.Creator<GetRecentlyPlayedAlbums> CREATOR = new Parcelable.Creator<GetRecentlyPlayedAlbums>() {
02411 @Override
02412 public GetRecentlyPlayedAlbums createFromParcel(Parcel parcel) {
02413 return new GetRecentlyPlayedAlbums(parcel);
02414 }
02415 @Override
02416 public GetRecentlyPlayedAlbums[] newArray(int n) {
02417 return new GetRecentlyPlayedAlbums[n];
02418 }
02419 };
02420 public final static String RESULT = "albums";
02421
02428 public GetRecentlyPlayedAlbums(ListModel.Limits limits, ListModel.Sort sort, String... properties) {
02429 super();
02430 addParameter("limits", limits);
02431 addParameter("sort", sort);
02432 addParameter("properties", properties);
02433 }
02434
02439 public GetRecentlyPlayedAlbums(String... properties) {
02440 super();
02441 addParameter("properties", properties);
02442 }
02443
02449 public GetRecentlyPlayedAlbums(ListModel.Limits limits, String... properties) {
02450 super();
02451 addParameter("limits", limits);
02452 addParameter("properties", properties);
02453 }
02454
02455 @Override
02456 protected ArrayList<AudioModel.AlbumDetail> parseMany(JsonNode node) {
02457 final ArrayNode albums = parseResults(node, RESULT);
02458 if (albums != null) {
02459 final ArrayList<AudioModel.AlbumDetail> ret = new ArrayList<AudioModel.AlbumDetail>(albums.size());
02460 for (int i = 0; i < albums.size(); i++) {
02461 final ObjectNode item = (ObjectNode)albums.get(i);
02462 ret.add(new AudioModel.AlbumDetail(item));
02463 }
02464 return ret;
02465 } else {
02466 return new ArrayList<AudioModel.AlbumDetail>(0);
02467 }
02468 }
02469
02470 @Override
02471 public String getName() {
02472 return API_TYPE;
02473 }
02474
02475 @Override
02476 protected boolean returnsList() {
02477 return true;
02478 }
02479 }
02480
02488 public static class GetRecentlyPlayedSongs extends AbstractCall<AudioModel.SongDetail> {
02489 public final static String API_TYPE = "AudioLibrary.GetRecentlyPlayedSongs";
02490
02491 @Override
02492 public void writeToParcel(Parcel parcel, int flags) {
02493 super.writeToParcel(parcel, flags);
02494 parcel.writeParcelable(mResult, flags);
02495 }
02496
02500 protected GetRecentlyPlayedSongs(Parcel parcel) {
02501 super(parcel);
02502 }
02503
02507 public static final Parcelable.Creator<GetRecentlyPlayedSongs> CREATOR = new Parcelable.Creator<GetRecentlyPlayedSongs>() {
02508 @Override
02509 public GetRecentlyPlayedSongs createFromParcel(Parcel parcel) {
02510 return new GetRecentlyPlayedSongs(parcel);
02511 }
02512 @Override
02513 public GetRecentlyPlayedSongs[] newArray(int n) {
02514 return new GetRecentlyPlayedSongs[n];
02515 }
02516 };
02517 public final static String RESULT = "songs";
02518
02525 public GetRecentlyPlayedSongs(ListModel.Limits limits, ListModel.Sort sort, String... properties) {
02526 super();
02527 addParameter("limits", limits);
02528 addParameter("sort", sort);
02529 addParameter("properties", properties);
02530 }
02531
02536 public GetRecentlyPlayedSongs(String... properties) {
02537 super();
02538 addParameter("properties", properties);
02539 }
02540
02546 public GetRecentlyPlayedSongs(ListModel.Limits limits, String... properties) {
02547 super();
02548 addParameter("limits", limits);
02549 addParameter("properties", properties);
02550 }
02551
02552 @Override
02553 protected ArrayList<AudioModel.SongDetail> parseMany(JsonNode node) {
02554 final ArrayNode songs = parseResults(node, RESULT);
02555 if (songs != null) {
02556 final ArrayList<AudioModel.SongDetail> ret = new ArrayList<AudioModel.SongDetail>(songs.size());
02557 for (int i = 0; i < songs.size(); i++) {
02558 final ObjectNode item = (ObjectNode)songs.get(i);
02559 ret.add(new AudioModel.SongDetail(item));
02560 }
02561 return ret;
02562 } else {
02563 return new ArrayList<AudioModel.SongDetail>(0);
02564 }
02565 }
02566
02567 @Override
02568 public String getName() {
02569 return API_TYPE;
02570 }
02571
02572 @Override
02573 protected boolean returnsList() {
02574 return true;
02575 }
02576 }
02577
02585 public static class GetSongDetails extends AbstractCall<AudioModel.SongDetail> {
02586 public final static String API_TYPE = "AudioLibrary.GetSongDetails";
02587
02588 @Override
02589 public void writeToParcel(Parcel parcel, int flags) {
02590 super.writeToParcel(parcel, flags);
02591 parcel.writeParcelable(mResult, flags);
02592 }
02593
02597 protected GetSongDetails(Parcel parcel) {
02598 super(parcel);
02599 }
02600
02604 public static final Parcelable.Creator<GetSongDetails> CREATOR = new Parcelable.Creator<GetSongDetails>() {
02605 @Override
02606 public GetSongDetails createFromParcel(Parcel parcel) {
02607 return new GetSongDetails(parcel);
02608 }
02609 @Override
02610 public GetSongDetails[] newArray(int n) {
02611 return new GetSongDetails[n];
02612 }
02613 };
02614 public final static String RESULT = "songdetails";
02615
02621 public GetSongDetails(Integer songid, String... properties) {
02622 super();
02623 addParameter("songid", songid);
02624 addParameter("properties", properties);
02625 }
02626
02627 @Override
02628 protected AudioModel.SongDetail parseOne(JsonNode node) {
02629 return new AudioModel.SongDetail((ObjectNode)node.get(RESULT));
02630 }
02631
02632 @Override
02633 public String getName() {
02634 return API_TYPE;
02635 }
02636
02637 @Override
02638 protected boolean returnsList() {
02639 return false;
02640 }
02641 }
02642
02650 public static class GetSongs extends AbstractCall<AudioModel.SongDetail> {
02651 public final static String API_TYPE = "AudioLibrary.GetSongs";
02652
02653 @Override
02654 public void writeToParcel(Parcel parcel, int flags) {
02655 super.writeToParcel(parcel, flags);
02656 parcel.writeParcelable(mResult, flags);
02657 }
02658
02662 protected GetSongs(Parcel parcel) {
02663 super(parcel);
02664 }
02665
02669 public static final Parcelable.Creator<GetSongs> CREATOR = new Parcelable.Creator<GetSongs>() {
02670 @Override
02671 public GetSongs createFromParcel(Parcel parcel) {
02672 return new GetSongs(parcel);
02673 }
02674 @Override
02675 public GetSongs[] newArray(int n) {
02676 return new GetSongs[n];
02677 }
02678 };
02679 public final static String RESULT = "songs";
02680
02688 public GetSongs(ListModel.Limits limits, ListModel.Sort sort, FilterGenreId filter, String... properties) {
02689 super();
02690 addParameter("limits", limits);
02691 addParameter("sort", sort);
02692 addParameter("filter", filter);
02693 addParameter("properties", properties);
02694 }
02695
02703 public GetSongs(ListModel.Limits limits, ListModel.Sort sort, FilterGenre filter, String... properties) {
02704 super();
02705 addParameter("limits", limits);
02706 addParameter("sort", sort);
02707 addParameter("filter", filter);
02708 addParameter("properties", properties);
02709 }
02710
02718 public GetSongs(ListModel.Limits limits, ListModel.Sort sort, FilterArtistId filter, String... properties) {
02719 super();
02720 addParameter("limits", limits);
02721 addParameter("sort", sort);
02722 addParameter("filter", filter);
02723 addParameter("properties", properties);
02724 }
02725
02733 public GetSongs(ListModel.Limits limits, ListModel.Sort sort, FilterArtist filter, String... properties) {
02734 super();
02735 addParameter("limits", limits);
02736 addParameter("sort", sort);
02737 addParameter("filter", filter);
02738 addParameter("properties", properties);
02739 }
02740
02748 public GetSongs(ListModel.Limits limits, ListModel.Sort sort, FilterAlbumId filter, String... properties) {
02749 super();
02750 addParameter("limits", limits);
02751 addParameter("sort", sort);
02752 addParameter("filter", filter);
02753 addParameter("properties", properties);
02754 }
02755
02763 public GetSongs(ListModel.Limits limits, ListModel.Sort sort, FilterAlbum filter, String... properties) {
02764 super();
02765 addParameter("limits", limits);
02766 addParameter("sort", sort);
02767 addParameter("filter", filter);
02768 addParameter("properties", properties);
02769 }
02770
02778 public GetSongs(ListModel.Limits limits, ListModel.Sort sort, ListModel.SongFilter filter, String... properties) {
02779 super();
02780 addParameter("limits", limits);
02781 addParameter("sort", sort);
02782 addParameter("filter", filter);
02783 addParameter("properties", properties);
02784 }
02785
02790 public GetSongs(String... properties) {
02791 super();
02792 addParameter("properties", properties);
02793 }
02794
02800 public GetSongs(ListModel.Limits limits, String... properties) {
02801 super();
02802 addParameter("limits", limits);
02803 addParameter("properties", properties);
02804 }
02805
02811 public GetSongs(ListModel.Sort sort, String... properties) {
02812 super();
02813 addParameter("sort", sort);
02814 addParameter("properties", properties);
02815 }
02816
02823 public GetSongs(ListModel.Limits limits, ListModel.Sort sort, String... properties) {
02824 super();
02825 addParameter("limits", limits);
02826 addParameter("sort", sort);
02827 addParameter("properties", properties);
02828 }
02829
02835 public GetSongs(FilterGenreId filter, String... properties) {
02836 super();
02837 addParameter("filter", filter);
02838 addParameter("properties", properties);
02839 }
02840
02847 public GetSongs(ListModel.Limits limits, FilterGenreId filter, String... properties) {
02848 super();
02849 addParameter("limits", limits);
02850 addParameter("filter", filter);
02851 addParameter("properties", properties);
02852 }
02853
02859 public GetSongs(FilterGenre filter, String... properties) {
02860 super();
02861 addParameter("filter", filter);
02862 addParameter("properties", properties);
02863 }
02864
02871 public GetSongs(ListModel.Limits limits, FilterGenre filter, String... properties) {
02872 super();
02873 addParameter("limits", limits);
02874 addParameter("filter", filter);
02875 addParameter("properties", properties);
02876 }
02877
02883 public GetSongs(FilterArtistId filter, String... properties) {
02884 super();
02885 addParameter("filter", filter);
02886 addParameter("properties", properties);
02887 }
02888
02895 public GetSongs(ListModel.Limits limits, FilterArtistId filter, String... properties) {
02896 super();
02897 addParameter("limits", limits);
02898 addParameter("filter", filter);
02899 addParameter("properties", properties);
02900 }
02901
02907 public GetSongs(FilterArtist filter, String... properties) {
02908 super();
02909 addParameter("filter", filter);
02910 addParameter("properties", properties);
02911 }
02912
02919 public GetSongs(ListModel.Limits limits, FilterArtist filter, String... properties) {
02920 super();
02921 addParameter("limits", limits);
02922 addParameter("filter", filter);
02923 addParameter("properties", properties);
02924 }
02925
02931 public GetSongs(FilterAlbumId filter, String... properties) {
02932 super();
02933 addParameter("filter", filter);
02934 addParameter("properties", properties);
02935 }
02936
02943 public GetSongs(ListModel.Limits limits, FilterAlbumId filter, String... properties) {
02944 super();
02945 addParameter("limits", limits);
02946 addParameter("filter", filter);
02947 addParameter("properties", properties);
02948 }
02949
02955 public GetSongs(FilterAlbum filter, String... properties) {
02956 super();
02957 addParameter("filter", filter);
02958 addParameter("properties", properties);
02959 }
02960
02967 public GetSongs(ListModel.Limits limits, FilterAlbum filter, String... properties) {
02968 super();
02969 addParameter("limits", limits);
02970 addParameter("filter", filter);
02971 addParameter("properties", properties);
02972 }
02973
02979 public GetSongs(ListModel.SongFilter filter, String... properties) {
02980 super();
02981 addParameter("filter", filter);
02982 addParameter("properties", properties);
02983 }
02984
02991 public GetSongs(ListModel.Limits limits, ListModel.SongFilter filter, String... properties) {
02992 super();
02993 addParameter("limits", limits);
02994 addParameter("filter", filter);
02995 addParameter("properties", properties);
02996 }
02997
02998 @Override
02999 protected ArrayList<AudioModel.SongDetail> parseMany(JsonNode node) {
03000 final ArrayNode songs = parseResults(node, RESULT);
03001 if (songs != null) {
03002 final ArrayList<AudioModel.SongDetail> ret = new ArrayList<AudioModel.SongDetail>(songs.size());
03003 for (int i = 0; i < songs.size(); i++) {
03004 final ObjectNode item = (ObjectNode)songs.get(i);
03005 ret.add(new AudioModel.SongDetail(item));
03006 }
03007 return ret;
03008 } else {
03009 return new ArrayList<AudioModel.SongDetail>(0);
03010 }
03011 }
03012
03013 @Override
03014 public String getName() {
03015 return API_TYPE;
03016 }
03017
03018 @Override
03019 protected boolean returnsList() {
03020 return true;
03021 }
03022
03027 public static class FilterGenreId extends AbstractModel {
03028
03029
03030 public static final String GENREID = "genreid";
03031
03032
03033 public final Integer genreid;
03034
03038 public FilterGenreId(Integer genreid) {
03039 this.genreid = genreid;
03040 }
03041
03042 @Override
03043 public JsonNode toJsonNode() {
03044 final ObjectNode node = OM.createObjectNode();
03045 node.put(GENREID, genreid);
03046 return node;
03047 }
03048
03054 @Override
03055 public void writeToParcel(Parcel parcel, int flags) {
03056 parcel.writeValue(genreid);
03057 }
03058
03062 protected FilterGenreId(Parcel parcel) {
03063 genreid = parcel.readInt();
03064 }
03065
03069 public static final Parcelable.Creator<FilterGenreId> CREATOR = new Parcelable.Creator<FilterGenreId>() {
03070 @Override
03071 public FilterGenreId createFromParcel(Parcel parcel) {
03072 return new FilterGenreId(parcel);
03073 }
03074 @Override
03075 public FilterGenreId[] newArray(int n) {
03076 return new FilterGenreId[n];
03077 }
03078 };
03079
03080 @Override
03081 public int describeContents() {
03082 return 0;
03083 }
03084 }
03085
03090 public static class FilterGenre extends AbstractModel {
03091
03092
03093 public static final String GENRE = "genre";
03094
03095
03096 public final String genre;
03097
03101 public FilterGenre(String genre) {
03102 this.genre = genre;
03103 }
03104
03105 @Override
03106 public JsonNode toJsonNode() {
03107 final ObjectNode node = OM.createObjectNode();
03108 node.put(GENRE, genre);
03109 return node;
03110 }
03111
03117 @Override
03118 public void writeToParcel(Parcel parcel, int flags) {
03119 parcel.writeValue(genre);
03120 }
03121
03125 protected FilterGenre(Parcel parcel) {
03126 genre = parcel.readString();
03127 }
03128
03132 public static final Parcelable.Creator<FilterGenre> CREATOR = new Parcelable.Creator<FilterGenre>() {
03133 @Override
03134 public FilterGenre createFromParcel(Parcel parcel) {
03135 return new FilterGenre(parcel);
03136 }
03137 @Override
03138 public FilterGenre[] newArray(int n) {
03139 return new FilterGenre[n];
03140 }
03141 };
03142
03143 @Override
03144 public int describeContents() {
03145 return 0;
03146 }
03147 }
03148
03153 public static class FilterArtistId extends AbstractModel {
03154
03155
03156 public static final String ARTISTID = "artistid";
03157
03158
03159 public final Integer artistid;
03160
03164 public FilterArtistId(Integer artistid) {
03165 this.artistid = artistid;
03166 }
03167
03168 @Override
03169 public JsonNode toJsonNode() {
03170 final ObjectNode node = OM.createObjectNode();
03171 node.put(ARTISTID, artistid);
03172 return node;
03173 }
03174
03180 @Override
03181 public void writeToParcel(Parcel parcel, int flags) {
03182 parcel.writeValue(artistid);
03183 }
03184
03188 protected FilterArtistId(Parcel parcel) {
03189 artistid = parcel.readInt();
03190 }
03191
03195 public static final Parcelable.Creator<FilterArtistId> CREATOR = new Parcelable.Creator<FilterArtistId>() {
03196 @Override
03197 public FilterArtistId createFromParcel(Parcel parcel) {
03198 return new FilterArtistId(parcel);
03199 }
03200 @Override
03201 public FilterArtistId[] newArray(int n) {
03202 return new FilterArtistId[n];
03203 }
03204 };
03205
03206 @Override
03207 public int describeContents() {
03208 return 0;
03209 }
03210 }
03211
03216 public static class FilterArtist extends AbstractModel {
03217
03218
03219 public static final String ARTIST = "artist";
03220
03221
03222 public final String artist;
03223
03227 public FilterArtist(String artist) {
03228 this.artist = artist;
03229 }
03230
03231 @Override
03232 public JsonNode toJsonNode() {
03233 final ObjectNode node = OM.createObjectNode();
03234 node.put(ARTIST, artist);
03235 return node;
03236 }
03237
03243 @Override
03244 public void writeToParcel(Parcel parcel, int flags) {
03245 parcel.writeValue(artist);
03246 }
03247
03251 protected FilterArtist(Parcel parcel) {
03252 artist = parcel.readString();
03253 }
03254
03258 public static final Parcelable.Creator<FilterArtist> CREATOR = new Parcelable.Creator<FilterArtist>() {
03259 @Override
03260 public FilterArtist createFromParcel(Parcel parcel) {
03261 return new FilterArtist(parcel);
03262 }
03263 @Override
03264 public FilterArtist[] newArray(int n) {
03265 return new FilterArtist[n];
03266 }
03267 };
03268
03269 @Override
03270 public int describeContents() {
03271 return 0;
03272 }
03273 }
03274
03279 public static class FilterAlbumId extends AbstractModel {
03280
03281
03282 public static final String ALBUMID = "albumid";
03283
03284
03285 public final Integer albumid;
03286
03290 public FilterAlbumId(Integer albumid) {
03291 this.albumid = albumid;
03292 }
03293
03294 @Override
03295 public JsonNode toJsonNode() {
03296 final ObjectNode node = OM.createObjectNode();
03297 node.put(ALBUMID, albumid);
03298 return node;
03299 }
03300
03306 @Override
03307 public void writeToParcel(Parcel parcel, int flags) {
03308 parcel.writeValue(albumid);
03309 }
03310
03314 protected FilterAlbumId(Parcel parcel) {
03315 albumid = parcel.readInt();
03316 }
03317
03321 public static final Parcelable.Creator<FilterAlbumId> CREATOR = new Parcelable.Creator<FilterAlbumId>() {
03322 @Override
03323 public FilterAlbumId createFromParcel(Parcel parcel) {
03324 return new FilterAlbumId(parcel);
03325 }
03326 @Override
03327 public FilterAlbumId[] newArray(int n) {
03328 return new FilterAlbumId[n];
03329 }
03330 };
03331
03332 @Override
03333 public int describeContents() {
03334 return 0;
03335 }
03336 }
03337
03342 public static class FilterAlbum extends AbstractModel {
03343
03344
03345 public static final String ALBUM = "album";
03346
03347
03348 public final String album;
03349
03353 public FilterAlbum(String album) {
03354 this.album = album;
03355 }
03356
03357 @Override
03358 public JsonNode toJsonNode() {
03359 final ObjectNode node = OM.createObjectNode();
03360 node.put(ALBUM, album);
03361 return node;
03362 }
03363
03369 @Override
03370 public void writeToParcel(Parcel parcel, int flags) {
03371 parcel.writeValue(album);
03372 }
03373
03377 protected FilterAlbum(Parcel parcel) {
03378 album = parcel.readString();
03379 }
03380
03384 public static final Parcelable.Creator<FilterAlbum> CREATOR = new Parcelable.Creator<FilterAlbum>() {
03385 @Override
03386 public FilterAlbum createFromParcel(Parcel parcel) {
03387 return new FilterAlbum(parcel);
03388 }
03389 @Override
03390 public FilterAlbum[] newArray(int n) {
03391 return new FilterAlbum[n];
03392 }
03393 };
03394
03395 @Override
03396 public int describeContents() {
03397 return 0;
03398 }
03399 }
03400 }
03401
03409 public static class Scan extends AbstractCall<String> {
03410 public final static String API_TYPE = "AudioLibrary.Scan";
03411
03412 @Override
03413 public void writeToParcel(Parcel parcel, int flags) {
03414 super.writeToParcel(parcel, flags);
03415 parcel.writeValue(mResult);
03416 }
03417
03421 protected Scan(Parcel parcel) {
03422 super(parcel);
03423 }
03424
03428 public static final Parcelable.Creator<Scan> CREATOR = new Parcelable.Creator<Scan>() {
03429 @Override
03430 public Scan createFromParcel(Parcel parcel) {
03431 return new Scan(parcel);
03432 }
03433 @Override
03434 public Scan[] newArray(int n) {
03435 return new Scan[n];
03436 }
03437 };
03438
03443 public Scan(String directory) {
03444 super();
03445 addParameter("directory", directory);
03446 }
03447
03448 @Override
03449 protected String parseOne(JsonNode node) {
03450 return node.getTextValue();
03451 }
03452
03453 @Override
03454 public String getName() {
03455 return API_TYPE;
03456 }
03457
03458 @Override
03459 protected boolean returnsList() {
03460 return false;
03461 }
03462 }
03463
03471 public static class SetAlbumDetails extends AbstractCall<String> {
03472 public final static String API_TYPE = "AudioLibrary.SetAlbumDetails";
03473
03474 @Override
03475 public void writeToParcel(Parcel parcel, int flags) {
03476 super.writeToParcel(parcel, flags);
03477 parcel.writeValue(mResult);
03478 }
03479
03483 protected SetAlbumDetails(Parcel parcel) {
03484 super(parcel);
03485 }
03486
03490 public static final Parcelable.Creator<SetAlbumDetails> CREATOR = new Parcelable.Creator<SetAlbumDetails>() {
03491 @Override
03492 public SetAlbumDetails createFromParcel(Parcel parcel) {
03493 return new SetAlbumDetails(parcel);
03494 }
03495 @Override
03496 public SetAlbumDetails[] newArray(int n) {
03497 return new SetAlbumDetails[n];
03498 }
03499 };
03500
03516 public SetAlbumDetails(Integer albumid, String title, String[] artist, String description, String[] genre, String[] theme, String[] mood, String[] style, String type, String albumlabel, Integer rating, Integer year) {
03517 super();
03518 addParameter("albumid", albumid);
03519 addParameter("title", title);
03520 addParameter("artist", artist);
03521 addParameter("description", description);
03522 addParameter("genre", genre);
03523 addParameter("theme", theme);
03524 addParameter("mood", mood);
03525 addParameter("style", style);
03526 addParameter("type", type);
03527 addParameter("albumlabel", albumlabel);
03528 addParameter("rating", rating);
03529 addParameter("year", year);
03530 }
03531
03532 @Override
03533 protected String parseOne(JsonNode node) {
03534 return node.getTextValue();
03535 }
03536
03537 @Override
03538 public String getName() {
03539 return API_TYPE;
03540 }
03541
03542 @Override
03543 protected boolean returnsList() {
03544 return false;
03545 }
03546 }
03547
03555 public static class SetArtistDetails extends AbstractCall<String> {
03556 public final static String API_TYPE = "AudioLibrary.SetArtistDetails";
03557
03558 @Override
03559 public void writeToParcel(Parcel parcel, int flags) {
03560 super.writeToParcel(parcel, flags);
03561 parcel.writeValue(mResult);
03562 }
03563
03567 protected SetArtistDetails(Parcel parcel) {
03568 super(parcel);
03569 }
03570
03574 public static final Parcelable.Creator<SetArtistDetails> CREATOR = new Parcelable.Creator<SetArtistDetails>() {
03575 @Override
03576 public SetArtistDetails createFromParcel(Parcel parcel) {
03577 return new SetArtistDetails(parcel);
03578 }
03579 @Override
03580 public SetArtistDetails[] newArray(int n) {
03581 return new SetArtistDetails[n];
03582 }
03583 };
03584
03600 public SetArtistDetails(Integer artistid, String artist, String[] instrument, String[] style, String[] mood, String born, String formed, String description, String[] genre, String died, String disbanded, String... yearsactive) {
03601 super();
03602 addParameter("artistid", artistid);
03603 addParameter("artist", artist);
03604 addParameter("instrument", instrument);
03605 addParameter("style", style);
03606 addParameter("mood", mood);
03607 addParameter("born", born);
03608 addParameter("formed", formed);
03609 addParameter("description", description);
03610 addParameter("genre", genre);
03611 addParameter("died", died);
03612 addParameter("disbanded", disbanded);
03613 addParameter("yearsactive", yearsactive);
03614 }
03615
03616 @Override
03617 protected String parseOne(JsonNode node) {
03618 return node.getTextValue();
03619 }
03620
03621 @Override
03622 public String getName() {
03623 return API_TYPE;
03624 }
03625
03626 @Override
03627 protected boolean returnsList() {
03628 return false;
03629 }
03630 }
03631
03639 public static class SetSongDetails extends AbstractCall<String> {
03640 public final static String API_TYPE = "AudioLibrary.SetSongDetails";
03641
03642 @Override
03643 public void writeToParcel(Parcel parcel, int flags) {
03644 super.writeToParcel(parcel, flags);
03645 parcel.writeValue(mResult);
03646 }
03647
03651 protected SetSongDetails(Parcel parcel) {
03652 super(parcel);
03653 }
03654
03658 public static final Parcelable.Creator<SetSongDetails> CREATOR = new Parcelable.Creator<SetSongDetails>() {
03659 @Override
03660 public SetSongDetails createFromParcel(Parcel parcel) {
03661 return new SetSongDetails(parcel);
03662 }
03663 @Override
03664 public SetSongDetails[] newArray(int n) {
03665 return new SetSongDetails[n];
03666 }
03667 };
03668
03688 public SetSongDetails(Integer songid, String title, String[] artist, String[] albumartist, String[] genre, Integer year, Integer rating, String album, Integer track, Integer disc, Integer duration, String comment, String musicbrainztrackid, String musicbrainzartistid, String musicbrainzalbumid, String musicbrainzalbumartistid) {
03689 super();
03690 addParameter("songid", songid);
03691 addParameter("title", title);
03692 addParameter("artist", artist);
03693 addParameter("albumartist", albumartist);
03694 addParameter("genre", genre);
03695 addParameter("year", year);
03696 addParameter("rating", rating);
03697 addParameter("album", album);
03698 addParameter("track", track);
03699 addParameter("disc", disc);
03700 addParameter("duration", duration);
03701 addParameter("comment", comment);
03702 addParameter("musicbrainztrackid", musicbrainztrackid);
03703 addParameter("musicbrainzartistid", musicbrainzartistid);
03704 addParameter("musicbrainzalbumid", musicbrainzalbumid);
03705 addParameter("musicbrainzalbumartistid", musicbrainzalbumartistid);
03706 }
03707
03708 @Override
03709 protected String parseOne(JsonNode node) {
03710 return node.getTextValue();
03711 }
03712
03713 @Override
03714 public String getName() {
03715 return API_TYPE;
03716 }
03717
03718 @Override
03719 protected boolean returnsList() {
03720 return false;
03721 }
03722 }
03723 }