blob: 2fc3cd8f17c17b0641e0bd60ce53051824d6f564 [file] [log] [blame] [edit]
// Copyright 2014 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <brillo/dbus/dbus_signal.h>
#include <brillo/dbus/dbus_object.h>
namespace brillo {
namespace dbus_utils {
DBusSignalBase::DBusSignalBase(DBusObject* dbus_object,
const std::string& interface_name,
const std::string& signal_name)
: interface_name_(interface_name),
signal_name_(signal_name),
dbus_object_(dbus_object) {}
bool DBusSignalBase::SendSignal(dbus::Signal* signal) const {
// This sends the signal asynchronously. However, the raw message inside
// the signal object is ref-counted, so we're fine to pass a stack-allocated
// Signal object here.
return dbus_object_->SendSignal(signal);
}
} // namespace dbus_utils
} // namespace brillo