lshal: Add class Command.

Command is the base class for all *Command classes.

Test: lshal_test

Bug: 35389839
Change-Id: I9aca19e66824536d13e618ffd0f012ac3da9880d
diff --git a/cmds/lshal/ListCommand.h b/cmds/lshal/ListCommand.h
index 5047cf8..8d25d94 100644
--- a/cmds/lshal/ListCommand.h
+++ b/cmds/lshal/ListCommand.h
@@ -26,6 +26,7 @@
 #include <android-base/macros.h>
 #include <android/hidl/manager/1.0/IServiceManager.h>
 
+#include "Command.h"
 #include "NullableOStream.h"
 #include "TableEntry.h"
 #include "TextTable.h"
@@ -42,11 +43,11 @@
     uint32_t threadCount; // number of threads total
 };
 
-class ListCommand {
+class ListCommand : public Command {
 public:
-    ListCommand(Lshal &lshal);
+    ListCommand(Lshal &lshal) : Command(lshal) {}
     virtual ~ListCommand() = default;
-    Status main(const std::string &command, const Arg &arg);
+    Status main(const std::string &command, const Arg &arg) override;
 protected:
     Status parseArgs(const std::string &command, const Arg &arg);
     Status fetch();
@@ -79,8 +80,6 @@
     NullableOStream<std::ostream> err() const;
     NullableOStream<std::ostream> out() const;
 
-    Lshal &mLshal;
-
     Table mServicesTable{};
     Table mPassthroughRefTable{};
     Table mImplementationsTable{};