/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2022. All rights reserved. * Description: android ir options interface * Author: App-Dev Group * Create: 2020-07-02 */ #ifndef ANDROID_OPTIONS_H #define ANDROID_OPTIONS_H #include #include #include "AndroidIrInterface.h" namespace android { class Options { public: std::unique_ptr androidIrInterface = std::make_unique(); bool debugIrEnable = false; int CheckParams() const; int CheckParamsSet() const; void Usage(const char& base) const; int ProcessOptions(int argc, char *argv[]); private: std::vector gProtNames = { "nec full 2headers", "nec simple 2headers changshu", "nec simple uPD6121G like", "nec simple LC7461MCL13 like", "nec full dezhou like", "nec full huizhou like", "nec simple 2headers gd", "credit", "sony d7c5", "sony d7c8", "tc9012", "rc6 32bit data", "rc6 20bit data", "rc6 16bit data", "rc5 14bit data", "extended rc5 14bit" }; int gDebugEnable = 0; int gMode = 0; int gModeSet = 0; int gKeyupEvent = 0; int gKeyupEventSet = 0; unsigned int gKeyupTimeout = 0; unsigned int gKeyupTimeoutSet = 0; int gRepeatEvent = 0; int gRepeatEventSet = 0; unsigned int gRepeatInterval = 0; unsigned int gRepeatIntervalSet = 0; unsigned int gReadTimeout = 200; // 200ms int gIrEnable = 0; int gIrEnableSet = 0; int gProtStatus = 0; std::string gProtName = ""; int gProtNameSet = 0; int gProtEnable = 0; int gProtEnableSet = 0; int ProcessOptionsDefault(int op, char *argv[]); void SetRepeatInterval(); void SetRepeatEvent(); void SetTimeOut(); void SetMode(); int SetProtE(); int SetProtEnable(); int GetProtList() const; int GetProtStatus(); void SetIrEnable(); int IrSampleSetProtEnable() const; int IrGetProtStatus(std::string prot) const; }; } #endif // ANDROID_OPTIONS_H