TIVI-1924: Initial commit of IVI settings daemon.
[profile/ivi/settings-daemon.git] / plugins / connman / registration.cpp
1 /**
2  * @file registration.cpp
3  *
4  * @brief Connman-based settings plugin registration.
5  *
6  * @author Ossama Othman @<ossama.othman@@intel.com@>
7  *
8  * @copyright @par
9  * Copyright 2013 Intel Corporation All Rights Reserved.
10  * @par
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation;
14  * version 2.1 of the License.
15  * @par
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  * @par
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  * Boston, MA  02110-1301  USA
25  */
26
27 #include "connman_api.hpp"
28 #include "bluetooth.hpp"
29 #include "clock.hpp"
30 #include "ethernet.hpp"
31 #include "wifi.hpp"
32
33 #include <settingsd/registrar.hpp>
34
35 #include <memory>
36
37
38 /// Plugin factory/registration function.
39 extern "C" IVI_SETTINGS_CONNMAN_API bool
40 register_settings(ivi::settings::registrar & r)
41 {
42   std::unique_ptr<ivi::settings::plugin> bt(
43     new ivi::settings::bluetooth);
44
45   std::unique_ptr<ivi::settings::plugin> clk(
46     new ivi::settings::clock);
47
48   std::unique_ptr<ivi::settings::plugin> eth(
49     new ivi::settings::ethernet);
50
51   std::unique_ptr<ivi::settings::plugin> wifi(
52     new ivi::settings::wifi);
53
54   return
55     r.register_setting(std::move(bt))
56     && r.register_setting(std::move(clk))
57     && r.register_setting(std::move(eth))
58     && r.register_setting(std::move(wifi));
59 }
60
61 // Local Variables:
62 // mode:c++
63 // c-basic-offset:2
64 // indent-tabs-mode: nil
65 // End: