summaryrefslogtreecommitdiffstats
path: root/dbus/property.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/property.cc')
-rw-r--r--dbus/property.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/dbus/property.cc b/dbus/property.cc
index dde0611..b7a0c8b 100644
--- a/dbus/property.cc
+++ b/dbus/property.cc
@@ -174,6 +174,22 @@ void PropertySet::Set(PropertyBase* property, SetCallback callback) {
callback));
}
+bool PropertySet::SetAndBlock(PropertyBase* property) {
+ MethodCall method_call(kPropertiesInterface, kPropertiesSet);
+ MessageWriter writer(&method_call);
+ writer.AppendString(interface());
+ writer.AppendString(property->name());
+ property->AppendSetValueToWriter(&writer);
+
+ DCHECK(object_proxy_);
+ scoped_ptr<dbus::Response> response(
+ object_proxy_->CallMethodAndBlock(&method_call,
+ ObjectProxy::TIMEOUT_USE_DEFAULT));
+ if (response.get())
+ return true;
+ return false;
+}
+
void PropertySet::OnSet(PropertyBase* property,
SetCallback callback,
Response* response) {