mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
37 lines
656 B
C++
37 lines
656 B
C++
#ifndef URB_SERVER_H
|
|
#define URB_SERVER_H
|
|
|
|
#include <map>
|
|
#include "../Interface/Pipe.h"
|
|
#include "../Interface/Thread.h"
|
|
#include "../Interface/Query.h"
|
|
#include "fileclient/FileClient.h"
|
|
|
|
struct SClient
|
|
{
|
|
IPipe *pipe;
|
|
int offlinecount;
|
|
sockaddr_in addr;
|
|
};
|
|
|
|
class BackupServer : public IThread
|
|
{
|
|
public:
|
|
BackupServer(IPipe *pExitpipe);
|
|
|
|
void operator()(void);
|
|
|
|
private:
|
|
void findClients(FileClient &fc);
|
|
void startClients(FileClient &fc);
|
|
void removeAllClients(void);
|
|
|
|
std::map<std::string, SClient> clients;
|
|
|
|
IQuery *q_get_extra_hostnames;
|
|
IQuery *q_update_extra_ip;
|
|
|
|
IPipe *exitpipe;
|
|
};
|
|
|
|
#endif //URB_SERVER_H
|