Package captureplugin.drivers.topfield.connector

Examples of captureplugin.drivers.topfield.connector.TopfieldConnector


    configuration.setUsername(username);
    configuration.setPassword(new String(password));
    configuration.setDefaultPreroll((Integer) defaultPrerollSpinner.getValue());
    configuration.setDefaultPostroll((Integer) defaultPostrollSpinner.getValue());

    TopfieldConnector connector = new TopfieldConnector(configuration);

    try {
      deviceChannels = connector.getDeviceChannels();
      configuration.setDeviceChannels(deviceChannels);
      waitWindow.setVisible(false);
      this.setEnabled(true);
    } catch (TopfieldConnectionException e) {
      waitWindow.setVisible(false);
View Full Code Here


      ProgramTimeDialog recordDialog = new ProgramTimeDialog(parent, time, true, localizer.msg(REPEAT_LABEL,
          DEFAULT_REPEAT_LABEL), repeatSelector);
      UiUtilities.centerAndShow(recordDialog);
      ProgramTime programToRecord = recordDialog.getPrgTime();
      if (programToRecord != null) {
        TopfieldConnector connector = new TopfieldConnector(configuration);
        boolean recordingAdded = false;
        try {
          recordingAdded = connector.addRecording(parent, service, programToRecord, (TopfieldTimerMode) repeatSelector
              .getSelectedItem());
        } catch (TopfieldConnectionException e) {
          String message = String.format(localizer.msg(DEVICE_UNREACHABLE_TEXT, DEFAULT_DEVICE_UNREACHABLE_TEXT), name);
          JOptionPane.showMessageDialog(parent, message, localizer.msg(DEVICE_UNREACHABLE_TITLE,
              DEFAULT_DEVICE_UNREACHABLE_TITLE), JOptionPane.ERROR_MESSAGE);
View Full Code Here

   * captureplugin.drivers.DeviceIf#checkProgramsAfterDataUpdateAndGetDeleted()
   */
  @Override
  public Program[] checkProgramsAfterDataUpdateAndGetDeleted() {
    if (!configuration.isRecordingsLocal()) {
      TopfieldConnector connector = new TopfieldConnector(configuration);
      try {
        connector.getTimerList();
      } catch (TopfieldConnectionException e) {
        String message = String.format(localizer.msg(DEVICE_UNREACHABLE_TEXT, DEFAULT_DEVICE_UNREACHABLE_TEXT), name);
        JOptionPane.showMessageDialog(null, message, localizer.msg(DEVICE_UNREACHABLE_TITLE,
            DEFAULT_DEVICE_UNREACHABLE_TITLE), JOptionPane.ERROR_MESSAGE);
      }
View Full Code Here

        Calendar end = time.getEndAsCalendar();
        end.add(Calendar.MINUTE, configuration.getChannelPostroll(program.getChannel()));
        time.setEnd(end.getTime());

        TopfieldConnector connector = new TopfieldConnector(configuration);
        boolean timerAdded = false;
        try {
          timerAdded = connector.addPTimer(parent, service, time);
        } catch (TopfieldConnectionException e) {
          String message = String.format(localizer.msg(DEVICE_UNREACHABLE_TEXT, DEFAULT_DEVICE_UNREACHABLE_TEXT), name);
          JOptionPane.showMessageDialog(parent, message, localizer.msg(DEVICE_UNREACHABLE_TITLE,
              DEFAULT_DEVICE_UNREACHABLE_TITLE), JOptionPane.ERROR_MESSAGE);
        } catch (TopfieldServiceException e) {
View Full Code Here

   * )
   */
  @Override
  public Program getProgramForProgramInList(Program p) {
    if (!configuration.isRecordingsLocal()) {
      TopfieldConnector connector = new TopfieldConnector(configuration);
      try {
        connector.getTimerList();
      } catch (TopfieldConnectionException e) {
        String message = String.format(localizer.msg(DEVICE_UNREACHABLE_TEXT, DEFAULT_DEVICE_UNREACHABLE_TEXT), name);
        JOptionPane.showMessageDialog(null, message, localizer.msg(DEVICE_UNREACHABLE_TITLE,
            DEFAULT_DEVICE_UNREACHABLE_TITLE), JOptionPane.ERROR_MESSAGE);
      }
View Full Code Here

   * @see captureplugin.drivers.DeviceIf#getProgramList()
   */
  @Override
  public Program[] getProgramList() {
    if (!configuration.isRecordingsLocal()) {
      TopfieldConnector connector = new TopfieldConnector(configuration);
      try {
        connector.getTimerList();
      } catch (TopfieldConnectionException e) {
        String message = String.format(localizer.msg(DEVICE_UNREACHABLE_TEXT, DEFAULT_DEVICE_UNREACHABLE_TEXT), name);
        JOptionPane.showMessageDialog(null, message, localizer.msg(DEVICE_UNREACHABLE_TITLE,
            DEFAULT_DEVICE_UNREACHABLE_TITLE), JOptionPane.ERROR_MESSAGE);
      }
View Full Code Here

   * @see captureplugin.drivers.DeviceIf#isInList(devplugin.Program)
   */
  @Override
  public boolean isInList(Program program) {
    if (!configuration.isRecordingsLocal()) {
      TopfieldConnector connector = new TopfieldConnector(configuration);
      try {
        connector.getTimerList();
      } catch (TopfieldConnectionException e) {
        String message = String.format(localizer.msg(DEVICE_UNREACHABLE_TEXT, DEFAULT_DEVICE_UNREACHABLE_TEXT), name);
        JOptionPane.showMessageDialog(null, message, localizer.msg(DEVICE_UNREACHABLE_TITLE,
            DEFAULT_DEVICE_UNREACHABLE_TITLE), JOptionPane.ERROR_MESSAGE);
      }
View Full Code Here

   * @see captureplugin.drivers.DeviceIf#remove(java.awt.Window,
   * devplugin.Program)
   */
  @Override
  public boolean remove(Window parent, Program program) {
    TopfieldConnector connector = new TopfieldConnector(configuration);
    if (!configuration.isRecordingsLocal()) {
      try {
        connector.getTimerList();
      } catch (TopfieldConnectionException e) {
        String message = String.format(localizer.msg(DEVICE_UNREACHABLE_TEXT, DEFAULT_DEVICE_UNREACHABLE_TEXT), name);
        JOptionPane.showMessageDialog(parent, message, localizer.msg(DEVICE_UNREACHABLE_TITLE,
            DEFAULT_DEVICE_UNREACHABLE_TITLE), JOptionPane.ERROR_MESSAGE);
      }
    }

    for (TopfieldTimerEntry entry : configuration.getTimerEntries()) {
      if (entry.getProgram().getProgram().equals(program)) {
        if (!configuration.isRecordingsLocal()) {
          try {
            return connector.deleteRecording(parent, entry);
          } catch (TopfieldConnectionException e) {
            String message = String.format(localizer.msg(DEVICE_UNREACHABLE_TEXT, DEFAULT_DEVICE_UNREACHABLE_TEXT),
                name);
            JOptionPane.showMessageDialog(parent, message, localizer.msg(DEVICE_UNREACHABLE_TITLE,
                DEFAULT_DEVICE_UNREACHABLE_TITLE), JOptionPane.ERROR_MESSAGE);
View Full Code Here

TOP

Related Classes of captureplugin.drivers.topfield.connector.TopfieldConnector

Copyright © 2015 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.