Commit | Line | Data |
---|---|---|
4545a371 BS |
1 | // |
2 | // C++ Implementation: updater | |
3 | // | |
4 | // Description: | |
5 | // | |
6 | // | |
7 | // Author: Bjoern Sikora <bjoern.sikora@intra2net.com>, (C) 2009 | |
8 | // | |
9 | // Copyright: See COPYING file that comes with this distribution | |
10 | // | |
11 | // | |
12 | #include "updater.h" | |
13 | ||
14 | #include <boost/foreach.hpp> | |
15 | ||
16 | Updater::Updater() | |
17 | { | |
18 | } | |
19 | ||
20 | Updater::Updater(Config* conf) | |
21 | { | |
22 | this->conf = conf; | |
23 | } | |
24 | ||
25 | Updater::~Updater() | |
26 | { | |
27 | } | |
28 | ||
29 | void Updater::set_config(Config* conf) | |
30 | { | |
31 | this->conf = conf; | |
32 | } | |
33 | ||
34 | Config* Updater::get_config() | |
35 | { | |
36 | return this->conf; | |
37 | } | |
38 | ||
39 | void Updater::update_services() | |
40 | { | |
41 | list<Service*> services = this->conf->get_services(); | |
42 | ||
43 | string ip = "192.168.1.1"; | |
44 | ||
45 | BOOST_FOREACH( Service * service, services ) | |
46 | { | |
47 | service->update(ip); | |
48 | } | |
49 | } |