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