13 * |
13 * |
14 * You should have received a copy of the GNU Lesser General Public License |
14 * You should have received a copy of the GNU Lesser General Public License |
15 * along with this program. If not, |
15 * along with this program. If not, |
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
17 * |
17 * |
18 * Description: Class implement plugin description |
18 * Description: This class implements a plugin's description (metadata). |
19 * |
19 * |
20 */ |
20 */ |
21 |
21 |
22 #include "xqplugininfo.h" |
22 #include "xqplugininfo.h" |
23 #include "xqplugininfoprivate.h" |
23 #include "xqplugininfoprivate.h" |
24 |
24 |
|
25 |
|
26 /*! |
|
27 Constructs plugin info object. |
|
28 */ |
25 XQPluginInfo::XQPluginInfo() |
29 XQPluginInfo::XQPluginInfo() |
26 : |
30 : |
27 d_ptr(new XQPluginInfoPrivate()) |
31 d_ptr(new XQPluginInfoPrivate()) |
28 { |
32 { |
29 } |
33 } |
30 |
34 |
|
35 /*! |
|
36 Constructs copy of plugin info object. |
|
37 */ |
31 XQPluginInfo::XQPluginInfo(const XQPluginInfo &pluginInfo) |
38 XQPluginInfo::XQPluginInfo(const XQPluginInfo &pluginInfo) |
32 : |
39 : |
33 d_ptr(new XQPluginInfoPrivate(*pluginInfo.d_ptr)) |
40 d_ptr(new XQPluginInfoPrivate(*pluginInfo.d_ptr)) |
34 { |
41 { |
35 } |
42 } |
36 |
43 |
|
44 /*! |
|
45 Constructs plugin info object with given data. |
|
46 */ |
37 XQPluginInfo::XQPluginInfo(quint32 id, |
47 XQPluginInfo::XQPluginInfo(quint32 id, |
38 quint32 version, |
48 quint32 version, |
39 const QString &dllName, |
49 const QString &dllName, |
40 const QString &opaqueData) |
50 const QString &opaqueData) |
41 : |
51 : |
42 d_ptr(new XQPluginInfoPrivate(id, version, dllName, opaqueData)) |
52 d_ptr(new XQPluginInfoPrivate(id, version, dllName, opaqueData)) |
43 { |
53 { |
44 } |
54 } |
45 |
55 |
|
56 /*! |
|
57 Assignment operator. |
|
58 */ |
46 XQPluginInfo &XQPluginInfo::operator=(const XQPluginInfo &other) |
59 XQPluginInfo &XQPluginInfo::operator=(const XQPluginInfo &other) |
47 { |
60 { |
48 if (this != &other) { |
61 if (this != &other) { |
49 if (d_ptr != 0){ |
62 if (d_ptr != 0){ |
50 delete d_ptr; |
63 delete d_ptr; |
52 d_ptr = new XQPluginInfoPrivate(*other.d_ptr); |
65 d_ptr = new XQPluginInfoPrivate(*other.d_ptr); |
53 } |
66 } |
54 return *this; |
67 return *this; |
55 } |
68 } |
56 |
69 |
|
70 /*! |
|
71 Destroys plugin info object. |
|
72 */ |
57 XQPluginInfo::~XQPluginInfo() |
73 XQPluginInfo::~XQPluginInfo() |
58 { |
74 { |
59 if (d_ptr != 0){ |
75 if (d_ptr != 0){ |
60 delete d_ptr; |
76 delete d_ptr; |
61 } |
77 } |
62 } |
78 } |
63 |
79 |
|
80 /*! |
|
81 Returns plugin implementation UID. |
|
82 */ |
64 quint32 XQPluginInfo::uid() const |
83 quint32 XQPluginInfo::uid() const |
65 { |
84 { |
66 return d_ptr->uid(); |
85 return d_ptr->uid(); |
67 } |
86 } |
68 |
87 |
|
88 /*! |
|
89 Returns plugin implementation version. |
|
90 */ |
69 quint32 XQPluginInfo::version() const |
91 quint32 XQPluginInfo::version() const |
70 { |
92 { |
71 return d_ptr->version(); |
93 return d_ptr->version(); |
72 } |
94 } |
73 |
95 |
|
96 /*! |
|
97 Returns plugin dll name. |
|
98 */ |
74 const QString& XQPluginInfo::dllName() const |
99 const QString& XQPluginInfo::dllName() const |
75 { |
100 { |
76 return d_ptr->dllName(); |
101 return d_ptr->dllName(); |
77 } |
102 } |
78 |
103 |
|
104 /*! |
|
105 Returns plugin implementation opaque data. This is given by SERVICE.CONFIGURATION variable in pro file of the plugin. |
|
106 */ |
79 const QString& XQPluginInfo::opaqueData() const |
107 const QString& XQPluginInfo::opaqueData() const |
80 { |
108 { |
81 return d_ptr->opaqueData(); |
109 return d_ptr->opaqueData(); |
82 } |
110 } |