/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package controller.commands;

import controller.CommandInterface;
import gui.Hauptfenster;
import java.util.logging.Logger;
import logger.OhmLogger;
import model.SIPmodel;

/**
 *
 * @author Jan Muss noch komplett implementiert werden -> Bye bei laufendem
 * Gespräch -> Cancel bei laufender Anfrage, sollte beides recht schnell gehen
 * wenn ihr Lust habt.
 *
 */
public class CommandBeenden implements CommandInterface
{
  private static final Logger lginvite = OhmLogger.getLogger();
  private SIPmodel model;
  private Hauptfenster view;

  public CommandBeenden(SIPmodel model, Hauptfenster view)
  {
    this.model = model;
    this.view = view;
  }

  @Override
  public void execute()
  {

    view.getTxtArea().append("Anruf beenden\n");
    try
    {
      model.byecall(view.getTxtcallUser().getText());
    }
    catch (Exception e)
    {
    }
  }

  @Override
  public void undo()
  {

  }

  @Override
  public Boolean isundoable()
  {
    return false;
  }
}
