KIO
ksambasharedata.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 ksambasharedata_h 00022 #define ksambasharedata_h 00023 00024 #include <QtCore/QExplicitlySharedDataPointer> 00025 #include <kio/kio_export.h> 00026 00027 class QString; 00028 class KSambaShare; 00029 class KSambaSharePrivate; 00030 class KSambaShareDataPrivate; 00031 00039 class KIO_EXPORT KSambaShareData 00040 { 00041 00042 public: 00043 enum GuestPermission { 00044 GuestsNotAllowed, 00045 GuestsAllowed 00046 }; 00047 00048 enum UserShareError { 00049 UserShareOk, 00050 UserShareExceedMaxShares, 00051 UserShareNameOk, 00052 UserShareNameInvalid, 00053 UserShareNameInUse, 00054 UserSharePathOk, 00055 UserSharePathInvalid, 00056 UserSharePathNotExists, 00057 UserSharePathNotDirectory, 00058 UserSharePathNotAbsolute, 00059 UserSharePathNotAllowed, 00060 UserShareAclOk, 00061 UserShareAclInvalid, 00062 UserShareAclUserNotValid, 00063 UserShareCommentOk, 00064 UserShareGuestsOk, 00065 UserShareGuestsInvalid, 00066 UserShareGuestsNotAllowed, 00067 UserShareSystemError 00068 }; 00069 00070 KSambaShareData(); 00071 KSambaShareData(const KSambaShareData &other); 00072 00073 ~KSambaShareData(); 00074 00078 QString name() const; 00079 00083 QString path() const; 00084 00088 QString comment() const; 00089 00097 QString acl() const; 00098 00102 KSambaShareData::GuestPermission guestPermission() const; 00103 00118 KSambaShareData::UserShareError setName(const QString &name); 00119 00132 KSambaShareData::UserShareError setPath(const QString &path); 00133 00141 KSambaShareData::UserShareError setComment(const QString &comment); 00142 00152 KSambaShareData::UserShareError setAcl(const QString &acl); 00153 00163 KSambaShareData::UserShareError setGuestPermission(const GuestPermission &permission = KSambaShareData::GuestsNotAllowed); 00164 00170 KSambaShareData::UserShareError save(); 00171 00177 KSambaShareData::UserShareError remove(); 00178 00179 KSambaShareData &operator=(const KSambaShareData &other); 00180 bool operator==(const KSambaShareData &other) const; 00181 bool operator!=(const KSambaShareData &other) const; 00182 00183 private: 00184 QExplicitlySharedDataPointer<KSambaShareDataPrivate> dd; 00185 00186 friend class KSambaSharePrivate; 00187 }; 00188 00189 #endif
KDE 4.7 API Reference