CharacterDevicesDirectory.h 901 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <Kernel/FileSystem/SysFS/Component.h>
  8. #include <Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/DeviceComponent.h>
  9. #include <Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/Directory.h>
  10. namespace Kernel {
  11. class Device;
  12. class DisplayConnector;
  13. class SysFSCharacterDevicesDirectory final : public SysFSDirectory {
  14. friend class DisplayConnector;
  15. public:
  16. virtual StringView name() const override { return "char"sv; }
  17. static NonnullRefPtr<SysFSCharacterDevicesDirectory> must_create(SysFSDeviceIdentifiersDirectory const&);
  18. static SysFSCharacterDevicesDirectory& the();
  19. ChildList& devices_list(Badge<Device>) { return m_child_components; }
  20. private:
  21. explicit SysFSCharacterDevicesDirectory(SysFSDeviceIdentifiersDirectory const&);
  22. };
  23. }