X-Git-Url: http://pilppa.org/gitweb/?p=lib1wire.git;a=blobdiff_plain;f=src%2FDeviceConfig.hh;fp=src%2FDeviceConfig.hh;h=0000000000000000000000000000000000000000;hp=107018b907ae8997b82c9d6f53acbcb7901fa6b1;hb=a7002b0a87c5f17b542dfbd44f482014a191df97;hpb=da203ad44792ca37320768f4cbe68587c4806910 diff --git a/src/DeviceConfig.hh b/src/DeviceConfig.hh deleted file mode 100644 index 107018b..0000000 --- a/src/DeviceConfig.hh +++ /dev/null @@ -1,56 +0,0 @@ -/* - * DeviceConfig.hh - * - * Created on: Dec 9, 2010 - * Author: lamikr - */ - -#ifndef DEVICECONFIG_HH_ -#define DEVICECONFIG_HH_ - -#include - -extern "C" { -#include -#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" -#define DEVICE_CONFIG_VALUE_KEY__TYPE "type" -#define DEVICE_CONFIG_VALUE_KEY__ID "id" -#define DEVICE_CONFIG_VALUE_KEY__NAME "name" - -namespace w1 { - struct ConfigHandle { - public: - ConfigHandle(uci_context *ctx_param, uci_package *pkg_param); - ~ConfigHandle(); - struct uci_context *_ctx; - struct uci_package *_pkg; - }; - - class DeviceConfig { - public: - DeviceConfig(std::string device_id_param); - virtual ~DeviceConfig(); - static std::string get_base_dir_name(); - 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); - EnumSummaryCalculationType get_summary_calculation_type(); - private: - static std::string store_base_dir; - std::string device_id; - std::string device_type; - ConfigHandle *uci_handle; - ConfigHandle *load_device_config(std::string device_id_param); - std::string get_dir_name(std::string device_id); - std::string get_file_name(std::string device_id_param); - }; -} - -#endif /* DEVICECONFIG_HH_ */