blob: c1262aaaaa90f3db4ccd3b5bdc08207e2ee81914
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 | virtual ~IHeadSetObserver() {}; |
17 | virtual void onHeadSetDetect(int state __unused, int para __unused) { |
18 | }; |
19 | virtual void onThermalDetect(int state __unused) { |
20 | }; |
21 | }; |
22 | |
23 | void setObserver ( IHeadSetObserver *pOb ) { |
24 | mpObserver = pOb; |
25 | }; |
26 | |
27 | private: |
28 | bool threadLoop(); |
29 | IHeadSetObserver *mpObserver; |
30 | |
31 | }; |
32 | |
33 | #endif//__SERIAL_OPERATE_H__ |
34 |