KDECore
kmountpoint.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the KDE libraries 00003 Copyright (c) 2003 Waldo Bastian <bastian@kde.org> 00004 2007 David Faure <faure@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License version 2 as published by the Free Software Foundation. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KMOUNTPOINT_H 00022 #define KMOUNTPOINT_H 00023 00024 #include <kdecore_export.h> 00025 #include <ksharedptr.h> 00026 00027 #include <QtCore/QStringList> 00028 00035 class KDECORE_EXPORT KMountPoint : public KShared 00036 { 00037 public: 00038 typedef KSharedPtr<KMountPoint> Ptr; 00042 class KDECORE_EXPORT List : public QList<Ptr> 00043 { 00044 public: 00045 List(); 00053 Ptr findByPath(const QString& path) const; 00054 00061 Ptr findByDevice(const QString& device) const; 00062 }; 00063 public: 00070 enum DetailsNeededFlag { BasicInfoNeeded = 0, NeedMountOptions = 1, NeedRealDeviceName = 2 }; 00071 Q_DECLARE_FLAGS(DetailsNeededFlags, DetailsNeededFlag) 00072 00073 00078 static List possibleMountPoints(DetailsNeededFlags infoNeeded = BasicInfoNeeded); 00079 00085 static List currentMountPoints(DetailsNeededFlags infoNeeded = BasicInfoNeeded); 00086 00091 QString mountedFrom() const; 00092 00098 QString realDeviceName() const; 00099 00103 QString mountPoint() const; 00104 00108 QString mountType() const; 00109 00114 QStringList mountOptions() const; 00115 00120 bool probablySlow() const; 00121 00122 enum FileSystemFlag { SupportsChmod, SupportsChown, SupportsUTime, 00123 SupportsSymlinks, CaseInsensitive }; 00142 bool testFileSystemFlag(FileSystemFlag flag) const; 00143 00147 ~KMountPoint(); 00148 00149 private: 00153 KMountPoint(); 00154 00155 class Private; 00156 Private * const d; 00157 }; 00158 00159 Q_DECLARE_OPERATORS_FOR_FLAGS(KMountPoint::DetailsNeededFlags) 00160 00161 #endif // KMOUNTPOINT_H 00162
KDE 4.6 API Reference