001: /*
002: * SSHTools - Java SSH2 API
003: *
004: * Copyright (C) 2002-2003 Lee David Painter and Contributors.
005: *
006: * Contributions made by:
007: *
008: * Brett Smith
009: * Richard Pernavas
010: * Erwin Bolwidt
011: *
012: * This program is free software; you can redistribute it and/or
013: * modify it under the terms of the GNU General Public License
014: * as published by the Free Software Foundation; either version 2
015: * of the License, or (at your option) any later version.
016: *
017: * This program is distributed in the hope that it will be useful,
018: * but WITHOUT ANY WARRANTY; without even the implied warranty of
019: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
020: * GNU General Public License for more details.
021: *
022: * You should have received a copy of the GNU General Public License
023: * along with this program; if not, write to the Free Software
024: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
025: */
026: /**
027: * SSHTools - Java SSH API The contents of this package has been derived from
028: * the TelnetD library available from http://sourceforge.net/projects/telnetd
029: * The original license of the source code is as follows: TelnetD library
030: * (embeddable telnet daemon) Copyright (C) 2000 Dieter Wimberger This library
031: * is free software; you can either redistribute it and/or modify it under the
032: * terms of the GNU Lesser General Public License version 2.1,1999 as
033: * published by the Free Software Foundation (see copy received along with the
034: * library), or under the terms of the BSD-style license received along with
035: * this library.
036: */package com.sshtools.daemon.terminal;
037:
038: /**
039: *
040: *
041: * @author $author$
042: * @version $Revision: 1.11 $
043: */
044: public interface Terminal {
045: //Constants
046:
047: /** */
048: public static final byte EOT = 4;
049:
050: /** */
051: public static final byte BS = 8;
052:
053: /** */
054: public static final byte DEL = 127;
055:
056: /** */
057: public static final byte HT = 9;
058:
059: /** */
060: public static final byte FF = 12;
061:
062: /** */
063: public static final byte SGR = 1;
064:
065: /** */
066: public static final byte CAN = 24;
067:
068: /** */
069: public static final byte ESC = 27;
070:
071: /** */
072: public static final byte LSB = 91;
073:
074: /** */
075: public static final byte SEMICOLON = 59;
076:
077: /** */
078: public static final byte A = 65;
079:
080: /** */
081: public static final byte B = 66;
082:
083: /** */
084: public static final byte C = 67;
085:
086: /** */
087: public static final byte D = 68;
088:
089: /** */
090: public static final byte E = 69; // for next Line (like CR/LF)
091:
092: /** */
093: public static final byte H = 72; // for Home and Positionsetting or f
094:
095: /** */
096: public static final byte f = 102;
097:
098: /** */
099: public static final byte r = 114;
100:
101: /** */
102: public static final byte LE = 75; // K...line erase actions related
103:
104: /** */
105: public static final byte SE = 74; // J...screen erase actions related
106:
107: /**
108: *
109: *
110: * @return
111: */
112: public String getName();
113:
114: /**
115: *
116: *
117: * @param byteread
118: *
119: * @return
120: */
121: public int translateControlCharacter(int byteread);
122:
123: /**
124: *
125: *
126: * @param buffer
127: *
128: * @return
129: */
130: public int translateEscapeSequence(int[] buffer);
131:
132: /**
133: *
134: *
135: * @param eraseFunc
136: *
137: * @return
138: */
139: public byte[] getEraseSequence(int eraseFunc);
140:
141: /**
142: *
143: *
144: * @param dir
145: * @param times
146: *
147: * @return
148: */
149: public byte[] getCursorMoveSequence(int dir, int times);
150:
151: /**
152: *
153: *
154: * @param pos
155: *
156: * @return
157: */
158: public byte[] getCursorPositioningSequence(int[] pos);
159:
160: /**
161: *
162: *
163: * @param sequence
164: *
165: * @return
166: */
167: public byte[] getSpecialSequence(int sequence);
168:
169: /**
170: *
171: *
172: * @param topmargin
173: * @param bottommargin
174: *
175: * @return
176: */
177: public byte[] getScrollMarginsSequence(int topmargin,
178: int bottommargin);
179:
180: /**
181: *
182: *
183: * @param type
184: * @param param
185: *
186: * @return
187: */
188: public byte[] getGRSequence(int type, int param);
189:
190: /**
191: *
192: *
193: * @param str
194: *
195: * @return
196: */
197: public String format(String str);
198:
199: /**
200: *
201: *
202: * @return
203: */
204: public byte[] getInitSequence();
205:
206: /**
207: *
208: *
209: * @return
210: */
211: public boolean supportsSGR();
212:
213: /**
214: *
215: *
216: * @return
217: */
218: public boolean supportsScrolling();
219:
220: /**
221: *
222: *
223: * @return
224: */
225: public int getAtomicSequenceLength();
226: }
227:
228: //interface Terminal
|