2 * Copyright 2007 Haiku, Inc.
3 * Copyright (c) 2003-4 Kian Duffy <myob@users.sourceforge.net>
4 * Copyright (c) 2004 Daniel Furrer <assimil8or@users.sourceforge.net>
5 * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
6 * Distributed under the terms of the MIT License.
8 * Stefano Ceccherini <stefano.ceccherini@gmail.com>
9 * Kian Duffy <myob@users.sourceforge.net>
17 #include "ShellInfo.h"
20 class ActiveProcessInfo
;
21 class ShellParameters
;
22 // TODO: Maybe merge TermParse and Shell classes ?
32 status_t
Open(int row
, int col
,
33 const ShellParameters
& parameters
);
36 const char* TTYName() const;
38 ssize_t
Read(void* buffer
, size_t numBytes
) const;
39 ssize_t
Write(const void* buffer
, size_t numBytes
);
41 status_t
UpdateWindowSize(int row
, int columns
);
43 status_t
GetAttr(struct termios
& attr
) const;
44 status_t
SetAttr(const struct termios
& attr
);
47 pid_t
ProcessID() const
48 { return fShellInfo
.ProcessID(); }
49 const ShellInfo
& Info() const
50 { return fShellInfo
; }
53 { return fShellInfo
.Encoding(); }
54 void SetEncoding(int encoding
)
55 { fShellInfo
.SetEncoding(encoding
); }
57 bool HasActiveProcesses() const;
58 bool GetActiveProcessInfo(
59 ActiveProcessInfo
& _info
) const;
61 virtual status_t
AttachBuffer(TerminalBuffer
* buffer
);
62 virtual void DetachBuffer();
65 status_t
_Spawn(int row
, int col
,
66 const ShellParameters
& parameters
);
72 TermParse
* fTermParse
;