]> pilppa.org Git - libplp.git/blob - src/Device.cc
cleanups for devices with no data
[libplp.git] / src / Device.cc
1 /*
2  * Device.cc
3  *
4  *  Created on: Mar 4, 2011
5  *      Author: lamikr
6  */
7 #include "log.h"
8
9 #include "Device.hh"
10
11 using namespace std;
12 using namespace plp;
13
14 Device::Device(string id_param,
15                 string type_param) {
16         id                      = id_param;
17         type                    = type_param;
18         lifecycle_status        = LIFECYCLE_STATUS__UNAVAILABLE;
19         _cfg                    = NULL;
20 }
21
22 Device::Device(std::string id_param,
23                 string type_param,
24                 string name_param,
25                 plp::EnumDeviceLifeCycleStatus status_param) {
26         id                      = id_param;
27         type                    = type_param;
28         name                    = name_param;
29         lifecycle_status        = status_param;
30         _cfg                    = NULL;
31 }
32
33 //Device::~Device() {
34 //      delete(_cfg);
35 //}
36
37 string Device::get_id() {
38         return id;
39 }
40
41 string Device::get_name() {
42         return name;
43 }
44
45 void Device::set_name(string name_param) {
46         name    = name_param;
47 }
48
49 EnumDeviceLifeCycleStatus Device::get_lifecycle_state() {
50         return lifecycle_status;
51 }
52
53 string Device::get_type() {
54         return type;
55 }