diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-20 15:21:26 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-20 15:21:26 +0100 |
commit | cab353cbb21c142ac1e227d42338fa587e1a7f24 (patch) | |
tree | 618c50ba58cc3186b3b82a3df2561063d4aaee85 /Source/Library/Userland/Binding | |
parent | 07a73aea7acbf0d9f9182bc3557583aa17af0000 (diff) | |
download | Melon-cab353cbb21c142ac1e227d42338fa587e1a7f24.tar.gz Melon-cab353cbb21c142ac1e227d42338fa587e1a7f24.zip |
Worked on IStream. Seems to work
Diffstat (limited to 'Source/Library/Userland/Binding')
-rw-r--r-- | Source/Library/Userland/Binding/Process.class.h | 4 | ||||
-rw-r--r-- | Source/Library/Userland/Binding/VirtualTerminal.class.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Source/Library/Userland/Binding/Process.class.h b/Source/Library/Userland/Binding/Process.class.h index 2200f59..e94084b 100644 --- a/Source/Library/Userland/Binding/Process.class.h +++ b/Source/Library/Userland/Binding/Process.class.h @@ -54,10 +54,10 @@ class Process : public RessourceCaller { void pushArg(const String& arg) { doCall(PRIF_PUSHARG, (u32int)&arg); } - void setInVT(VirtualTerminal vt) { + void setInVT(const VirtualTerminal& vt) { doCall(PRIF_SETINVT, vt.resId()); } - void setOutVT(VirtualTerminal vt) { + void setOutVT(const VirtualTerminal& vt) { doCall(PRIF_SETOUTVT, vt.resId()); } bool authenticatePW(String user, String pw) { diff --git a/Source/Library/Userland/Binding/VirtualTerminal.class.h b/Source/Library/Userland/Binding/VirtualTerminal.class.h index df44124..6576c1c 100644 --- a/Source/Library/Userland/Binding/VirtualTerminal.class.h +++ b/Source/Library/Userland/Binding/VirtualTerminal.class.h @@ -7,9 +7,10 @@ #include <Kbd.iface.h> #include <OStream.proto.h> +#include <IStream.proto.h> #include <WChar.class.h> -class VirtualTerminal : public RessourceCaller, public OStream { +class VirtualTerminal : public RessourceCaller, public OStream, public IStream { public: static VirtualTerminal getIn() { u32int id = RessourceCaller::sCall(VTIF_OBJTYPE, VTIF_SGETPRINVT); @@ -30,6 +31,9 @@ class VirtualTerminal : public RessourceCaller, public OStream { void write(const String &s) { doCall(VTIF_WRITE, (u32int)&s); } + String read() { + return String::unserialize(doCall(VTIF_READLINE, 1)) += "\n"; + } keypress_t getKeypress(bool show = true, bool block = true) { keypress_t* ptr = (keypress_t*)doCall(VTIF_GETKEYPRESS, (show ? 1 : 0) | (block ? 2 : 0)); return *ptr; |