|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: This class implements a plugin's description (metadata). |
|
19 * |
|
20 */ |
|
21 |
|
22 #include "xqplugininfo.h" |
|
23 #include "xqplugininfoprivate.h" |
|
24 |
|
25 |
|
26 /*! |
|
27 Constructs plugin info object. |
|
28 */ |
|
29 XQPluginInfo::XQPluginInfo() |
|
30 : |
|
31 d_ptr(new XQPluginInfoPrivate()) |
|
32 { |
|
33 } |
|
34 |
|
35 /*! |
|
36 Constructs copy of plugin info object. |
|
37 */ |
|
38 XQPluginInfo::XQPluginInfo(const XQPluginInfo &pluginInfo) |
|
39 : |
|
40 d_ptr(new XQPluginInfoPrivate(*pluginInfo.d_ptr)) |
|
41 { |
|
42 } |
|
43 |
|
44 /*! |
|
45 Constructs plugin info object with given data. |
|
46 */ |
|
47 XQPluginInfo::XQPluginInfo(quint32 id, |
|
48 quint32 version, |
|
49 const QString &dllName, |
|
50 const QString &opaqueData) |
|
51 : |
|
52 d_ptr(new XQPluginInfoPrivate(id, version, dllName, opaqueData)) |
|
53 { |
|
54 } |
|
55 |
|
56 /*! |
|
57 Assignment operator. |
|
58 */ |
|
59 XQPluginInfo &XQPluginInfo::operator=(const XQPluginInfo &other) |
|
60 { |
|
61 if (this != &other) { |
|
62 if (d_ptr != 0){ |
|
63 delete d_ptr; |
|
64 } |
|
65 d_ptr = new XQPluginInfoPrivate(*other.d_ptr); |
|
66 } |
|
67 return *this; |
|
68 } |
|
69 |
|
70 /*! |
|
71 Destroys plugin info object. |
|
72 */ |
|
73 XQPluginInfo::~XQPluginInfo() |
|
74 { |
|
75 if (d_ptr != 0){ |
|
76 delete d_ptr; |
|
77 } |
|
78 } |
|
79 |
|
80 /*! |
|
81 Returns plugin implementation UID. |
|
82 */ |
|
83 quint32 XQPluginInfo::uid() const |
|
84 { |
|
85 return d_ptr->uid(); |
|
86 } |
|
87 |
|
88 /*! |
|
89 Returns plugin implementation version. |
|
90 */ |
|
91 quint32 XQPluginInfo::version() const |
|
92 { |
|
93 return d_ptr->version(); |
|
94 } |
|
95 |
|
96 /*! |
|
97 Returns plugin dll name. |
|
98 */ |
|
99 const QString& XQPluginInfo::dllName() const |
|
100 { |
|
101 return d_ptr->dllName(); |
|
102 } |
|
103 |
|
104 /*! |
|
105 Returns plugin implementation opaque data. This is given by SERVICE.CONFIGURATION variable in pro file of the plugin. |
|
106 */ |
|
107 const QString& XQPluginInfo::opaqueData() const |
|
108 { |
|
109 return d_ptr->opaqueData(); |
|
110 } |