mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:02:44 +00:00 
			
		
		
		
	 1f41a36c52
			
		
	
	
		1f41a36c52
		
	
	
	
	
		
			
			This allows me to keep prototyping things on a random desktop machine, even if that machine has its own ideas about foo_t types.
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			320 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			320 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <AK/Types.h>
 | |
| #include "Limits.h"
 | |
| 
 | |
| class CharacterDevice {
 | |
| public:
 | |
|     virtual ~CharacterDevice();
 | |
| 
 | |
|     virtual Unix::ssize_t read(byte* buffer, Unix::size_t bufferSize) = 0;
 | |
|     virtual Unix::ssize_t write(const byte* buffer, Unix::size_t bufferSize) = 0;
 | |
| 
 | |
| protected:
 | |
|     CharacterDevice() { }
 | |
| };
 |