San Mehat | 1441e76 | 2009-05-07 11:37:10 -0700 | [diff] [blame] | 1 | #ifndef _WIFISCANNER_H |
| 2 | #define _WIFISCANNER_H |
| 3 | |
| 4 | #include <pthread.h> |
| 5 | |
| 6 | class Supplicant; |
| 7 | |
| 8 | class WifiScanner { |
San Mehat | e67651c | 2009-05-12 15:50:49 -0700 | [diff] [blame] | 9 | pthread_t mThread; |
| 10 | int mCtrlPipe[2]; |
San Mehat | 1441e76 | 2009-05-07 11:37:10 -0700 | [diff] [blame] | 11 | Supplicant *mSuppl; |
| 12 | int mPeriod; |
| 13 | bool mActive; |
| 14 | |
| 15 | |
| 16 | public: |
| 17 | WifiScanner(Supplicant *suppl, int period); |
| 18 | virtual ~WifiScanner() {} |
| 19 | |
| 20 | int getPeriod() { return mPeriod; } |
| 21 | |
San Mehat | e67651c | 2009-05-12 15:50:49 -0700 | [diff] [blame] | 22 | int start(bool active); |
| 23 | int stop(); |
San Mehat | 1441e76 | 2009-05-07 11:37:10 -0700 | [diff] [blame] | 24 | |
| 25 | private: |
| 26 | static void *threadStart(void *obj); |
San Mehat | 1441e76 | 2009-05-07 11:37:10 -0700 | [diff] [blame] | 27 | |
| 28 | void run(); |
| 29 | }; |
| 30 | |
| 31 | #endif |