aboutsummaryrefslogtreecommitdiffstats
path: root/brillo/dbus/exported_property_set.h
diff options
context:
space:
mode:
Diffstat (limited to 'brillo/dbus/exported_property_set.h')
-rw-r--r--brillo/dbus/exported_property_set.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/brillo/dbus/exported_property_set.h b/brillo/dbus/exported_property_set.h
index f10511f..971e932 100644
--- a/brillo/dbus/exported_property_set.h
+++ b/brillo/dbus/exported_property_set.h
@@ -71,6 +71,9 @@ class BRILLO_EXPORT ExportedPropertyBase {
// interface of the exported object.
virtual void SetUpdateCallback(const OnUpdateCallback& cb);
+ // Clears the update callback that was previously set with SetUpdateCallback.
+ virtual void ClearUpdateCallback();
+
// Returns the contained value as Any.
virtual brillo::Any GetValue() const = 0;
@@ -111,6 +114,10 @@ class BRILLO_EXPORT ExportedPropertySet {
const std::string& property_name,
ExportedPropertyBase* exported_property);
+ // Unregisters a property from this exported property set.
+ void UnregisterProperty(const std::string& interface_name,
+ const std::string& property_name);
+
// D-Bus methods for org.freedesktop.DBus.Properties interface.
VariantDictionary HandleGetAll(const std::string& interface_name);
bool HandleGet(brillo::ErrorPtr* error,
@@ -208,7 +215,7 @@ class ExportedProperty : public ExportedPropertyBase {
if (!validator_.is_null() && !validator_.Run(error, value.Get<T>())) {
return false;
}
- value_ = value.Get<T>();
+ SetValue(value.Get<T>());
return true;
}