aboutsummaryrefslogtreecommitdiffstats
path: root/brillo/dbus/exported_property_set.h
diff options
context:
space:
mode:
authorSen Jiang <senj@google.com>2018-08-09 16:52:23 -0700
committerSen Jiang <senj@google.com>2018-08-10 11:07:06 -0700
commit0fa01c38cc2beff8d7e11e4b512692ecdb640ca8 (patch)
tree279e9e692e3a7db704f65e6d3977e43e8e75b46a /brillo/dbus/exported_property_set.h
parentb5f20f52ab0885f1676b1c2024df541b3e6cc5f5 (diff)
parent904c2c9cd8d5ff06783030fb27ee23dcff743035 (diff)
downloadplatform_external_libbrillo-0fa01c38cc2beff8d7e11e4b512692ecdb640ca8.tar.gz
platform_external_libbrillo-0fa01c38cc2beff8d7e11e4b512692ecdb640ca8.tar.bz2
platform_external_libbrillo-0fa01c38cc2beff8d7e11e4b512692ecdb640ca8.zip
Merge remote-tracking branch 'aosp/upstream-master' into aosp/master.android-o-mr1-iot-release-1.0.4
Merge Chromium ToT to AOSP: git fetch aosp upstream-master git merge -X patience aosp/upstream-master Bug: 112326236 Test: libbrillo_test Change-Id: I35fbbddad556b051ce12b9cdd95bb2afef3cf6af
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;
}