// Device.h // Device object for use in devfs // Author: Josh Holtrop // Date: 06/03/04 // Modified: 06/08/04 #ifndef __HOS_DEVICE__ #define __HOS_DEVICE__ __HOS_DEVICE__ #include "hos_defines.h" #include "lang/string.h" #include "lang/LinkedList.h" #define DEVICE_FOLDER 0 #define DEVICE_BLOCK 1 #define DEVICE_CHAR 2 #define DEVICE_LINK 3 class Device { public: string name; union { dword major; //can't be DeviceFolder * because not then Device & DeviceFolder are inter-dependent void *folder; string *link; }; dword minor; word permissions; char type; Device(); Device(string aname); Device(string aname, dword amajor, dword aminor, char atype, word apermissions); void setLink(string alink); }; #endif