| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef IT3256_H
- #define IT3256_H
- #include <map>
- #include <mutex>
- #include <thread>
- #include "iit3256.h"
- #include "it3256_death_recipient.h"
- namespace OHOS {
- namespace It3256 {
- class It3256IO {
- public:
- It3256IO() = default;
- ~It3256IO() = default;
- bool SetAIRangeCode(unsigned char startch, unsigned char stopch, unsigned char *poutbuf);
- bool GetAIRangeCode(unsigned char startch, unsigned char stopch, unsigned char *poutbuf);
- void ResetIt3256IOProxy();
- bool Reconnect();
- private:
- static constexpr int32_t MAX_RETRY_TIME = 3;
- bool GetIt3256IOProxy();
-
- std::mutex mutex_;
- bool isProxyValid_ = false;
- sptr<IIt3256IO> It3256IOProxy_;
- sptr<It3256IODeathRecipient> recipient_;
- friend class It3256IODeathRecipient;
- };
- } // namespace It3256
- } // namespace OHOS
- #endif //IT3256_H
|