package de.reinhardt_karlheinz.pcc.interfaces;

import java.io.File;

/**
 * Interface for a PCConnection Plugin<br>
 * <br>
 * (c) Copyright 2012, Karlheinz Reinhardt. All rights reserved.<br>
 * 
 * @author Karlheinz Reinhardt
 * @version 0.0.9
 * 
 */
public interface PCCPlugin {
  /**
   * returns the name of the plugin as a String<br>
   * 
   * @return name of plugin
   */
  public String getName();

  /**
   * returns the version as a String<br>
   * 
   * @return version
   */
  public String getVersion();

  /**
   * returns the name of the author as a String<br>
   * 
   * @return name of author
   */
  public String getAuthor();

  /**
   * short summary what the plugin does.<br>
   * 
   * @return short information
   */
  public String getInformation();

  /**
   * Invoked when plugin is loaded<br>
   * 
   * @param plgIntfc
   *          PluginInterface
   */
  public void onPluginStart(PCCPluginInterface plgIntfc);

  /**
   * Invoked when plugin should be shown.<br>
   * will mostly be invoked by the Pluginmanager.<br>
   */
  public void onPluginShow();

  /**
   * Invoked when plugin should be hidden.<br>
   * will mostly be invoked by the Pluginmanager.<br>
   */
  public void onPluginHide();

  /**
   * Invoked when plugin should be closed.<br>
   */
  public void onPluginClose();

  /**
   * Invoked when connection is established
   */
  public void onConnectionEstablished();

  /**
   * Invoked when connection is lost
   */
  public void onConnectionLost();

  /**
   * Invoked when message received
   */
  public void onMessageReceived(String msg);

  // TODO review if useful/unnecessary
  /**
   * Invoked when command received
   */
  public void onCommandReceived(String cmd);

  /**
   * Invoked when file received
   */
  public void onFileReceived(File file);
}
