diff --git a/indra/newview/llappviewerlinux_api-client-glue.h b/indra/newview/llappviewerlinux_api-client-glue.h index 56719ae020da396519e4a9515cf860f5a0ba472a..d38d518537ae391fa50d92eebce10f5a57133ba0 100644 --- a/indra/newview/llappviewerlinux_api-client-glue.h +++ b/indra/newview/llappviewerlinux_api-client-glue.h @@ -20,22 +20,27 @@ class ViewerAppAPI_proxy protected: ViewerAppAPI_proxy(sdbus::IProxy& proxy) - : proxy_(proxy) + : proxy_(&proxy) { } + ViewerAppAPI_proxy(const ViewerAppAPI_proxy&) = delete; + ViewerAppAPI_proxy& operator=(const ViewerAppAPI_proxy&) = delete; + ViewerAppAPI_proxy(ViewerAppAPI_proxy&&) = default; + ViewerAppAPI_proxy& operator=(ViewerAppAPI_proxy&&) = default; + ~ViewerAppAPI_proxy() = default; public: bool GoSLURL(const std::string& slurl) { bool result; - proxy_.callMethod("GoSLURL").onInterface(INTERFACE_NAME).withArguments(slurl).storeResultsTo(result); + proxy_->callMethod("GoSLURL").onInterface(INTERFACE_NAME).withArguments(slurl).storeResultsTo(result); return result; } private: - sdbus::IProxy& proxy_; + sdbus::IProxy* proxy_; }; }} // namespaces diff --git a/indra/newview/llappviewerlinux_api-server-glue.h b/indra/newview/llappviewerlinux_api-server-glue.h index ba04105f966e36f393020af35d4b83c1e5fb6513..b740c306a539b0bc05e7c92a3de96a1ee106306c 100644 --- a/indra/newview/llappviewerlinux_api-server-glue.h +++ b/indra/newview/llappviewerlinux_api-server-glue.h @@ -20,18 +20,23 @@ class ViewerAppAPI_adaptor protected: ViewerAppAPI_adaptor(sdbus::IObject& object) - : object_(object) + : object_(&object) { - object_.registerMethod("GoSLURL").onInterface(INTERFACE_NAME).withInputParamNames("slurl").withOutputParamNames("success_ret").implementedAs([this](const std::string& slurl){ return this->GoSLURL(slurl); }); + object_->registerMethod("GoSLURL").onInterface(INTERFACE_NAME).withInputParamNames("slurl").withOutputParamNames("success_ret").implementedAs([this](const std::string& slurl){ return this->GoSLURL(slurl); }); } + ViewerAppAPI_adaptor(const ViewerAppAPI_adaptor&) = delete; + ViewerAppAPI_adaptor& operator=(const ViewerAppAPI_adaptor&) = delete; + ViewerAppAPI_adaptor(ViewerAppAPI_adaptor&&) = default; + ViewerAppAPI_adaptor& operator=(ViewerAppAPI_adaptor&&) = default; + ~ViewerAppAPI_adaptor() = default; private: virtual bool GoSLURL(const std::string& slurl) = 0; private: - sdbus::IObject& object_; + sdbus::IObject* object_; }; }} // namespaces