]> pilppa.org Git - libplp.git/blob - src/Device.cc
Memory leak cleanups.
[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, string type_param) {
15         id                      = id_param;
16         type                    = type_param;
17         lifecycle_status        = LIFECYCLE_STATUS__UNAVAILABLE;
18 }
19
20 Device::Device(std::string id_param, std::string type_param, std::string name_param, plp::EnumDeviceLifeCycleStatus status_param) {
21         id                      = id_param;
22         type                    = type_param;
23         name                    = name_param;
24         lifecycle_status        = status_param;
25 }
26
27 //Device::~Device() {
28 //      log_debug("Device: constructor\n");
29 //}
30
31 string Device::get_id() {
32         return id;
33 }
34
35 string Device::get_name() {
36         return name;
37 }
38
39 void Device::set_name(string name_param) {
40         name    = name_param;
41 }
42
43 EnumDeviceLifeCycleStatus Device::get_lifecycle_state() {
44         return lifecycle_status;
45 }
46
47 string Device::get_type() {
48         return type;
49 }