it3256_service.h 994 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef IT3256_SERVICE_H
  2. #define IT3256_SERVICE_H
  3. #include "system_ability.h"
  4. #include "it3256_stub.h"
  5. #include "it3256_control.h"
  6. #include "system_ability_definition.h"
  7. namespace OHOS {
  8. namespace It3256 {
  9. class It3256IOService : public SystemAbility, public It3256IOStub {
  10. DECLARE_SYSTEM_ABILITY(It3256IOService);
  11. public:
  12. DISALLOW_COPY_AND_MOVE(It3256IOService);
  13. explicit It3256IOService(int32_t systemAbilityId, bool runOnCreate = true);
  14. ~It3256IOService() override;
  15. // 从SystemAbility继承
  16. void OnStart() override;
  17. void OnStop() override;
  18. // 从It3256IOStub继承
  19. bool SetAIRangeCode(unsigned char startch, unsigned char stopch, unsigned char *poutbuf) override;
  20. bool GetAIRangeCode(unsigned char startch, unsigned char stopch, unsigned char *poutbuf) override;
  21. private:
  22. bool Initialize();
  23. std::shared_ptr<It3256IOControl> control_;
  24. bool ready_ = false;
  25. };
  26. } // namespace It3256
  27. } // namespace OHOS
  28. #endif // IT3256_SERVICE_H