• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

kacl.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2005 Till Adam <adam@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef __kacl_h__
00021 #define __kacl_h__
00022 
00023 #include <sys/types.h>
00024 #include <kio/global.h>
00025 
00026 typedef QPair<QString, unsigned short> ACLUserPermissions;
00027 typedef QValueList<ACLUserPermissions> ACLUserPermissionsList;
00028 typedef QValueListIterator<ACLUserPermissions> ACLUserPermissionsIterator;
00029 typedef QValueListConstIterator<ACLUserPermissions> ACLUserPermissionsConstIterator;
00030 
00031 typedef QPair<QString, unsigned short> ACLGroupPermissions;
00032 typedef QValueList<ACLGroupPermissions> ACLGroupPermissionsList;
00033 typedef QValueListIterator<ACLGroupPermissions> ACLGroupPermissionsIterator;
00034 typedef QValueListConstIterator<ACLGroupPermissions> ACLGroupPermissionsConstIterator;
00035 
00042 class KIO_EXPORT KACL
00043 {
00044 public:
00049   KACL( const QString & aclString );
00050 
00052   KACL( const KACL& rhs );
00053 
00058   KACL( mode_t basicPermissions );
00059 
00064   KACL();
00065 
00066   virtual ~KACL();
00067 
00068   KACL& operator=( const KACL& rhs ) { 
00069     if ( this != &rhs )
00070       setACL( rhs.asString() );
00071     return *this;
00072   }
00073 
00074   bool operator==( const KACL& rhs ) const;
00075 
00076   bool operator!=( const KACL& rhs ) const {
00077     return !operator==( rhs );
00078   }
00079 
00084   bool isValid() const;
00085 
00091   unsigned short ownerPermissions() const;
00092 
00095   bool setOwnerPermissions( unsigned short );
00096 
00098   unsigned short owningGroupPermissions() const;
00099 
00102   bool setOwningGroupPermissions( unsigned short );
00103 
00105   unsigned short othersPermissions() const;
00106 
00109   bool setOthersPermissions( unsigned short );
00110 
00112   mode_t basePermissions() const;
00113 
00121   bool isExtended() const;
00122 
00127   unsigned short maskPermissions( bool &exists ) const;
00128 
00133   bool setMaskPermissions( unsigned short );
00134 
00140   unsigned short namedUserPermissions( const QString& name, bool *exists ) const;
00141 
00142 
00146   bool setNamedUserPermissions( const QString& name, unsigned short );
00147 
00152   ACLUserPermissionsList allUserPermissions() const;
00153 
00158   bool setAllUserPermissions( const ACLUserPermissionsList &list );
00159 
00165   unsigned short namedGroupPermissions( const QString& name, bool *exists ) const;
00166 
00170   bool setNamedGroupPermissions( const QString& name, unsigned short );
00171 
00177   ACLGroupPermissionsList allGroupPermissions() const;
00182   bool setAllGroupPermissions( const ACLGroupPermissionsList & );
00183 
00187   bool setACL( const QString &aclStr );
00188 
00193   QString asString() const;
00194 
00195 protected:
00196   virtual void virtual_hook( int id, void* data );
00197 private:
00198   class KACLPrivate;
00199   KACLPrivate * d;
00200   KIO_EXPORT friend QDataStream & operator<< ( QDataStream & s, const KACL & a );
00201   KIO_EXPORT friend QDataStream & operator>> ( QDataStream & s, KACL & a );
00202 };
00203 
00204 KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KACL & a );
00205 KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KACL & a );
00206 
00207 #endif

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal