blob: ef9fad645946aaa6a266e0ef0d1c902f97fc6690
1 | #ifndef __SERIAL_OPERATE_H__ |
2 | #define __SERIAL_OPERATE_H__ |
3 | #include "tvutils/CThread.h" |
4 | |
5 | class CTv2d4GHeadSetDetect: public CThread |
6 | { |
7 | |
8 | public: |
9 | CTv2d4GHeadSetDetect(); |
10 | ~CTv2d4GHeadSetDetect(); |
11 | |
12 | int startDetect(); |
13 | |
14 | class IHeadSetObserver |
15 | { |
16 | public: |
17 | IHeadSetObserver() |
18 | {}; |
19 | virtual ~IHeadSetObserver() |
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 |