Make dbus_interface uncopyable and unmovable
The dbus_interface class is meant to be unique, constructed once, and
never copied, given the internal pointers that are taken within itself.
Make that requirement explicit.
Change-Id: Iab7e6f66999a63b50081012968c8c199453be34b
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/include/sdbusplus/asio/object_server.hpp b/include/sdbusplus/asio/object_server.hpp
index d02a4fd..1ad5ff3 100644
--- a/include/sdbusplus/asio/object_server.hpp
+++ b/include/sdbusplus/asio/object_server.hpp
@@ -379,6 +379,12 @@
path_(path), name_(name)
{}
+
+ dbus_interface(const dbus_interface&) = delete;
+ dbus_interface& operator=(const dbus_interface&) = delete;
+ dbus_interface(dbus_interface&&) = delete;
+ dbus_interface& operator=(dbus_interface&&) = delete;
+
~dbus_interface()
{
conn_->emit_interfaces_removed(path_.c_str(),