public class InformationProvider extends AddOnModule implements MusicResourceGenerator
PROVIDE_RESOURCE_ERROR, PROVIDE_RESOURCE_ERROR_GENERATING, PROVIDE_RESOURCE_ERROR_NOT_CAPABLE
Constructor and Description |
---|
InformationProvider(Context context,
String ID,
MusicProvider musicProvider,
CommandHandler commandHandler)
initializes the Module
|
Modifier and Type | Method and Description |
---|---|
List<? extends ResourceModel> |
announceResources() |
Optional<? extends ResourceModel> |
generateResource(ResourceModel resourceModel,
Optional<EventModel> event)
generates the resources
|
Capabilities |
getCapabilities()
gets the Capabilities of the Player
|
Playlist |
getCurrentPlaylist()
gets the current Playlist
|
Progress |
getCurrentProgress()
gets the Progress
|
PlaybackState |
getPlaybackState()
gets the PlaybackState of the Player
|
Volume |
getVolume()
gets the Volume
|
boolean |
isOutputRunning()
true if playing and false if not
|
boolean |
isPlaying()
true if playing and false if not
|
boolean |
isUsingJava()
true if using java, false if not (and for example a C-library)
|
getContext, getID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createCapabilitiesResource, createNowPlayingResource, createPlaybackStateResource, createPlayerResource, createProgressResource, createTrackInfoResource, createVolumeResource
createUsingSoundResource, provideResource
announceEvents, resourcesInit
playerError, playerError, startedSound, startedSound, updatePlayInfo, updatePlayInfo, updatePlayInfo, updatePlayInfo, updatePlayInfo, updateStateInfo
endedSound
fire, fire, fire, fire, fire
debug, debug, error, error, getContext
debug, debug, error, error, fatal, fatal, warn, warn
exceptionThrown
public InformationProvider(Context context, String ID, MusicProvider musicProvider, CommandHandler commandHandler)
context
- the current ContextmusicProvider
- the musicProvider to get the data fromID
- the IDcommandHandler
- the commandHandlerpublic List<? extends ResourceModel> announceResources()
announceResources
in interface ResourceBuilderModel
announceResources
in interface ResourcesProviderBase
announceResources
in interface MusicResourceGenerator
announceResources
in interface PermanentSoundResources
public Optional<? extends ResourceModel> generateResource(ResourceModel resourceModel, Optional<EventModel> event)
generateResource
in interface ResourcesProviderBase
generateResource
in interface MusicResourceGenerator
generateResource
in interface PermanentSoundResources
resourceModel
- the resourceModelevent
- the Eventpublic Playlist getCurrentPlaylist()
getCurrentPlaylist
in interface MusicProvider
public Volume getVolume()
getVolume
in interface MusicProvider
public Progress getCurrentProgress()
getCurrentProgress
in interface MusicProvider
public Capabilities getCapabilities()
getCapabilities
in interface MusicProvider
public PlaybackState getPlaybackState()
getPlaybackState
in interface MusicProvider
public boolean isOutputRunning()
isOutputRunning
in interface MusicProvider
isOutputRunning
in interface PermanentSoundUsed
public boolean isPlaying()
isPlaying
in interface MusicProvider
public boolean isUsingJava()
isUsingJava
in interface MusicProvider
isUsingJava
in interface PermanentSoundUsed
Copyright © 2016. All rights reserved.