From da70596895d8135e08f8caac6978117697b4c021 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 18 Aug 2024 21:39:29 +0200 Subject: [REFACTOR] Improved project structure. Signed-off-by: Amlal El Mahrouss --- dev/ZKA/NetworkKit/NetworkDevice.inl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 dev/ZKA/NetworkKit/NetworkDevice.inl (limited to 'dev/ZKA/NetworkKit/NetworkDevice.inl') diff --git a/dev/ZKA/NetworkKit/NetworkDevice.inl b/dev/ZKA/NetworkKit/NetworkDevice.inl new file mode 100644 index 00000000..5579eba3 --- /dev/null +++ b/dev/ZKA/NetworkKit/NetworkDevice.inl @@ -0,0 +1,32 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +/*** + Dtor and ctors. +*/ + +namespace Kernel +{ + NetworkDevice::NetworkDevice(void (*out)(NetworkDeviceCommand), + void (*in)(NetworkDeviceCommand), + void (*on_cleanup)(void)) + : DeviceInterface(out, in), fCleanup(on_cleanup) + { + kcout << "newoskrnl: NetworkDevice initialized.\r"; + + MUST_PASS(out && in && on_cleanup); + } + + NetworkDevice::~NetworkDevice() + { + MUST_PASS(fCleanup); + + kcout << "newoskrnl: NetworkDevice cleanup.\r"; + + if (fCleanup) + fCleanup(); + } +} // namespace Kernel -- cgit v1.2.3