NewPipeExtractor/extractor/src/main/java/org/schabi/newpipe/extractor/ServiceList.java

62 lines
2.0 KiB
Java
Raw Normal View History

2017-03-01 18:47:52 +01:00
package org.schabi.newpipe.extractor;
2018-12-23 14:59:26 +01:00
import org.schabi.newpipe.extractor.services.media_ccc.MediaCCCService;
import org.schabi.newpipe.extractor.services.soundcloud.SoundcloudService;
2017-08-06 22:20:15 +02:00
import org.schabi.newpipe.extractor.services.youtube.YoutubeService;
2017-03-01 18:47:52 +01:00
import java.util.List;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
2018-11-10 10:50:13 +01:00
/*
* Copyright (C) Christian Schabesberger 2018 <chris.schabesberger@mailbox.org>
* ServiceList.java is part of NewPipe.
*
* NewPipe 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 3 of the License, or
* (at your option) any later version.
*
* NewPipe 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 NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
2017-08-06 22:20:15 +02:00
/**
* A list of supported services.
2017-03-01 18:47:52 +01:00
*/
public final class ServiceList {
private ServiceList() {
//no instance
2017-08-06 22:20:15 +02:00
}
2017-03-01 18:47:52 +01:00
public static final YoutubeService YouTube;
public static final SoundcloudService SoundCloud;
2018-12-23 14:59:26 +01:00
public static final MediaCCCService MediaCCC;
2018-11-10 10:50:13 +01:00
/**
* When creating a new service, put this service in the end of this list,
* and give it the next free id.
*/
private static final List<StreamingService> SERVICES = unmodifiableList(
asList(
YouTube = new YoutubeService(0),
2018-12-23 14:59:26 +01:00
SoundCloud = new SoundcloudService(1),
MediaCCC = new MediaCCCService(2)
));
/**
* Get all the supported services.
*
* @return a unmodifiable list of all the supported services
*/
public static List<StreamingService> all() {
return SERVICES;
2017-08-06 22:20:15 +02:00
}
2017-03-01 18:47:52 +01:00
}