aboutsummaryrefslogtreecommitdiff
path: root/kernel/kapi/devices/device.cpp
blob: 540d37b7aa980e3c6a5e26e18cc048c0e81a2025 (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
33
34
35
#include <kapi/devices/device.hpp>

#include <kapi/devices.hpp>
#include <kapi/devices/bus.hpp>

#include <kstd/memory.hpp>
#include <kstd/string.hpp>

namespace kapi::devices
{
  device::device(kstd::string const & name)
      : m_name(name)
  {}

  auto device::name() const -> kstd::string const &
  {
    return m_name;
  }

  auto device::parent() const -> kstd::shared_ptr<bus>
  {
    return m_parent.lock();
  }

  auto device::set_parent(kstd::weak_ptr<bus> parent) -> void
  {
    m_parent = parent;
  }

  auto device::query_interface(interface) -> void *
  {
    return nullptr;
  }

}  // namespace kapi::devices