blob: 9ba130920cd31d089785b713d5b8f197aabaa1cc [file] [log] [blame]
San Mehat1441e762009-05-07 11:37:10 -07001#ifndef _WIFISCANNER_H
2#define _WIFISCANNER_H
3
4#include <pthread.h>
5
6class Supplicant;
7
8class WifiScanner {
9 pthread_t mWorker;
10 pthread_mutex_t mWorkerLock;
11 bool mWorkerRunning;
12 bool mAbortRequest;
13 pthread_mutex_t mAbortRequestLock;
14
15 Supplicant *mSuppl;
16 int mPeriod;
17 bool mActive;
18
19
20public:
21 WifiScanner(Supplicant *suppl, int period);
22 virtual ~WifiScanner() {}
23
24 int getPeriod() { return mPeriod; }
25
26 int startPeriodicScan(bool active);
27 int stopPeriodicScan();
28
29private:
30 static void *threadStart(void *obj);
31 static void threadCleanup(void *obj);
32
33 void run();
34};
35
36#endif