TV-Browser 2.7.5 API

captureplugin.drivers.simpledevice
Class SimpleConfig

java.lang.Object
  extended by captureplugin.drivers.simpledevice.SimpleConfig
All Implemented Interfaces:
ConfigIf

public class SimpleConfig
extends Object
implements ConfigIf

Configuration for the Device

Author:
bodum

Constructor Summary
SimpleConfig()
          Create Config
SimpleConfig(ObjectInputStream stream)
          Load Config
SimpleConfig(SimpleConfig config)
          Clone Config
 
Method Summary
 Object clone()
           
 ExternalChannelIf[] getAllExternalChannels(SimpleConnectionIf con)
           
 Channel getChannelForExternalId(int channel)
          Returns TVB Channel for external Channel ID
 HashMap<Channel,SimpleChannel> getChannelMapping()
          Get Mapping of TVB-Channels - external Channels
 ExternalChannelIf getExternalChannel(Channel channel)
          Get external channel for TVB Channel
 ExternalChannelIf[] getExternalChannels()
           
 String getId()
           
 void readData(ObjectInputStream stream)
          Read Settings
 void setExternalChannel(Channel channel, ExternalChannelIf external)
          Set Mapping for Channel
 void setExternalChannels(SimpleChannel[] channels)
          Set List of external Channels.
 void writeData(ObjectOutputStream stream)
          Store Settings
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleConfig

public SimpleConfig()
Create Config


SimpleConfig

public SimpleConfig(SimpleConfig config)
Clone Config

Parameters:
config - config to clone

SimpleConfig

public SimpleConfig(ObjectInputStream stream)
             throws IOException,
                    ClassNotFoundException
Load Config

Parameters:
stream - Load Config from this Stream
Throws:
IOException
ClassNotFoundException
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

getChannelMapping

public HashMap<Channel,SimpleChannel> getChannelMapping()
Get Mapping of TVB-Channels - external Channels

Returns:
Mapping

getExternalChannel

public ExternalChannelIf getExternalChannel(Channel channel)
Get external channel for TVB Channel

Specified by:
getExternalChannel in interface ConfigIf
Parameters:
channel - Get external channel for this TVB Channel
Returns:
external channel if mapped, else null

setExternalChannel

public void setExternalChannel(Channel channel,
                               ExternalChannelIf external)
Set Mapping for Channel

Specified by:
setExternalChannel in interface ConfigIf
Parameters:
channel - TVB Channel
external - external Channel

setExternalChannels

public void setExternalChannels(SimpleChannel[] channels)
Set List of external Channels. This checks the mappings and removes unavailable external Channels

Parameters:
channels - List of Channels

getExternalChannels

public ExternalChannelIf[] getExternalChannels()
Specified by:
getExternalChannels in interface ConfigIf
Returns:
get all available external Channels

getAllExternalChannels

public ExternalChannelIf[] getAllExternalChannels(SimpleConnectionIf con)
Returns:
get all available external Channels

readData

public void readData(ObjectInputStream stream)
              throws IOException,
                     ClassNotFoundException
Read Settings

Parameters:
stream -
Throws:
IOException
ClassNotFoundException

writeData

public void writeData(ObjectOutputStream stream)
               throws IOException
Store Settings

Parameters:
stream -
Throws:
IOException

getChannelForExternalId

public Channel getChannelForExternalId(int channel)
Returns TVB Channel for external Channel ID

Parameters:
channel - external Channel ID
Returns:
TVB Channel, null if not found

getId

public String getId()
Returns:
ID of this Device

TV-Browser 2.7.5 API

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