1 #include <cstring>
2 #include <iostream>
3 #include <stdexcept>
4
5 #include <xf86drm.h>
6 #include <xf86drmMode.h>
7
8 #include <kms++/kms++.h>
9
10 using namespace std;
11
12 namespace kms
13 {
DrmObject(Card & card,uint32_t object_type)14 DrmObject::DrmObject(Card& card, uint32_t object_type)
15 : m_card(card), m_id(-1), m_object_type(object_type), m_idx(0)
16 {
17 }
18
DrmObject(Card & card,uint32_t id,uint32_t object_type,uint32_t idx)19 DrmObject::DrmObject(Card& card, uint32_t id, uint32_t object_type, uint32_t idx)
20 : m_card(card), m_id(id), m_object_type(object_type), m_idx(idx)
21 {
22 }
23
~DrmObject()24 DrmObject::~DrmObject()
25 {
26 }
27
set_id(uint32_t id)28 void DrmObject::set_id(uint32_t id)
29 {
30 m_id = id;
31 }
32 } // namespace kms
33