Style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39450 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-11-16 18:19:28 +00:00
parent 490f785868
commit ad8276321c
+32 -27
View File
@@ -2,58 +2,63 @@
* Copyright 2007 Haiku, Inc. * Copyright 2007 Haiku, Inc.
* Copyright (c) 2003-4 Kian Duffy <[email protected]> * Copyright (c) 2003-4 Kian Duffy <[email protected]>
* Copyright (c) 2004 Daniel Furrer <[email protected]> * Copyright (c) 2004 Daniel Furrer <[email protected]>
* Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai. * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* Authors: * Authors:
* Stefano Ceccherini <[email protected]> * Stefano Ceccherini <[email protected]>
* Kian Duffy <[email protected]> * Kian Duffy <[email protected]>
* Kazuho Okui * Kazuho Okui
* Takashi Murai * Takashi Murai
*/ */
#ifndef _SHELL_H #ifndef _SHELL_H
#define _SHELL_H #define _SHELL_H
#include <SupportDefs.h> #include <SupportDefs.h>
// TODO: Maybe merge TermParse and Shell classes ? // TODO: Maybe merge TermParse and Shell classes ?
class TerminalBuffer; class TerminalBuffer;
class TermParse; class TermParse;
class Shell { class Shell {
public: public:
Shell(); Shell();
virtual ~Shell(); virtual ~Shell();
status_t Open(int row, int col, const char* encoding, status_t Open(int row, int col, const char* encoding,
int argc, const char** argv); int argc, const char** argv);
void Close(); void Close();
const char* TTYName() const;
ssize_t Read(void* buffer, size_t numBytes) const; const char* TTYName() const;
ssize_t Write(const void* buffer, size_t numBytes);
status_t UpdateWindowSize(int row, int columns); ssize_t Read(void* buffer, size_t numBytes) const;
ssize_t Write(const void* buffer, size_t numBytes);
status_t GetAttr(struct termios& attr) const; status_t UpdateWindowSize(int row, int columns);
status_t SetAttr(const struct termios& attr);
int FD() const; status_t GetAttr(struct termios& attr) const;
pid_t ProcessID() const { return fProcessID; } status_t SetAttr(const struct termios& attr);
int FD() const;
pid_t ProcessID() const { return fProcessID; }
bool HasActiveProcesses() const;
virtual status_t AttachBuffer(TerminalBuffer* buffer);
virtual void DetachBuffer();
bool HasActiveProcesses() const;
virtual status_t AttachBuffer(TerminalBuffer* buffer);
virtual void DetachBuffer();
private: private:
int fFd; status_t _Spawn(int row, int col, const char* encoding,
pid_t fProcessID; int argc, const char** argv);
TermParse* fTermParse;
bool fAttached;
status_t _Spawn(int row, int col, const char* encoding, private:
int argc, const char** argv); int fFd;
pid_t fProcessID;
TermParse* fTermParse;
bool fAttached;
}; };
#endif // _SHELL_H #endif // _SHELL_H