2017-03-01 18:47:52 +01:00
|
|
|
package org.schabi.newpipe.extractor;
|
|
|
|
|
2017-08-04 16:21:45 +02:00
|
|
|
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
|
|
|
|
2017-08-06 22:20:15 +02:00
|
|
|
/**
|
|
|
|
* A list of supported services.
|
2017-03-01 18:47:52 +01:00
|
|
|
*/
|
2017-08-06 22:20:15 +02:00
|
|
|
public enum ServiceList {
|
2017-08-07 18:12:51 +02:00
|
|
|
YouTube(new YoutubeService(0, "YouTube")),
|
2017-08-06 22:20:15 +02:00
|
|
|
SoundCloud(new SoundcloudService(1, "SoundCloud"));
|
|
|
|
// DailyMotion(new DailyMotionService(2, "DailyMotion"));
|
|
|
|
|
|
|
|
private final StreamingService service;
|
|
|
|
|
|
|
|
ServiceList(StreamingService service) {
|
|
|
|
this.service = service;
|
|
|
|
}
|
|
|
|
|
|
|
|
public StreamingService getService() {
|
|
|
|
return service;
|
|
|
|
}
|
|
|
|
|
|
|
|
public StreamingService.ServiceInfo getServiceInfo() {
|
|
|
|
return service.getServiceInfo();
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getId() {
|
|
|
|
return service.getServiceId();
|
|
|
|
}
|
2017-03-01 18:47:52 +01:00
|
|
|
|
2017-08-06 22:20:15 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return service.getServiceInfo().name;
|
|
|
|
}
|
2017-03-01 18:47:52 +01:00
|
|
|
}
|