Small cosmetic changes
[bpdyndnsd] / src / updater.cpp
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
17 Updater::Updater()
18     : conf(NULL)
19 {
20 }
21
22
23 Updater::Updater(Config* conf)
24 {
25     this->conf = conf;
26 }
27
28
29 Updater::~Updater()
30 {
31     conf = NULL;
32 }
33
34
35 void Updater::set_config(Config* conf)
36 {
37     this->conf = conf;
38 }
39
40
41 Config* Updater::get_config()
42 {
43     return this->conf;
44 }
45
46
47 void Updater::update_services()
48 {
49     list<Service*> services = this->conf->get_services();
50
51     string ip = "192.168.1.1";
52
53     BOOST_FOREACH( Service * service, services )
54     {
55         service->update(ip);
56     }
57 }