Solid
storageaccess.h
Go to the documentation of this file.
00001 /* 00002 Copyright 2006-2007 Kevin Ottens <ervin@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) version 3, or any 00008 later version accepted by the membership of KDE e.V. (or its 00009 successor approved by the membership of KDE e.V.), which shall 00010 act as a proxy defined in Section 6 of version 3 of the license. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #ifndef SOLID_STORAGEACCESS_H 00022 #define SOLID_STORAGEACCESS_H 00023 00024 #include <solid/solid_export.h> 00025 00026 #include <solid/solidnamespace.h> 00027 #include <solid/deviceinterface.h> 00028 #include <QtCore/QVariant> 00029 00030 namespace Solid 00031 { 00032 class StorageAccessPrivate; 00033 class Device; 00034 00042 class SOLID_EXPORT StorageAccess : public DeviceInterface 00043 { 00044 Q_OBJECT 00045 Q_PROPERTY(bool accessible READ isAccessible) 00046 Q_PROPERTY(QString filePath READ filePath) 00047 Q_PROPERTY(bool ignored READ isIgnored) 00048 Q_DECLARE_PRIVATE(StorageAccess) 00049 friend class Device; 00050 00051 private: 00060 explicit StorageAccess(QObject *backendObject); 00061 00062 public: 00066 virtual ~StorageAccess(); 00067 00068 00075 static Type deviceInterfaceType() { return DeviceInterface::StorageAccess; } 00076 00077 00083 bool isAccessible() const; 00084 00091 QString filePath() const; 00092 00102 bool isIgnored() const; 00103 00110 bool setup(); 00111 00118 bool teardown(); 00119 00120 Q_SIGNALS: 00128 void accessibilityChanged(bool accessible, const QString &udi); 00129 00139 void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi); 00140 00150 void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi); 00151 00159 void setupRequested(const QString &udi); 00160 00168 void teardownRequested(const QString &udi); 00169 00170 protected: 00174 StorageAccess(StorageAccessPrivate &dd, QObject *backendObject); 00175 }; 00176 } 00177 00178 #endif
KDE 4.6 API Reference