DebugCommand.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2017 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef FRAMEWORK_NATIVE_CMDS_LSHAL_DEBUG_COMMAND_H_
  17. #define FRAMEWORK_NATIVE_CMDS_LSHAL_DEBUG_COMMAND_H_
  18. #include <string>
  19. #include <android-base/macros.h>
  20. #include "Command.h"
  21. #include "utils.h"
  22. namespace android {
  23. namespace lshal {
  24. class Lshal;
  25. class DebugCommand : public Command {
  26. public:
  27. explicit DebugCommand(Lshal &lshal) : Command(lshal) {}
  28. ~DebugCommand() = default;
  29. Status main(const Arg &arg) override;
  30. void usage() const override;
  31. std::string getSimpleDescription() const override;
  32. std::string getName() const override;
  33. private:
  34. Status parseArgs(const Arg &arg);
  35. std::string mInterfaceName;
  36. std::vector<std::string> mOptions;
  37. // Outputs the actual descriptor of a hal instead of the debug output
  38. // if the arguments provided are a superclass of the actual hal impl.
  39. bool mExcludesParentInstances;
  40. DISALLOW_COPY_AND_ASSIGN(DebugCommand);
  41. };
  42. } // namespace lshal
  43. } // namespace android
  44. #endif // FRAMEWORK_NATIVE_CMDS_LSHAL_DEBUG_COMMAND_H_