platform_system_core/nexus/WifiScanner.h
San Mehat 1441e769b2 nexus: Implement wifi scanner and fix a lot of bugs
Signed-off-by: San Mehat <san@google.com>
2009-05-09 10:33:18 -07:00

36 lines
676 B
C++

#ifndef _WIFISCANNER_H
#define _WIFISCANNER_H
#include <pthread.h>
class Supplicant;
class WifiScanner {
pthread_t mWorker;
pthread_mutex_t mWorkerLock;
bool mWorkerRunning;
bool mAbortRequest;
pthread_mutex_t mAbortRequestLock;
Supplicant *mSuppl;
int mPeriod;
bool mActive;
public:
WifiScanner(Supplicant *suppl, int period);
virtual ~WifiScanner() {}
int getPeriod() { return mPeriod; }
int startPeriodicScan(bool active);
int stopPeriodicScan();
private:
static void *threadStart(void *obj);
static void threadCleanup(void *obj);
void run();
};
#endif