Home | History | Annotate | Download | only in lshal
      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 
     17 #ifndef FRAMEWORK_NATIVE_CMDS_LSHAL_DEBUG_COMMAND_H_
     18 #define FRAMEWORK_NATIVE_CMDS_LSHAL_DEBUG_COMMAND_H_
     19 
     20 #include <string>
     21 
     22 #include <android-base/macros.h>
     23 
     24 #include "Command.h"
     25 #include "utils.h"
     26 
     27 namespace android {
     28 namespace lshal {
     29 
     30 class Lshal;
     31 
     32 class DebugCommand : public Command {
     33 public:
     34     DebugCommand(Lshal &lshal) : Command(lshal) {}
     35     ~DebugCommand() = default;
     36     Status main(const Arg &arg) override;
     37     void usage() const override;
     38     std::string getSimpleDescription() const override;
     39     std::string getName() const override;
     40 private:
     41     Status parseArgs(const Arg &arg);
     42 
     43     std::string mInterfaceName;
     44     std::vector<std::string> mOptions;
     45 
     46     // Outputs the actual descriptor of a hal instead of the debug output
     47     // if the arguments provided are a superclass of the actual hal impl.
     48     bool mExcludesParentInstances;
     49 
     50     DISALLOW_COPY_AND_ASSIGN(DebugCommand);
     51 };
     52 
     53 
     54 }  // namespace lshal
     55 }  // namespace android
     56 
     57 #endif  // FRAMEWORK_NATIVE_CMDS_LSHAL_DEBUG_COMMAND_H_
     58