| 69 | } |
| 70 | |
| 71 | script::Value get(const std::string& key, const std::string& domain) { |
| 72 | auto domainIt = storage.find(domain.empty() ? app::AppScripting::getFileName() : domain); |
| 73 | if (domainIt == storage.end()) return {}; |
| 74 | auto entryIt = domainIt->second.find(key); |
| 75 | if (entryIt == domainIt->second.end()) return {}; |
| 76 | return entryIt->second; |
| 77 | } |
| 78 | |
| 79 | void set(const script::Value& value, const std::string& key, const std::string& domain) { |
| 80 | storage[domain.empty() ? app::AppScripting::getFileName() : domain][key] = value; |