summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/NetworkKit/NetworkDevice.h
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-04-25 13:08:33 +0200
committerAmlal <amlal@nekernel.org>2025-04-25 13:08:33 +0200
commitfb790b07aeba8e22e4190cf3e1834d11ecde6c96 (patch)
tree4cec7d1b321307b1d5935577631dae116a658a37 /dev/kernel/NetworkKit/NetworkDevice.h
parent63a2d92c5dfe976175cda024ec01905d11b43738 (diff)
dev: better .clang-format, ran format command.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/NetworkKit/NetworkDevice.h')
-rw-r--r--dev/kernel/NetworkKit/NetworkDevice.h101
1 files changed, 49 insertions, 52 deletions
diff --git a/dev/kernel/NetworkKit/NetworkDevice.h b/dev/kernel/NetworkKit/NetworkDevice.h
index 48e4e883..7ed67bab 100644
--- a/dev/kernel/NetworkKit/NetworkDevice.h
+++ b/dev/kernel/NetworkKit/NetworkDevice.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
------------------------------------------- */
@@ -12,72 +12,69 @@
/// @note Can either work with: Ethernet, GPRS, WiFi
-namespace Kernel
-{
- struct NetworkDeviceCommand;
- class NetworkDevice;
+namespace Kernel {
+struct NetworkDeviceCommand;
+class NetworkDevice;
- /**
- * \brief Network device interface, establishes a connection to the NIC.
- */
- class NetworkDevice final : public IDeviceObject<NetworkDeviceCommand>
- {
- public:
- NetworkDevice(void (*out)(IDeviceObject<NetworkDeviceCommand>*, NetworkDeviceCommand),
- void (*in)(IDeviceObject<NetworkDeviceCommand>*, NetworkDeviceCommand),
- void (*onCleanup)(void) = nullptr);
+/**
+ * \brief Network device interface, establishes a connection to the NIC.
+ */
+class NetworkDevice final : public IDeviceObject<NetworkDeviceCommand> {
+ public:
+ NetworkDevice(void (*out)(IDeviceObject<NetworkDeviceCommand>*, NetworkDeviceCommand),
+ void (*in)(IDeviceObject<NetworkDeviceCommand>*, NetworkDeviceCommand),
+ void (*onCleanup)(void) = nullptr);
- ~NetworkDevice() override;
+ ~NetworkDevice() override;
- public:
- NetworkDevice& operator=(const NetworkDevice&) = default;
- NetworkDevice(const NetworkDevice&) = default;
+ public:
+ NetworkDevice& operator=(const NetworkDevice&) = default;
+ NetworkDevice(const NetworkDevice&) = default;
- public:
- const Char* Name() const override;
- Boolean Name(const Char* newStr);
+ public:
+ const Char* Name() const override;
+ Boolean Name(const Char* newStr);
- private:
- static constexpr auto cNetworkNameLen = 512;
+ private:
+ static constexpr auto cNetworkNameLen = 512;
- Void (*fCleanup)(void);
- Char fNetworkName[cNetworkNameLen];
- };
+ Void (*fCleanup)(void);
+ Char fNetworkName[cNetworkNameLen];
+};
- struct NetworkDeviceCommand final
- {
- UInt32 CommandName;
- UInt32 CommandType;
- UInt32 CommandFlags;
- VoidPtr CommandBuffer;
- SizeT CommandSizeBuffer;
- };
+struct NetworkDeviceCommand final {
+ UInt32 CommandName;
+ UInt32 CommandType;
+ UInt32 CommandFlags;
+ VoidPtr CommandBuffer;
+ SizeT CommandSizeBuffer;
+};
- /// @brief TCP device.
- using TCPNetworkDevice = NetworkDevice;
+/// @brief TCP device.
+using TCPNetworkDevice = NetworkDevice;
- /// @brief UDP device.
- using UDPNetworkDevice = NetworkDevice;
+/// @brief UDP device.
+using UDPNetworkDevice = NetworkDevice;
- /// @brief PPP device.
- using PPPNetworkDevice = NetworkDevice;
+/// @brief PPP device.
+using PPPNetworkDevice = NetworkDevice;
- /// @brief IPC device.
- using IPCNetworkDevice = NetworkDevice;
+/// @brief IPC device.
+using IPCNetworkDevice = NetworkDevice;
- /// @brief GRPS device.
- using GPRSNetworkDevice = NetworkDevice;
+/// @brief GRPS device.
+using GPRSNetworkDevice = NetworkDevice;
- /// @brief GSM device.
- using GSMNetworkDevice = NetworkDevice;
+/// @brief GSM device.
+using GSMNetworkDevice = NetworkDevice;
- /// @brief Bluetooth device.
- using BTNetworkDevice = NetworkDevice;
+/// @brief Bluetooth device.
+using BTNetworkDevice = NetworkDevice;
- /// @brief LTE device.
- using LTENetworkDevice = NetworkDevice;
-} // namespace Kernel
+/// @brief LTE device.
+using LTENetworkDevice = NetworkDevice;
+} // namespace Kernel
#include <NetworkKit/NetworkDevice.inl>
-#endif // !__INC_NETWORK_DEVICE_H__
+#endif // !__INC_NETWORK_DEVICE_H__