-
- void set_metadata(const std::map<std::string,std::string>& m) {
- devices.clear();
- metadata = m;
- auto p = m.find("device_ids");
- if (p != m.end()) {
- map<std::string,std::string> devs;
- get_str_map(p->second, &devs, ",; ");
- for (auto& i : devs) {
- if (i.second.size()) { // skip blank ids
- devices[i.second] = i.first;
- }
- }
- }
- }
-
- const std::map<std::string,std::string>& _get_config_defaults() {
- if (config_defaults.empty() &&
- config_defaults_bl.length()) {
- auto p = config_defaults_bl.cbegin();
- try {
- decode(config_defaults, p);
- } catch (buffer::error& e) {
- }
- }
- return config_defaults;
- }
+ void set_metadata(const std::map<std::string,std::string>& m);
+ const std::map<std::string,std::string>& _get_config_defaults();