[CONSRV]: Use an optional parameter for passing things to the "line discipline" funct...
[reactos.git] / win32ss / user / winsrv / consrv / condrv / dummyterm.c
index 3b38329..73cbe8f 100644 (file)
@@ -25,20 +25,54 @@ DummyDeinitTerminal(IN OUT PTERMINAL This)
 {
 }
 
-static VOID NTAPI
-DummyDrawRegion(IN OUT PTERMINAL This,
-                SMALL_RECT* Region)
-{
+
+
+/************ Line discipline ***************/
+
+static NTSTATUS NTAPI
+DummyReadStream(IN OUT PTERMINAL This,
+                IN BOOLEAN Unicode,
+                /**PWCHAR Buffer,**/
+                OUT PVOID Buffer,
+                IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
+                IN PVOID Parameter OPTIONAL,
+                IN ULONG NumCharsToRead,
+                OUT PULONG NumCharsRead OPTIONAL)
+{
+    /*
+     * We were called because the console was in cooked mode.
+     * There is nothing to read, wait until a real terminal
+     * is plugged into the console.
+     */
+    return STATUS_PENDING;
 }
 
-static VOID NTAPI
+static NTSTATUS NTAPI
 DummyWriteStream(IN OUT PTERMINAL This,
-                 SMALL_RECT* Region,
-                 SHORT CursorStartX,
-                 SHORT CursorStartY,
-                 UINT ScrolledLines,
+                 PTEXTMODE_SCREEN_BUFFER Buff,
                  PWCHAR Buffer,
-                 UINT Length)
+                 DWORD Length,
+                 BOOL Attrib)
+{
+    /*
+     * We were called because the console was in cooked mode.
+     * There is nothing to write, wait until a real terminal
+     * is plugged into the console.
+     */
+
+    // /* Stop here if the console is paused */
+    // if (Console->UnpauseEvent != NULL) return STATUS_PENDING;
+
+    return STATUS_PENDING;
+}
+
+/************ Line discipline ***************/
+
+
+
+static VOID NTAPI
+DummyDrawRegion(IN OUT PTERMINAL This,
+                SMALL_RECT* Region)
 {
 }
 
@@ -74,26 +108,12 @@ DummyReleaseScreenBuffer(IN OUT PTERMINAL This,
 {
 }
 
-static VOID NTAPI
-DummyChangeTitle(IN OUT PTERMINAL This)
-{
-}
-
 static VOID NTAPI
 DummyGetLargestConsoleWindowSize(IN OUT PTERMINAL This,
                                  PCOORD pSize)
 {
 }
 
-/*
-static BOOL NTAPI
-DummyGetSelectionInfo(IN OUT PTERMINAL This,
-                      PCONSOLE_SELECTION_INFO pSelectionInfo)
-{
-    return TRUE;
-}
-*/
-
 static BOOL NTAPI
 DummySetPalette(IN OUT PTERMINAL This,
                 HPALETTE PaletteHandle,
@@ -113,16 +133,17 @@ static TERMINAL_VTBL DummyVtbl =
 {
     DummyInitTerminal,
     DummyDeinitTerminal,
-    DummyDrawRegion,
+
+    DummyReadStream,
     DummyWriteStream,
+
+    DummyDrawRegion,
     DummySetCursorInfo,
     DummySetScreenInfo,
     DummyResizeTerminal,
     DummySetActiveScreenBuffer,
     DummyReleaseScreenBuffer,
-    DummyChangeTitle,
     DummyGetLargestConsoleWindowSize,
-    // DummyGetSelectionInfo,
     DummySetPalette,
     DummyShowMouseCursor,
 };