Fixed member naming.
[bpdyndnsd] / src / updater.cpp
1 /** @file
2  * @brief The updater class implementation. This class implements the updater logic.
3  *
4  *
5  *
6  * @copyright Intra2net AG
7  * @license GPLv2
8 */
9
10 #include "updater.h"
11
12 #include <boost/foreach.hpp>
13
14
15 /**
16  * Default constructor which initializes the member Conf.
17  */
18 Updater::Updater()
19     : Conf(NULL)
20 {
21 }
22
23
24 /**
25  * Constructor.
26  * @param _conf A pointer to a Config object.
27  */
28 Updater::Updater(Config* _conf)
29 {
30     Conf = _conf;
31 }
32
33
34 /**
35  * Default destructor.
36  */
37 Updater::~Updater()
38 {
39     Conf = NULL;
40 }
41
42
43 /**
44  * Setter for member Conf.
45  * @param _conf
46  */
47 void Updater::set_config(Config* _conf)
48 {
49     Conf = _conf;
50 }
51
52
53 /**
54  * Getter for member Conf.
55  * @return Conf.
56  */
57 Config* Updater::get_config()
58 {
59     return Conf;
60 }
61
62
63 /**
64  * Update all configured services.
65  */
66 void Updater::update_services()
67 {
68     list<Service*> services = this->Conf->get_services();
69
70     string ip = "192.168.1.1";
71
72     BOOST_FOREACH( Service * service, services )
73     {
74         service->update(ip);
75     }
76 }