X-Git-Url: http://pilppa.org/gitweb/?p=lib1wire.git;a=blobdiff_plain;f=src%2FFactory.hh;fp=src%2FFactory.hh;h=7c16d6f7b702cedd8243ce2b94c165daf4e2ccdd;hp=6e2beb2b337617b21fbf80c1a1608df8468e2933;hb=da203ad44792ca37320768f4cbe68587c4806910;hpb=6caee6cb22c1334701afe7aa30bcf9668ca3a5c5 diff --git a/src/Factory.hh b/src/Factory.hh index 6e2beb2..7c16d6f 100644 --- a/src/Factory.hh +++ b/src/Factory.hh @@ -9,12 +9,13 @@ #define FACTORY_HH_ #include +#include #include #include "DeviceConfig.hh" -#include "DeviceData.hh" -#include "W1Device.hh" +#include "DataReader.hh" +#include "Device.hh" #ifndef W1_SCAN_ROOTDIR #define W1_SCAN_ROOTDIR "/sys/bus/w1/devices" @@ -25,13 +26,16 @@ namespace w1 { public: Factory(); virtual ~Factory(); - static W1Device *get_device(int family_code, std::string device_id, dirent *direntry_param); - static std::list get_device_list(); - static std::list get_device_data_list(); + static std::list get_device_list(); static DeviceConfig *get_device_config(std::string device_id); private: //int parse_family_code(std::string folder_name); - static W1Device *create_device(dirent *direntry_param, int *err_code_param); + static plp::Device *create_w1_device(int family_code, std::string device_id, dirent *direntry_param); + static plp::Device *create_w1_device(std::string device_type_param, std::string device_id_param); + static plp::Device *create_w1_device(dirent *direntry_param, int *err_code_param); + static std::list get_data_reader_list(); + static int get_family_code_by_device_type(std::string device_type_param); + static std::string get_device_type_by_family_code(int family_code_param); }; }