|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webhiker.dreambox.api.DreamboxAPI
public class DreamboxAPI
The Class DreamboxAPI. For events to be generated for registered listeners, a new Thread needs to be started e.g. new Thread(new DreamboxAPI("127.0.0.1","80","root","dreambox")).start();
Nested Class Summary | |
---|---|
static class |
DreamboxAPI.Command
The set of available Dreambox commands. |
Constructor Summary | |
---|---|
DreamboxAPI(java.lang.String host,
int port,
java.lang.String username,
java.lang.String password)
Instantiates a new dreambox api. |
Method Summary | |
---|---|
void |
addDreamboxListener(DreamboxListener dl)
Adds the dreambox listener. |
void |
checkConnection()
Check connection parameter, and throw an exception if could not connect. |
void |
command(DreamboxAPI.Command command)
This provides functionality for Dreambox control. |
void |
fireStatusChanged(DreamboxListener dl)
Utility method to fire status changed events to all registered listeners. |
java.util.List<Bouquet> |
getBouquets()
Gets the bouquets. |
EPG |
getEPG()
Gets the Electronic Program Guide information for the currently showing channel. |
java.lang.String |
getHost()
Gets the host. |
java.lang.String |
getPassword()
Gets the password. |
int |
getPort()
Gets the port. |
Status |
getStatus()
Gets the status of the stream for the currently showing channel. |
StreamInfo |
getStreamInfo()
Gets the stream info for the currently displayed service. |
java.lang.String |
getUsername()
Gets the username. |
java.lang.String |
getVLCURL()
Gets the VLC playable URL for the currently playing channel, but converted to specified host instead of internal IP address. |
int |
getVolume()
Gets the current volume as reported by the Dreambox. |
boolean |
isConnected()
Returns true if Dreambox is connected, else returns false |
boolean |
isRunning()
|
static void |
main(java.lang.String[] args)
The main method. |
void |
run()
|
void |
selectChannel(Channel channel)
Change to the specified channel. |
void |
sendMessage(java.lang.String message)
Send a message to the Dreambox display. |
void |
setHost(java.lang.String host)
Sets the host. |
void |
setPassword(java.lang.String password)
Sets the password. |
void |
setPort(int port)
Sets the port. |
void |
setUsername(java.lang.String username)
Sets the username. |
void |
setVolume(int volume)
Sets the volume to the specified value. |
void |
stop()
Stop polling the Dreambox for status changes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DreamboxAPI(java.lang.String host, int port, java.lang.String username, java.lang.String password)
host
- the hostport
- the portusername
- the usernamepassword
- the passwordMethod Detail |
---|
public java.lang.String getHost()
public void setHost(java.lang.String host)
host
- the new hostpublic java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- the new usernamepublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- the new passwordpublic int getPort()
public void setPort(int port)
port
- the new portpublic void run()
run
in interface java.lang.Runnable
public void stop()
public void selectChannel(Channel channel) throws java.io.IOException
channel
- the new channel
java.io.IOException
- Signals that an I/O exception has occurred.public void setVolume(int volume) throws java.io.IOException
volume
- the new volume
java.io.IOException
- Signals that an I/O exception has occurred.public int getVolume() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.public void command(DreamboxAPI.Command command) throws java.io.IOException
command
- the command to execute
java.io.IOException
- Signals that an I/O exception has occurred.public void sendMessage(java.lang.String message) throws java.io.IOException
message
- the message
java.io.IOException
- Signals that an I/O exception has occurred.public java.lang.String getVLCURL() throws java.io.IOException
java.io.IOException
public Status getStatus() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.public EPG getEPG() throws java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
java.io.IOException
- Signals that an I/O exception has occurred.
org.xml.sax.SAXException
- the SAX exception
javax.xml.parsers.ParserConfigurationException
- the parser configuration exceptionpublic StreamInfo getStreamInfo() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
java.io.IOException
- Signals that an I/O exception has occurred.
javax.xml.parsers.ParserConfigurationException
- the parser configuration exception
org.xml.sax.SAXException
- the SAX exceptionpublic java.util.List<Bouquet> getBouquets() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.public void addDreamboxListener(DreamboxListener dl)
dl
- the dlpublic void fireStatusChanged(DreamboxListener dl) throws java.io.IOException
java.io.IOException
public void checkConnection() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.public boolean isConnected()
public static final void main(java.lang.String[] args)
args
- the argumentspublic boolean isRunning()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |