1 /*
2     Copyright 2010 Mario Bensi <mbensi@ipsquad.net>
3 
4     This library is free software; you can redistribute it and/or
5     modify it under the terms of the GNU Lesser General Public
6     License as published by the Free Software Foundation; either
7     version 2.1 of the License, or (at your option) version 3, or any
8     later version accepted by the membership of KDE e.V. (or its
9     successor approved by the membership of KDE e.V.), which shall
10     act as a proxy defined in Section 6 of version 3 of the license.
11 
12     This library is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     Lesser General Public License for more details.
16 
17     You should have received a copy of the GNU Lesser General Public
18     License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #include "rootdevice.h"
22 #include <QStringList>
23 
24 using namespace Solid::Backends::Shared;
25 
RootDevice(const QString & udi,const QString & parentUdi)26 RootDevice::RootDevice(const QString &udi, const QString &parentUdi) :
27     Solid::Ifaces::Device(),
28     m_udi(udi),
29     m_parentUdi(parentUdi),
30     m_vendor("KDE")
31 {
32 }
33 
~RootDevice()34 RootDevice::~RootDevice()
35 {
36 }
37 
udi() const38 QString RootDevice::udi() const
39 {
40     return m_udi;
41 }
42 
parentUdi() const43 QString RootDevice::parentUdi() const
44 {
45     return m_parentUdi;
46 }
47 
vendor() const48 QString RootDevice::vendor() const
49 {
50     return m_vendor;
51 }
52 
setVendor(const QString & vendor)53 void RootDevice::setVendor(const QString &vendor)
54 {
55     m_vendor = vendor;
56 }
57 
product() const58 QString RootDevice::product() const
59 {
60     return m_product;
61 }
62 
setProduct(const QString & product)63 void RootDevice::setProduct(const QString &product)
64 {
65     m_product = product;
66 }
67 
icon() const68 QString RootDevice::icon() const
69 {
70     return m_icon;
71 }
72 
setIcon(const QString & icon)73 void RootDevice::setIcon(const QString &icon)
74 {
75     m_icon = icon;
76 }
77 
emblems() const78 QStringList RootDevice::emblems() const
79 {
80     return m_emblems;
81 }
82 
setEmblems(const QStringList & emblems)83 void RootDevice::setEmblems(const QStringList &emblems)
84 {
85     m_emblems = emblems;
86 }
87 
description() const88 QString RootDevice::description() const
89 {
90     return m_description;
91 }
92 
setDescription(const QString & description)93 void RootDevice::setDescription(const QString &description)
94 {
95     m_description = description;
96 }
97 
queryDeviceInterface(const Solid::DeviceInterface::Type &) const98 bool RootDevice::queryDeviceInterface(const Solid::DeviceInterface::Type&) const
99 {
100     return false;
101 }
102 
createDeviceInterface(const Solid::DeviceInterface::Type &)103 QObject* RootDevice::createDeviceInterface(const Solid::DeviceInterface::Type&)
104 {
105     return nullptr;
106 }
107