TIVI-1924: Initial commit of IVI settings daemon.
[profile/ivi/settings-daemon.git] / lib / loader.hpp
1 /**
2  * @file loader.hpp
3  *
4  * @brief Settings plugin loader header.
5  *
6  * @author Ossama Othman @<ossama.othman@@intel.com@>
7  *
8  * @copyright @par
9  * Copyright 2012, 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  * @note This header is internal.
27  */
28
29
30 #ifndef IVI_SETTINGS_LOADER_HPP
31 #define IVI_SETTINGS_LOADER_HPP
32
33 #include <string>
34
35
36 namespace ivi
37 {
38   namespace settings
39   {
40     class manager;
41
42     /**
43      * @class loader
44      *
45      * @brief Class that dynamically loads settings plugins.
46      *
47      * This class provides the native backend implementations of the
48      * Tizen IVI Settings app.  It delegates all method alls on to a
49      * dynamically loaded settings plugin.
50      */
51     class loader
52     {
53     public:
54
55       /// Constructor
56       /**
57        * @param[in] plugin_name Path, including filename, of settings
58        *                        plugin.
59        * @param[in] mgr         Settings manager.
60        */
61       loader(std::string const & plugin_name,
62              manager & mgr);
63
64       /// Destructor.
65       ~loader();
66
67     private:
68
69       /**
70        * @name Prevent copying
71        */
72       //@{
73       loader(loader const &) = delete;
74       loader & operator=(loader const &) = delete;
75       //@}
76
77     private:
78
79       /// Handle to provider plugin.
80       void * const handle_;
81
82     };
83
84   }
85 }
86
87 #endif  /* IVI_SETTINGS_LOADER_HPP */
88
89
90 // Local Variables:
91 // mode:c++
92 // c-basic-offset:2
93 // indent-tabs-mode: nil
94 // End: