Merge latest version of libweave and update weaved to reflect changes
libweave has a number of interafce changes which need to be reflected in
weaved's implementation of the interfaces. This commit brings weaved in
sync with the current version of libweave.
Change-Id: If6355ef2c19e38b56f96b027038e2d6da0f44709
diff --git a/buffet/dbus_command_proxy.h b/buffet/dbus_command_proxy.h
index dc45738..bf2868d 100644
--- a/buffet/dbus_command_proxy.h
+++ b/buffet/dbus_command_proxy.h
@@ -23,12 +23,11 @@
namespace buffet {
-class DBusCommandProxy : public weave::Command::Observer,
- public com::android::Weave::CommandInterface {
+class DBusCommandProxy : public com::android::Weave::CommandInterface {
public:
DBusCommandProxy(chromeos::dbus_utils::ExportedObjectManager* object_manager,
const scoped_refptr<dbus::Bus>& bus,
- weave::Command* command,
+ const std::weak_ptr<weave::Command>& command,
std::string object_path);
~DBusCommandProxy() override = default;
@@ -36,12 +35,6 @@
const chromeos::dbus_utils::AsyncEventSequencer::CompletionAction&
completion_callback);
- // CommandProxyInterface implementation/overloads.
- void OnResultsChanged() override;
- void OnStatusChanged() override;
- void OnProgressChanged() override;
- void OnCommandDestroyed() override;
-
private:
// Handles calls to com.android.Weave.Command.SetProgress(progress).
bool SetProgress(chromeos::ErrorPtr* error,
@@ -50,18 +43,16 @@
bool SetResults(chromeos::ErrorPtr* error,
const chromeos::VariantDictionary& results) override;
// Handles calls to com.android.Weave.Command.Abort().
- void Abort() override;
+ bool Abort(chromeos::ErrorPtr* error) override;
// Handles calls to com.android.Weave.Command.Cancel().
- void Cancel() override;
+ bool Cancel(chromeos::ErrorPtr* error) override;
// Handles calls to com.android.Weave.Command.Done().
- void Done() override;
+ bool Done(chromeos::ErrorPtr* error) override;
- weave::Command* command_;
+ std::weak_ptr<weave::Command> command_;
com::android::Weave::CommandAdaptor dbus_adaptor_{this};
chromeos::dbus_utils::DBusObject dbus_object_;
- ScopedObserver<weave::Command, weave::Command::Observer> observer_{this};
-
friend class DBusCommandProxyTest;
friend class DBusCommandDispacherTest;
DISALLOW_COPY_AND_ASSIGN(DBusCommandProxy);