Package tvdataservice

Examples of tvdataservice.MutableChannelDayProgram


   * @param date The date of the wanted ChannelDayProgram.
   * @param channel The channel of the wanted ChannelDayProgram.
   * @return The ChannelDayProgram of the specified date and channel.
   */
  public MutableChannelDayProgram getChannelDayProgram(Date date, Channel channel) {
    MutableChannelDayProgram channelDayProgram
      = getChannelDayProgram(date, channel, false);

    /*
    if (channelDayProgram != null) {
      mLog.info("Found " + channelDayProgram.getProgramCount()
View Full Code Here


        return null;
      }
    }

    // get the MutableChannelDayProgram
    MutableChannelDayProgram channelDayProg
      = channelDayProgramHash.get(channel);
    if (channelDayProg == null) {
      if (createIfNotExisting) {
        channelDayProg = new MutableChannelDayProgram(date, channel);
        channelDayProgramHash.put(channel, channelDayProg);
      } else {
        return null;
      }
    }
View Full Code Here

  private boolean mValid;

  private boolean mTimeLimitationlData;

  public OnDemandDayProgramFile(File file, Date date, Channel channel) {
    this(file, new MutableChannelDayProgram(date, channel));
  }
View Full Code Here

        // Get the channel and date
        Channel channel = getChannelFromFileName(key, channelArr, channelIdArr);
        if ((channel != null) && (date != null)) {
          mLog.info("Day program was deleted by third party: " + date + " on "
              + channel.getName());
          ChannelDayProgram dummyProg = new MutableChannelDayProgram(date,
              channel);
          fireDayProgramTouched(dummyProg, null);
          fireDayProgramDeleted(dummyProg);

          mTvDataInventory.setUnknown(date, channel);
View Full Code Here

      // Check whether this day program is known
      int version = (int) file.length();
      int knownStatus = mTvDataInventory.getKnownStatus(date, channel, version);

      OnDemandDayProgramFile oldProgFile = getCacheEntry(date, channel, false, false);
      MutableChannelDayProgram checkProg = (MutableChannelDayProgram)getDayProgram(date,channel,true);

      boolean somethingChanged = calculateMissingLengths(checkProg);

      Object oldProg = null;
      if((oldProg = mNewDayProgramsAfterUpdate.remove(key)) != null) {
        // Inform the listeners about deleting the old program
        if (oldProg instanceof ChannelDayProgram) {
          fireDayProgramDeleted((ChannelDayProgram)oldProg);
        }

        // Inform the listeners about adding the new program
        fireDayProgramAdded(checkProg);
      }
      else if(somethingChanged){
        fireDayProgramAdded(checkProg);
      }

      if (checkProg.getAndResetChangedByPluginState() || somethingChanged) {
        // Some missing lengths could now be calculated
        // -> Try to save the changes

        // We use a temporary file. If saving succeeds we rename it
        File tempFile = new File(file.getAbsolutePath() + ".changed");
View Full Code Here

      if (knownStatus == TvDataInventory.OTHER_VERSION) {
        // The day program was replaced -> fire a deleted event
        // (And later an added event)

        // Since we don't have the old day program we use a dummy program
        ChannelDayProgram dayProg = new MutableChannelDayProgram(date, channel);
        fireDayProgramTouched(dayProg, null);
        fireDayProgramDeleted(dayProg);
      }

      // Set the day program to 'known'
View Full Code Here

TOP

Related Classes of tvdataservice.MutableChannelDayProgram

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.