X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src%2FDeviceConfig.hh;h=107018b907ae8997b82c9d6f53acbcb7901fa6b1;hb=d01194ab9275bc97176071089edc2781bb4de51b;hp=0c83811457afd332b06d63917096edb355d80ef8;hpb=56242039f27dc5d36117b8d513731c7a9009d4b1;p=lib1wire.git diff --git a/src/DeviceConfig.hh b/src/DeviceConfig.hh index 0c83811..107018b 100644 --- a/src/DeviceConfig.hh +++ b/src/DeviceConfig.hh @@ -15,6 +15,8 @@ extern "C" { #include } +#include "W1Configure.hh" + #define DEVICE_CONFIG__FILE_NAME "dev_cfg.txt" #define DEVICE_CONFIG__SECTION_TYPE "device" #define DEVICE_CONFIG__SECTION_NAME "base_data" @@ -23,14 +25,12 @@ extern "C" { #define DEVICE_CONFIG_VALUE_KEY__NAME "name" namespace w1 { - enum enum_summary_calculation {SUM, DELTA, MIN, MAX, MEAN}; - struct ConfigHandle { public: ConfigHandle(uci_context *ctx_param, uci_package *pkg_param); ~ConfigHandle(); - struct uci_context *ctx; - struct uci_package *pkg; + struct uci_context *_ctx; + struct uci_package *_pkg; }; class DeviceConfig { @@ -41,7 +41,7 @@ namespace w1 { static void set_base_dir_name(std::string store_param); std::string get_cfg_value(std::string key); void set_cfg_value(std::string key, std::string value); - enum_summary_calculation get_summary_calculation_type(); + EnumSummaryCalculationType get_summary_calculation_type(); private: static std::string store_base_dir; std::string device_id;