1 module eventcore.drivers.winapi.pipes; 2 3 version (Windows): 4 5 import eventcore.driver; 6 import eventcore.internal.win32; 7 8 final class WinAPIEventDriverPipes : EventDriverPipes { 9 @safe: /*@nogc:*/ nothrow: 10 override PipeFD adopt(int system_pipe_handle) 11 { 12 assert(false, "TODO!"); 13 } 14 15 override void read(PipeFD pipe, ubyte[] buffer, IOMode mode, PipeIOCallback on_read_finish) 16 { 17 if (!isValid(pipe)) { 18 on_read_finish(pipe, IOStatus.invalidHandle, 0); 19 return; 20 } 21 22 assert(false, "TODO!"); 23 } 24 25 override void cancelRead(PipeFD pipe) 26 { 27 if (!isValid(pipe)) return; 28 29 assert(false, "TODO!"); 30 } 31 32 override void write(PipeFD pipe, const(ubyte)[] buffer, IOMode mode, PipeIOCallback on_write_finish) 33 { 34 if (!isValid(pipe)) { 35 on_write_finish(pipe, IOStatus.invalidHandle, 0); 36 return; 37 } 38 39 assert(false, "TODO!"); 40 } 41 42 override void cancelWrite(PipeFD pipe) 43 { 44 if (!isValid(pipe)) return; 45 46 assert(false, "TODO!"); 47 } 48 49 override void waitForData(PipeFD pipe, PipeIOCallback on_data_available) 50 { 51 if (!isValid(pipe)) return; 52 53 assert(false, "TODO!"); 54 } 55 56 override void close(PipeFD pipe, PipeCloseCallback on_closed) 57 { 58 if (!isValid(pipe)) { 59 if (on_closed) 60 on_closed(pipe, CloseStatus.invalidHandle); 61 return; 62 } 63 64 assert(false, "TODO!"); 65 } 66 67 override bool isValid(PipeFD handle) 68 const { 69 return false; 70 } 71 72 override void addRef(PipeFD pipe) 73 { 74 if (!isValid(pipe)) return; 75 76 assert(false, "TODO!"); 77 } 78 79 override bool releaseRef(PipeFD pipe) 80 { 81 if (!isValid(pipe)) return true; 82 83 assert(false, "TODO!"); 84 } 85 86 protected override void* rawUserData(PipeFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy) 87 @system { 88 assert(false, "TODO!"); 89 } 90 }