blob: feb1c9a7ba124260aed9f5bc73072aa9f01ae69a
1 | #ifndef __SERIAL_OPERATE_H__ |
2 | #define __SERIAL_OPERATE_H__ |
3 | #include "tvutils/CThread.h" |
4 | |
5 | class CTv2d4GHeadSetDetect: public CThread { |
6 | |
7 | public: |
8 | CTv2d4GHeadSetDetect(); |
9 | ~CTv2d4GHeadSetDetect(); |
10 | |
11 | int startDetect(); |
12 | |
13 | class IHeadSetObserver { |
14 | public: |
15 | IHeadSetObserver() |
16 | {}; |
17 | virtual ~IHeadSetObserver() |
18 | {}; |
19 | virtual void onHeadSetDetect(int state, int para) {}; |
20 | virtual void onThermalDetect(int state) {}; |
21 | |
22 | }; |
23 | void setObserver ( IHeadSetObserver *pOb ) |
24 | { |
25 | mpObserver = pOb; |
26 | }; |
27 | |
28 | private: |
29 | bool threadLoop(); |
30 | IHeadSetObserver *mpObserver; |
31 | |
32 | }; |
33 | |
34 | #endif//__SERIAL_OPERATE_H__ |
35 |