kget
authenticationmonitor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef BTAUTHENTICATIONMONITOR_H
00021 #define BTAUTHENTICATIONMONITOR_H
00022
00023 #include <list>
00024 #include <vector>
00025 #include <btcore_export.h>
00026 #ifdef Q_WS_WIN
00027 #include <util/mingw.h>
00028 #endif
00029
00030 struct pollfd;
00031
00032 namespace bt
00033 {
00034 class AuthenticateBase;
00035
00041 class BTCORE_EXPORT AuthenticationMonitor
00042 {
00043 std::list<AuthenticateBase*> auths;
00044 std::vector<struct pollfd> fd_vec;
00045
00046 static AuthenticationMonitor self;
00047
00048 AuthenticationMonitor();
00049 public:
00050
00051 virtual ~AuthenticationMonitor();
00052
00053
00058 void add(AuthenticateBase* s);
00059
00064 void remove(AuthenticateBase* s);
00065
00069 void update();
00070
00074 void clear();
00075
00076 static AuthenticationMonitor & instance() {return self;}
00077 private:
00078 void handleData();
00079 };
00080
00081 }
00082
00083 #endif