TV-Browser 2.7.5 API

captureplugin.drivers.simpledevice
Class SimpleDevice

java.lang.Object
  extended by captureplugin.drivers.simpledevice.SimpleDevice
All Implemented Interfaces:
DeviceIf, Cloneable

public class SimpleDevice
extends Object
implements DeviceIf

The Applescript-Device

Author:
bodum

Constructor Summary
SimpleDevice(SimpleConnectionIf connection, DriverIf driver, String name)
           
SimpleDevice(SimpleDevice 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)
          Creates a Config-Dialog for this Device
 boolean executeAdditionalCommand(Window parent, int num, Program program)
          Execute a additional Command.
 String[] getAdditionalCommands()
          Get the List of additional Commands
 SimpleConnectionIf getConnection()
           
 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)
          Sets the Name of the 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

SimpleDevice

public SimpleDevice(SimpleConnectionIf connection,
                    DriverIf driver,
                    String name)

SimpleDevice

public SimpleDevice(SimpleDevice device)
Method Detail

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

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 of this Device

getName

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

Specified by:
getName in interface DeviceIf
Returns:
Name of Device

setName

public String setName(String name)
Description copied from interface: DeviceIf
Sets the Name of the Device

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

configDevice

public void configDevice(Window parent)
Description copied from interface: DeviceIf
Creates a Config-Dialog for this Device

Specified by:
configDevice in interface DeviceIf
Parameters:
parent - Parent-Frame

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

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

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

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

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?

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

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

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

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

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

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.

getDeleteRemovedProgramsAutomatically

public boolean getDeleteRemovedProgramsAutomatically()
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.
Since:
2.11

removeProgramWithoutExecution

public void removeProgramWithoutExecution(Program p)
Removes programs that were deleted during a data update

Specified by:
removeProgramWithoutExecution in interface DeviceIf
Parameters:
p - The program to remove from this device.
Since:
2.11

getConnection

public SimpleConnectionIf getConnection()
Returns:
ApplescriptConnection that is used for this device
Since:
2.6

TV-Browser 2.7.5 API

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