summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/NetworkKit/NetworkDevice.inl
blob: 5579eba3a52619638a5e30282619ff5d2459fdfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* -------------------------------------------

	Copyright ZKA Technologies.

------------------------------------------- */

/***
	Dtor and ctors.
*/

namespace Kernel
{
	NetworkDevice::NetworkDevice(void (*out)(NetworkDeviceCommand),
								 void (*in)(NetworkDeviceCommand),
								 void (*on_cleanup)(void))
		: DeviceInterface<NetworkDeviceCommand>(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