Home » Tutorials » An Introduction To MHP » The org.dvb.si.SIDatabase Class

The org.dvb.si.SIDatabase Class

As we can see from the interface shown in full below, this is not a small interface.

public class SIDatabase {

  public static SIDatabase[] getSIDatabase();

  public SIRequest retrieveSIBouquets(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    int bouquetId,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrieveActualSINetwork(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrieveSINetworks(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    int networkId,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrieveActualSITransportStream(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrieveActualSIServices(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrieveSIServices(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    int originalNetworkId,
    int transportStreamId,
    int serviceId,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrieveSIService(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    org.davic.net.dvb.DvbLocator dvbLocator,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrievePMTServices(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    int serviceId,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrievePMTService(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    org.davic.net.dvb.DvbLocator dvbLocator,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrievePMTElementaryStreams(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    int serviceId,
    int componentTag,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrievePMTElementaryStreams(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    org.davic.net.dvb.DvbLocator dvbLocator,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrieveSITimeFromTDT(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener)
    throws SIIllegalArgumentException;

  public SIRequest retrieveSITimeFromTOT(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public SIRequest retrieveSITransportStreamDescription(
    short retrieveMode,
    Object appData,
    SIRetrievalListener listener,
    short[] someDescriptorTags)
    throws SIIllegalArgumentException;

  public void addNetworkMonitoringListener(
    SIMonitoringListener listener,
    int networkId)
    throws SIIllegalArgumentException;

  public void removeNetworkMonitoringListener(
    SIMonitoringListener listener,
    int networkId)
    throws SIIllegalArgumentException;

  public void addBouquetMonitoringListener(
    SIMonitoringListener listener,
    int bouquetId)
    throws SIIllegalArgumentException;

  public void removeBouquetMonitoringListener(
    SIMonitoringListener listener,
    int bouquetId)
    throws SIIllegalArgumentException;

  public void addServiceMonitoringListener(
    SIMonitoringListener listener,
    int originalNetworkId,
    int transportStreamId)
    throws SIIllegalArgumentException;

  public void removeServiceMonitoringListener(
    SIMonitoringListener listener,
    int originalNetworkId,
    int transportStreamId)
    throws SIIllegalArgumentException;

  public void addPMTServiceMonitoringListener(
    SIMonitoringListener listener,
    int originalNetworkId,
    int transportStreamId,
    int serviceId)
    throws SIIllegalArgumentException;

  public void removePMTServiceMonitoringListener(
	SIMonitoringListener listener,
    int originalNetworkId,
    int transportStreamId,
    int serviceId)
    throws SIIllegalArgumentException;

  public void addEventPresentFollowingMonitoringListener(
    SIMonitoringListener listener,
    int originalNetworkId,
    int transportStreamId,
    int serviceId)
    throws SIIllegalArgumentException;

  public void removeEventPresentFollowingMonitoringListener(
    SIMonitoringListener listener,
    int originalNetworkId,
    int transportStreamId,
    int serviceId)
    throws SIIllegalArgumentException;

  public void addEventScheduleMonitoringListener(
    SIMonitoringListener listener,
    int originalNetworkId,
    int transportStreamId,
    int serviceId,
    java.util.Date startTime,
    java.util.Date endTime)
    throws SIIllegalArgumentException,
           SIInvalidPeriodException;

  public void removeEventScheduleMonitoringListener(
    SIMonitoringListener listener,
    int originalNetworkId,
    int transportStreamId,
    int serviceId)
    throws SIIllegalArgumentException;
}

This isn’t actually as scary as it looks. No, really, I mean that. Many of the methods (the ones that we didn’t show in the smaller version) register and unregister listeners for various types of events related to tables in the SI database. These allow applications to be notified whenever a specific set of information in an SI table changes.

Similarly, although most of the methods for retrieving information look very complex, the first three parameters are always the same. These are described in the main page.