/* This file is part of "Telnet Floyd".
 *
 * (c) Radek Polak 2003-2004. All Rights Reserved.
 *
 * Please visit project homepage at http://phoenix.inf.upol.cz/~polakr
 *
 * --LICENSE NOTICE--
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 * --LICENSE NOTICE--
 *
 */

package telnet;

/**
 * Class that represent user action. Example action is e.g. action
 * "connect to host 127.0.0.1" or "enter string logout". Each action has up to
 * 4 parameters. First is label that tells us what to do. This number is stored
 * in variable "funct". Other three parameters can be passed to the method, that
 * executes actions (see MidletTerminal.keyPressed function).
 */

public class Action {

  public final static String INPUT_DIALOG = "input dialog";
  public final static String KEY_PRESSED = "key pressed";
  public final static String KEY_TYPED = "key typed";
  public final static String TYPE_STRING = "type string";
  public final static String ENTER_STRING = "enter string";
  public final static String SHOW_HELP = "show help";
  public final static String SCROLL_UP = "scroll up";
  public final static String SCROLL_DOWN = "scroll down";
  public final static String SCROLL_LEFT = "scroll left";
  public final static String SCROLL_RIGH = "scroll right";
  public final static String SET_SCREEN_SIZE = "set size";
  public final static String CONNECT = "connect";
  public final static String TRAFFIC = "traffic";
  public final static String BG_COLOR = "back color";
  public final static String FG_COLOR = "fore color";
  public final static String VIEW_CONSOLE = "view console";
  public final static String SET_SCOLLBACK_SIZE = "set scrollback size";
  public final static String SCOLLBACK_UP = "scrollback up";
  public final static String SCOLLBACK_DOWN = "scrollback down";
  public final static String SHOW_TERMINAL_SIZE = "show terminal size";
  public final static String SET_SLEEP_TIME = "set sleep time";
  public final static String KEEP_CONNECTION_TIME = "keep connection time";
  public final static String EXIT_APP = "exit this application";

  public final static int INPUT_DIALOG_HASH = 619943518;
  public final static int KEY_PRESSED_HASH = -1709828255;
  public final static int KEY_TYPED_HASH = 846825321;
  public final static int TYPE_STRING_HASH = 800818103;
  public final static int ENTER_STRING_HASH = -578494887;
  public final static int SHOW_HELP_HASH = -1961870716;
  public final static int SCROLL_UP_HASH = 417730766;
  public final static int SCROLL_DOWN_HASH = 2006803989;
  public final static int SCROLL_LEFT_HASH = 2007032186;
  public final static int SCROLL_RIGH_HASH = 2094116617;
  public final static int SET_SCREEN_SIZE_HASH = 1357349119;
  public final static int CONNECT_HASH = 951351530;
  public final static int TRAFFIC_HASH = -1067310595;
  public final static int BG_COLOR_HASH = 916242154;
  public final static int FG_COLOR_HASH = -62074113;
  public final static int VIEW_CONSOLE_HASH = 525682396;
  public final static int SET_SCOLLBACK_SIZE_HASH = 513124271;
  public final static int SCOLLBACK_UP_HASH = -1553380089;
  public final static int SCOLLBACK_DOWN_HASH = 1849849870;
  public final static int SHOW_TERMINAL_SIZE_HASH = -2023294142;
  public final static int SET_SLEEP_TIME_HASH = -1895224076;
  public final static int KEEP_CONNECTION_TIME_HASH = 656383028;
  public final static int EXIT_APP_HASH = -514479728;

  public String funct,arg0,arg1,arg2;

  public Action( String funct ) {
    this( funct, "", "", "" );
  }

  public Action( String funct, String arg0 ) {
    this( funct, arg0, "", "" );
  }

  public Action( String funct, String arg0, String arg1 ) {
    this( funct, arg0, arg1, "" );
  }

  public Action( String funct, String arg0, String arg1, String arg2 ) {
    this.funct = funct;
    this.arg0 = arg0;
    this.arg1 = arg1;
    this.arg2 = arg2;
  }
}