]> pilppa.org Git - libplp.git/blobdiff - src/Device.hh
cleanups for devices with no data
[libplp.git] / src / Device.hh
index a0984ff3ec1548da458f4445aaabe79e0b444432..d73395a7d87d08eb931a5f825eaaf32d4e392540 100644 (file)
@@ -1,25 +1,42 @@
 /*
- * GenericDevice.hh
+ * Device.hh
  *
- *  Created on: Feb 28, 2011
+ *  Created on: Mar 4, 2011
  *      Author: lamikr
  */
 
-#ifndef DEVICE_HH_
-#define DEVICE_HH_
+#ifndef DEVICEINFO_HH_
+#define DEVICEINFO_HH_
 
 #include <string>
+#include "DeviceConfig.hh"
 
-#include "DeviceData.hh"
-#include "DataReader.hh"
+using namespace std;
 
 namespace plp {
-       class Device : public DeviceData {
+       enum EnumDeviceLifeCycleStatus {LIFECYCLE_STATUS__UNAVAILABLE, LIFECYCLE_STATUS__AVAILABLE};
+
+       class Device {
                public:
-                       Device(std::string id_param, std::string type_param);
-                       Device(std::string id_param, std::string type_param, std::string name_param, plp::EnumDeviceLifeCycleStatus status_param);
-                       virtual plp::DataReader *get_device_data() = 0;
+                       Device(string id_param, string type_param);
+                       Device(string id_param,
+                               string type_param,
+                               string name_param,
+                               EnumDeviceLifeCycleStatus status_param);
+                       virtual ~Device() { delete(_cfg); }
+                       std::string get_id();
+                       std::string get_name();
+                       std::string get_type();
+                       plp::EnumDeviceLifeCycleStatus get_lifecycle_state();
+                       void set_name(std::string name_param);
+                       virtual void printout() = 0;
+               protected:
+                       std::string id;
+                       std::string name;
+                       std::string type;
+                       plp::DeviceConfig *_cfg;
+                       plp::EnumDeviceLifeCycleStatus lifecycle_status;
        };
 }
 
-#endif /* DEVICE_HH_ */
+#endif /* DEVICEINFO_HH_ */