tvbrowser.core

## Class ChannelList

- java.lang.Object
- - tvbrowser.core.ChannelList

-     public class ChannelList
      extends java.lang.Object

  ChannelList contains a list of all available mAvailableChannels in the system. Use this class to subscribe mAvailableChannels. The available mAvailableChannels are listed in the file CHANNEL_FILE.
  Author:
    Martin Oberhauser

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChannelList()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `checkForJointChannels()`
    `static void` | `completeChannelLoading()` Load the not subscribed channels after TV-Browser start was finished.
    `static void` | `createForTvBrowserStart()` Creates the needed channels for TV-Browser start
    `static Channel[]` | `getAvailableChannels()`
    `static Channel` | `getChannel(java.lang.String uniqueId)`
    `static Channel` | `getChannel(java.lang.String dataServiceId, java.lang.String groupId, java.lang.String country, java.lang.String channelId)` Returns a new Channel object with the specified IDs or null, if the given IDs does not exist.
    `static Channel` | `getChannel(java.lang.String dataServiceId, java.lang.String groupId, java.lang.String country, java.lang.String channelId, java.lang.String channelName)` Returns a new Channel object with the specified IDs or a dummy channel or null, if the given IDs contains null values.
    `static java.lang.Thread` | `getChannelLoadThread()`
    `static int` | `getNumberOfSubscribedChannels()` Returns the number of subscribed mAvailableChannels.
    `static int` | `getPos(Channel channel)` Gets the position of the channel in the subscribed channel array, or -1 if the channel isn't a subscribed channel.
    `static Channel[]` | `getSubscribedChannels()` Returns all subscribed mAvailableChannels.
    `static Channel[]` | `getSubscribedChannels(boolean withDummyChannels)` Returns all subscribed mAvailableChannels.
    `static boolean` | `hasCalledChannelValueChangeForChannel(Channel ch)` Gets if the channel values are allowed to be changed for the given channel.
    `static void` | `initSubscribedChannels()` Init the subscribed channels
    `static boolean` | `isSubscribedChannel(Channel channel)` Returns true, if the specified channel is currently subscribed.
    `static void` | `loadChannelTimeLimits()` Writes the channels time limits to data file.
    `static void` | `reload()` Reload the channel list.
    `static void` | `setSubscribeChannels(Channel[] channelArr)` Marks the specified mAvailableChannels as 'subscribed'.
    `static void` | `setSubscribeChannels(Channel[] channelArr, boolean update)` Sets the subscribed channels.
    `static void` | `storeAllSettings()` Stores all settings used for the Channels
    `static void` | `storeChannelTimeLimits()` Writes the channels time limits to data file.
    `static void` | `subscribeChannel(Channel channel)` Subscribes a channel

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ChannelList

          public ChannelList()

  - ### Method Detail

    - #### completeChannelLoading

          public static void completeChannelLoading()

      Load the not subscribed channels after TV-Browser start was finished.

    - #### reload

          public static void reload()

      Reload the channel list.

    - #### initSubscribedChannels

          public static void initSubscribedChannels()

      Init the subscribed channels

    - #### storeAllSettings

          public static void storeAllSettings()

      Stores all settings used for the Channels

    - #### createForTvBrowserStart

          public static void createForTvBrowserStart()

      Creates the needed channels for TV-Browser start

    - #### subscribeChannel

          public static void subscribeChannel(Channel channel)

      Subscribes a channel
      Parameters:
        `channel` -

    - #### setSubscribeChannels

          public static void setSubscribeChannels(Channel[] channelArr)

      Marks the specified mAvailableChannels as 'subscribed'. All other mAvailableChannels become 'unsubscribed'
      Parameters:
        `channelArr` - The channels to set as subscribed channels,

    - #### setSubscribeChannels

          public static void setSubscribeChannels(Channel[] channelArr,
                                  boolean update)

      Sets the subscribed channels.
      Parameters:
        `channelArr` - The array with the subscribed channels.
        `update` - ?

    - #### getChannel

          public static Channel getChannel(java.lang.String dataServiceId,
                           java.lang.String groupId,
                           java.lang.String country,
                           java.lang.String channelId)

      Returns a new Channel object with the specified IDs or null, if the given IDs does not exist.
      Parameters:
        `dataServiceId` - The id of the data service to get the channel from.
        `groupId` - The id of the channel group.
        `country` - The country of the channel.
        `channelId` - The id of the channel.
      Returns:
        The specified channel or `null` if the channel wasn't found.
      Since:
        2.2.1

    - #### getChannel

          public static Channel getChannel(java.lang.String dataServiceId,
                           java.lang.String groupId,
                           java.lang.String country,
                           java.lang.String channelId,
                           java.lang.String channelName)

      Returns a new Channel object with the specified IDs or a dummy channel or null, if the given IDs contains null values.
      Parameters:
        `dataServiceId` - The id of the data service to get the channel from.
        `groupId` - The id of the channel group.
        `country` - The country of the channel.
        `channelId` - The id of the channel.
        `channelName` -
      Returns:
        The specified channel or `null` if the channel wasn't found.
      Since:
        3.3.4

    - #### getPos

          public static int getPos(Channel channel)

      Gets the position of the channel in the subscribed channel array, or -1 if the channel isn't a subscribed channel.
      Parameters:
        `channel` - The channel to get the position for.
      Returns:
        The position or -1

    - #### getAvailableChannels

          public static Channel[] getAvailableChannels()

      Returns:
        The available channels in an array.

    - #### isSubscribedChannel

          public static boolean isSubscribedChannel(Channel channel)

      Returns true, if the specified channel is currently subscribed.
      Parameters:
        `channel` - The channel to check if it is subscribed,
      Returns:
        True if the channel is subscribed, false otherwise.

    - #### getNumberOfSubscribedChannels

          public static int getNumberOfSubscribedChannels()

      Returns the number of subscribed mAvailableChannels.
      Returns:
        The number of the subscribed channels.

    - #### getSubscribedChannels

          public static Channel[] getSubscribedChannels()

      Returns all subscribed mAvailableChannels.
      Returns:
        All subscribed channels in an array.

    - #### getSubscribedChannels

          public static Channel[] getSubscribedChannels(boolean withDummyChannels)

      Returns all subscribed mAvailableChannels.
      Parameters:
        `withDummyChannels` - Include dummy channels?
      Returns:
        The subscribed channels in an array with or without dummy channels.
      Since:
        3.3.4

    - #### getChannelLoadThread

          public static java.lang.Thread getChannelLoadThread()

      Returns:
        The Thread of loading the not used channels.

    - #### loadChannelTimeLimits

          public static void loadChannelTimeLimits()

      Writes the channels time limits to data file.
      Since:
        2.2.4/2.6

    - #### storeChannelTimeLimits

          public static void storeChannelTimeLimits()

      Writes the channels time limits to data file.
      Since:
        2.2.4/2.6

    - #### hasCalledChannelValueChangeForChannel

          public static boolean hasCalledChannelValueChangeForChannel(Channel ch)

      Gets if the channel values are allowed to be changed for the given channel.
      Parameters:
        `ch` - The channel to check if the value change is allowed.
      Returns:
        `True` if the channel value are allowed to be changed, `false` otherwise.

    - #### getChannel

          public static Channel getChannel(java.lang.String uniqueId)

    - #### checkForJointChannels

          public static void checkForJointChannels()

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)