CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
resolv_conf_event_handler.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_RESOLV_CONF_EVENT_HANDLER_H_
6 #define CVMFS_RESOLV_CONF_EVENT_HANDLER_H_
7 
8 #include <string>
9 #include <utility>
10 #include <vector>
11 
12 #include "file_watcher.h"
13 #include "network/download.h"
14 
15 namespace download {
16 
17 class DownloadManager;
18 
19 } // namespace download
20 
22  public:
29  typedef std::vector<std::pair<int, std::string> > AddressList;
30 
32  download::DownloadManager* external_download_manager);
33  virtual ~ResolvConfEventHandler();
34 
35  virtual bool Handle(const std::string& file_path,
36  file_watcher::Event event,
37  bool* clear_handler);
38 
39  static void GetDnsAddresses(const std::string& resolv_file,
40  AddressList* addresses);
41 
42  static void SetDnsAddress(download::DownloadManager* download_manager,
43  const AddressList& addresses);
44 
45  private:
48 };
49 
50 #endif // CVMFS_RESOLV_CONF_EVENT_HANDLER_H_
ResolvConfEventHandler(download::DownloadManager *download_manager, download::DownloadManager *external_download_manager)
static void SetDnsAddress(download::DownloadManager *download_manager, const AddressList &addresses)
download::DownloadManager * external_download_manager_
download::DownloadManager * download_manager_
static void GetDnsAddresses(const std::string &resolv_file, AddressList *addresses)
std::vector< std::pair< int, std::string > > AddressList
virtual bool Handle(const std::string &file_path, file_watcher::Event event, bool *clear_handler)