/*

                                   _JNJ`                        
                               .JNMH`                           
                              JMMF`       `;.                   
                            .NMM)          `MN.                 
                            MMM)            (MML                
                           (MMM`             MMML               
                     M  I  D  N  I  G  H  T    C  o  D  E       
                           (NMMF             MHNH               
                            NMML            .MMM                
                             NMML          .NMH                 
                              4MMNL       .#F                   
                               `4HNNL_   `                      
                                   `"""`                        

                          Copyright (C) 2004-2007
       "Ian (Larry) Latter" <ian dot latter at midnightcode dot org>

    Midnight Code is a registered trademark of Ian Latter.

    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, and mirrored at the Midnight Code web
    site; as at version 2 of the License only.
  
    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
    (version 2) along with this program; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA, or see http://midnightcode.org/gplv2.txt

*/


/* midnightcode-terminal.h :: Midnight Code terminal/console library	*/


#ifndef __MIDNIGHTCODE_TERMINAL_H
#define __MIDNIGHTCODE_TERMINAL_H 1


#define MIDNIGHTCODE_TERMINAL_DEFAULT_SHELL     "/bin/ash"
#define MIDNIGHTCODE_TERMINAL_DEFAULT_CONSOLE   "/dev/console"

#define MIDNIGHTCODE_TERMINAL_ENV_PS1                           \
          "PS1=[\\[\\e[30;1m\\]\\w\\[\\e[0m\\]]_\\$ "
#define MIDNIGHTCODE_TERMINAL_ENV_PS2                           \
          "PS2=[\\[\\e[30;1m\\]\\w\\[\\e[0m\\]]-\\$ "
#define MIDNIGHTCODE_TERMINAL_ENV_PS3                           \
          "PS3=[\\[\\e[30;1m\\]\\w\\[\\e[0m\\]]=\\$ "
#define MIDNIGHTCODE_TERMINAL_ENV_PATH                          \
          "PATH=/bin:/sbin:/usr/bin:/usr/sbin"

enum midnightcode_terminal_environment_t
{
  MIDNIGHTCODE_TERMINAL_ENVIRONMENT_UNKNOWN = 0,
  MIDNIGHTCODE_TERMINAL_ENVIRONMENT_PATH = 1,
  MIDNIGHTCODE_TERMINAL_ENVIRONMENT_SHELL = 2,
  MIDNIGHTCODE_TERMINAL_ENVIRONMENT_ALL = 255
};

enum midnightcode_terminal_display_t
{
  MIDNIGHTCODE_TERMINAL_DISPLAY_UNKNOWN = 0,
  MIDNIGHTCODE_TERMINAL_DISPLAY_LOGO = 1,
  MIDNIGHTCODE_TERMINAL_DISPLAY_ISSUE = 2,
  MIDNIGHTCODE_TERMINAL_DISPLAY_SHELL = 4,
  MIDNIGHTCODE_TERMINAL_DISPLAY_ALL = 255
};

enum midnightcode_terminal_control_t
{
  MIDNIGHTCODE_TERMINAL_CONTROL_UNKNOWN = 0,
  MIDNIGHTCODE_TERMINAL_CONTROL_UNIX = 1,
  MIDNIGHTCODE_TERMINAL_CONTROL_KEYPRESS = 2
};

enum midnightcode_terminal_virtual_t
{
  MIDNIGHTCODE_TERMINAL_VIRTUAL_NULL = 0,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_1,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_2,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_3,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_4,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_5,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_6,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_7,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_8,
  MIDNIGHTCODE_TERMINAL_VIRTUAL_9
};


int midnightcode_terminal_console_open(int * fd);
int midnightcode_terminal_console_close(void);
int midnightcode_terminal_console_usurp(int * fd);
int midnightcode_terminal_virtual_open(int terminal, int options);
int midnightcode_terminal_virtuals_open(int terminals, int options);
int midnightcode_terminal_environment(int options);
int midnightcode_terminal_properties(int terminal, int options);


#endif
