diff --git a/Dictionary/Dictionary.cpp b/Dictionary/Dictionary.cpp index 846b88527..75a023ded 100644 --- a/Dictionary/Dictionary.cpp +++ b/Dictionary/Dictionary.cpp @@ -227,9 +227,9 @@ namespace Plugin { return (result); } - /* virtual */ bool Dictionary::Get(const string& nameSpace, const string& key, string& value) const + /* virtual */ Core::hresult Dictionary::Get(const string& nameSpace, const string& key, string& value) const { - bool result = false; + Core::hresult result = Core::ERROR_UNKNOWN_KEY; _adminLock.Lock(); @@ -244,7 +244,7 @@ namespace Plugin { } if (listIndex != container.end()) { - result = true; + result = Core::ERROR_NONE; value = listIndex->Value(); } } @@ -281,10 +281,10 @@ namespace Plugin { // Direct method to Set a value for a key in a certain namespace from the dictionary. // NameSpace and key MUST be filled. - /* virtual */ bool Dictionary::Set(const string& nameSpace, const string& key, const string& value) + /* virtual */ Core::hresult Dictionary::Set(const string& nameSpace, const string& key, const string& value) { // Direct method to Set a value for a key in a certain namespace from the dictionary. - bool result = false; + Core::hresult result = Core::ERROR_UNKNOWN_KEY; _adminLock.Lock(); @@ -296,14 +296,14 @@ namespace Plugin { } if (listIndex == container.end()) { - result = true; + result = Core::ERROR_NONE; container.push_back(RuntimeEntry(key, value, VOLATILE)); } else if (listIndex->Value() != value) { - result = true; + result = Core::ERROR_NONE; listIndex->Value(value); } - if (result == true) { + if (result == Core::ERROR_NONE) { ObserverMap::iterator index(_observers.begin()); // Right, we updated send out the modification !!! diff --git a/Dictionary/Dictionary.h b/Dictionary/Dictionary.h index 056491dbc..f9d394385 100644 --- a/Dictionary/Dictionary.h +++ b/Dictionary/Dictionary.h @@ -391,12 +391,12 @@ namespace Plugin { // ------------------------------------------------------------------------------------------------------- // Direct method to Get a value from a key in a certain namespace from the dictionary. // NameSpace and key MUST be filled. - bool Get(const string& nameSpace, const string& key, string& value) const override; + Core::hresult Get(const string& nameSpace, const string& key, string& value) const override; IDictionary::IIterator* Get(const string& nameSpace) const override; // Direct method to Set a value for a key in a certain namespace from the dictionary. // NameSpace and key MUST be filled. - bool Set(const string& nameSpace, const string& key, const string& value) override; + Core::hresult Set(const string& nameSpace, const string& key, const string& value) override; void Register(const string& nameSpace, struct Exchange::IDictionary::INotification* sink) override; void Unregister(const string& nameSpace, struct Exchange::IDictionary::INotification* sink) override;