]> pilppa.org Git - libplp.git/blob - src/Device.hh
cleanups for devices with no data
[libplp.git] / src / Device.hh
1 /*
2  * Device.hh
3  *
4  *  Created on: Mar 4, 2011
5  *      Author: lamikr
6  */
7
8 #ifndef DEVICEINFO_HH_
9 #define DEVICEINFO_HH_
10
11 #include <string>
12 #include "DeviceConfig.hh"
13
14 using namespace std;
15
16 namespace plp {
17         enum EnumDeviceLifeCycleStatus {LIFECYCLE_STATUS__UNAVAILABLE, LIFECYCLE_STATUS__AVAILABLE};
18
19         class Device {
20                 public:
21                         Device(string id_param, string type_param);
22                         Device(string id_param,
23                                 string type_param,
24                                 string name_param,
25                                 EnumDeviceLifeCycleStatus status_param);
26                         virtual ~Device() { delete(_cfg); }
27                         std::string get_id();
28                         std::string get_name();
29                         std::string get_type();
30                         plp::EnumDeviceLifeCycleStatus get_lifecycle_state();
31                         void set_name(std::string name_param);
32                         virtual void printout() = 0;
33                 protected:
34                         std::string id;
35                         std::string name;
36                         std::string type;
37                         plp::DeviceConfig *_cfg;
38                         plp::EnumDeviceLifeCycleStatus lifecycle_status;
39         };
40 }
41
42 #endif /* DEVICEINFO_HH_ */