KIO
ksambashare_p.h
Go to the documentation of this file.
00001 /* 00002 * Copyright 2010 Rodrigo Belem <rclbelem@gmail.com> 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 ksambashare_p_h 00022 #define ksambashare_p_h 00023 00024 #include <QtCore/QMap> 00025 00026 #include "ksambasharedata.h" 00027 00028 class QString; 00029 class KSambaShare; 00030 00031 class KSambaSharePrivate 00032 { 00033 00034 public: 00035 KSambaSharePrivate(KSambaShare *parent); 00036 ~KSambaSharePrivate(); 00037 00038 static bool isSambaInstalled(); 00039 bool findSmbConf(); 00040 void setUserSharePath(); 00041 00042 static int runProcess(const QString &progName, const QStringList &args, 00043 QByteArray &stdOut, QByteArray &stdErr); 00044 static QString testparmParamValue(const QString ¶meterName); 00045 00046 QByteArray getNetUserShareInfo(); 00047 QStringList shareNames() const; 00048 QStringList sharedDirs() const; 00049 KSambaShareData getShareByName(const QString &shareName) const; 00050 QList<KSambaShareData> getSharesByPath(const QString &path) const; 00051 00052 bool isShareNameValid(const QString &name) const; 00053 bool isDirectoryShared(const QString &path) const; 00054 bool isShareNameAvailable(const QString &name) const; 00055 KSambaShareData::UserShareError isPathValid(const QString &path) const; 00056 KSambaShareData::UserShareError isAclValid(const QString &acl) const; 00057 KSambaShareData::UserShareError guestsAllowed(const KSambaShareData::GuestPermission &guestok) const; 00058 00059 KSambaShareData::UserShareError add(const KSambaShareData &shareData); 00060 KSambaShareData::UserShareError remove(const KSambaShareData &shareName) const; 00061 bool sync(); 00062 00063 void _k_slotFileChange(const QString &path); 00064 00065 private: 00066 KSambaShare * const q_ptr; 00067 Q_DECLARE_PUBLIC(KSambaShare) 00068 00069 QMap<QString, KSambaShareData> data; 00070 QString smbConf; 00071 QString userSharePath; 00072 bool skipUserShare; 00073 }; 00074 00075 #endif
KDE 4.7 API Reference