X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src%2FDevice.hh;h=d73395a7d87d08eb931a5f825eaaf32d4e392540;hb=0fa52fa51ad87bfb7871956f2cca83434f3bff7e;hp=a0984ff3ec1548da458f4445aaabe79e0b444432;hpb=063ec715601bf9662797725cb39732bea0572d26;p=libplp.git diff --git a/src/Device.hh b/src/Device.hh index a0984ff..d73395a 100644 --- a/src/Device.hh +++ b/src/Device.hh @@ -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 +#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_ */