TV-Browser 2.7.5 API

captureplugin.drivers
Interface DeviceIf

All Superinterfaces:
Cloneable
All Known Implementing Classes:
DefaultDevice, DreamboxDevice, SimpleDevice

public interface DeviceIf
extends Cloneable

This Interfaces represents a 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
 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
 

Method Detail

getId

String getId()
The Unique ID of this Device. Please use IDGenerator.generateUniqueId() to create the ID

Returns:
ID of this Device

getName

String getName()
Name of the Device

Returns:
Name of Device

setName

String setName(String name)
Sets the Name of the Device

Parameters:
name - Name of Device
Returns:
new Name of Device

getDriver

DriverIf getDriver()
Returns the Driver for this Device

Returns:
Driver for this Device

configDevice

void configDevice(Window parent)
Creates a Config-Dialog for this Device

Parameters:
parent - Parent-Frame

isInList

boolean isInList(Program program)
Is this Program in the List of selected Recordings?

Parameters:
program - Program
Returns:
is Progam in List?

isAbleToAddAndRemovePrograms

boolean isAbleToAddAndRemovePrograms()
Is this Device able to add Programs?

Returns:
True if able to add Programs

add

boolean add(Window parent,
            Program program)
Adds a Program to the List

Parameters:
parent - Parent-Frame
program - Program to add
Returns:
true if successfull

remove

boolean remove(Window parent,
               Program program)
Removes a Program from the List

Parameters:
parent - Parent-Frame
program - Program to remove
Returns:
true if successfull

getProgramList

Program[] getProgramList()
Get the List of Programs selected by this Device

Returns:
LIst of programs

getAdditionalCommands

String[] getAdditionalCommands()
Get the List of additional Commands

Returns:
List of additional Commands

executeAdditionalCommand

boolean executeAdditionalCommand(Window parent,
                                 int num,
                                 Program program)
Execute a additional Command. The Number must corospond to the List of getAdditionalCommands()

Parameters:
parent - Parent-Frame
num - Number of Command
program - Program
Returns:
true if successfull

clone

Object clone()
Clones this Device

Returns:
Clone

writeData

void writeData(ObjectOutputStream stream)
               throws IOException
Saves the Data into a Stream

Parameters:
stream - write Data into this stream
Throws:
IOException

readData

void readData(ObjectInputStream stream,
              boolean importDevice)
              throws IOException,
                     ClassNotFoundException
Reads the Data from a Stream

Parameters:
stream - read data from this stream
importDevice - True if the device should be imported.
Throws:
IOException
ClassNotFoundException

checkProgramsAfterDataUpdateAndGetDeleted

Program[] checkProgramsAfterDataUpdateAndGetDeleted()
Checks the programs if there were updates or deletings

Returns:
The deleted programs as array.
Since:
2.11

getDeleteRemovedProgramsAutomatically

boolean getDeleteRemovedProgramsAutomatically()
Gets if programs that were removed during a data update should be deleted automatically.

Returns:
If the programs should be deleted.
Since:
2.11

removeProgramWithoutExecution

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

Parameters:
p - The program to remove from this device.
Since:
2.11

TV-Browser 2.7.5 API

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