TV-Browser 2.7.5 API

captureplugin.drivers.dreambox
Class DreamboxDevice

java.lang.Object
  extended by captureplugin.drivers.dreambox.DreamboxDevice
All Implemented Interfaces:
DeviceIf, Cloneable

public class DreamboxDevice
extends Object
implements DeviceIf

The Dreambox-Device


Constructor Summary
DreamboxDevice(DreamboxDevice dreamboxDevice)
          Clones another dreambox device
DreamboxDevice(DreamboxDriver dreamboxDriver, String name)
          Creates this Device
 
Method Summary
 boolean add(Window parent, Program program)
          Adds a Program to the List
 Program[] checkProgramsAfterDataUpdateAndGetDeleted()
          Checks the programs if there were updates or deletings
 Object clone()
          Clones this Device
 void configDevice(Window parent)
          Opens a configure dialog for this device
 boolean executeAdditionalCommand(Window parent, int num, Program program)
          Execute a additional Command.
 String[] getAdditionalCommands()
          Get the List of additional Commands
 boolean getDeleteRemovedProgramsAutomatically()
          Gets if programs that were removed during a data update should be deleted automatically.
 DriverIf getDriver()
          Returns the Driver for this Device
 String getId()
          The Unique ID of this Device.
 String getName()
          Name of the Device
 Program[] getProgramList()
          Get the List of Programs selected by this Device
 boolean isAbleToAddAndRemovePrograms()
          Is this Device able to add Programs?
 boolean isInList(Program program)
          Is this Program in the List of selected Recordings?
 void readData(ObjectInputStream stream, boolean importDevice)
          Reads the Data from a Stream
 boolean remove(Window parent, Program program)
          Removes a Program from the List
 void removeProgramWithoutExecution(Program p)
          Removes programs that were deleted during a data update
 String setName(String name)
          Set the new Name for this Device
 void writeData(ObjectOutputStream stream)
          Saves the Data into a Stream
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DreamboxDevice

public DreamboxDevice(DreamboxDriver dreamboxDriver,
                      String name)
Creates this Device

Parameters:
dreamboxDriver - Driver for the Dreambox
name - Name for this Device

DreamboxDevice

public DreamboxDevice(DreamboxDevice dreamboxDevice)
Clones another dreambox device

Parameters:
dreamboxDevice - Device to clone
Method Detail

getId

public String getId()
Description copied from interface: DeviceIf
The Unique ID of this Device. Please use IDGenerator.generateUniqueId() to create the ID

Specified by:
getId in interface DeviceIf
Returns:
ID for this Device

getName

public String getName()
Description copied from interface: DeviceIf
Name of the Device

Specified by:
getName in interface DeviceIf
Returns:
Name for this Device

setName

public String setName(String name)
Set the new Name for this Device

Specified by:
setName in interface DeviceIf
Parameters:
name - new Name
Returns:
new Name

getDriver

public DriverIf getDriver()
Description copied from interface: DeviceIf
Returns the Driver for this Device

Specified by:
getDriver in interface DeviceIf
Returns:
Driver for this Device

configDevice

public void configDevice(Window parent)
Opens a configure dialog for this device

Specified by:
configDevice in interface DeviceIf
Parameters:
parent - Parent for the dialog

isInList

public boolean isInList(Program program)
Description copied from interface: DeviceIf
Is this Program in the List of selected Recordings?

Specified by:
isInList in interface DeviceIf
Parameters:
program - Program
Returns:
is Progam in List?
See Also:
DeviceIf.isInList(devplugin.Program)

isAbleToAddAndRemovePrograms

public boolean isAbleToAddAndRemovePrograms()
Description copied from interface: DeviceIf
Is this Device able to add Programs?

Specified by:
isAbleToAddAndRemovePrograms in interface DeviceIf
Returns:
True if able to add Programs
See Also:
DeviceIf.isAbleToAddAndRemovePrograms()

add

public boolean add(Window parent,
                   Program program)
Description copied from interface: DeviceIf
Adds a Program to the List

Specified by:
add in interface DeviceIf
Parameters:
parent - Parent-Frame
program - Program to add
Returns:
true if successfull
See Also:
DeviceIf.add(java.awt.Window,devplugin.Program)

remove

public boolean remove(Window parent,
                      Program program)
Description copied from interface: DeviceIf
Removes a Program from the List

Specified by:
remove in interface DeviceIf
Parameters:
parent - Parent-Frame
program - Program to remove
Returns:
true if successfull
See Also:
DeviceIf.remove(java.awt.Window,devplugin.Program)

getProgramList

public Program[] getProgramList()
Description copied from interface: DeviceIf
Get the List of Programs selected by this Device

Specified by:
getProgramList in interface DeviceIf
Returns:
LIst of programs
See Also:
DeviceIf.getProgramList()

getAdditionalCommands

public String[] getAdditionalCommands()
Description copied from interface: DeviceIf
Get the List of additional Commands

Specified by:
getAdditionalCommands in interface DeviceIf
Returns:
List of additional Commands
See Also:
DeviceIf.getAdditionalCommands()

executeAdditionalCommand

public boolean executeAdditionalCommand(Window parent,
                                        int num,
                                        Program program)
Description copied from interface: DeviceIf
Execute a additional Command. The Number must corospond to the List of getAdditionalCommands()

Specified by:
executeAdditionalCommand in interface DeviceIf
Parameters:
parent - Parent-Frame
num - Number of Command
program - Program
Returns:
true if successfull
See Also:
DeviceIf.executeAdditionalCommand(java.awt.Window,int,devplugin.Program)

clone

public Object clone()
Description copied from interface: DeviceIf
Clones this Device

Specified by:
clone in interface DeviceIf
Overrides:
clone in class Object
Returns:
Clone

writeData

public void writeData(ObjectOutputStream stream)
               throws IOException
Description copied from interface: DeviceIf
Saves the Data into a Stream

Specified by:
writeData in interface DeviceIf
Parameters:
stream - write Data into this stream
Throws:
IOException
See Also:
DeviceIf.writeData(java.io.ObjectOutputStream)

readData

public void readData(ObjectInputStream stream,
                     boolean importDevice)
              throws IOException,
                     ClassNotFoundException
Description copied from interface: DeviceIf
Reads the Data from a Stream

Specified by:
readData in interface DeviceIf
Parameters:
stream - read data from this stream
importDevice - True if the device should be imported.
Throws:
IOException
ClassNotFoundException
See Also:
DeviceIf.readData(java.io.ObjectInputStream, boolean)

checkProgramsAfterDataUpdateAndGetDeleted

public Program[] checkProgramsAfterDataUpdateAndGetDeleted()
Description copied from interface: DeviceIf
Checks the programs if there were updates or deletings

Specified by:
checkProgramsAfterDataUpdateAndGetDeleted in interface DeviceIf
Returns:
The deleted programs as array.
See Also:
DeviceIf.checkProgramsAfterDataUpdateAndGetDeleted()

getDeleteRemovedProgramsAutomatically

public boolean getDeleteRemovedProgramsAutomatically()
Description copied from interface: DeviceIf
Gets if programs that were removed during a data update should be deleted automatically.

Specified by:
getDeleteRemovedProgramsAutomatically in interface DeviceIf
Returns:
If the programs should be deleted.
See Also:
DeviceIf.getDeleteRemovedProgramsAutomatically()

removeProgramWithoutExecution

public void removeProgramWithoutExecution(Program p)
Description copied from interface: DeviceIf
Removes programs that were deleted during a data update

Specified by:
removeProgramWithoutExecution in interface DeviceIf
Parameters:
p - The program to remove from this device.
See Also:
DeviceIf.removeProgramWithoutExecution(devplugin.Program)

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)