• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • sources
  • kde-4.14
  • kdelibs
  • kio
  • kio
kacl.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2005 - 2007 Till Adam <adam@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef KACL_H
21 #define KACL_H
22 
23 
24 #include <sys/types.h>
25 #include <kio/global.h>
26 
27 #include <QtCore/QPair>
28 #include <QtCore/QList>
29 
30 
31 typedef QPair<QString, unsigned short> ACLUserPermissions;
32 typedef QList<ACLUserPermissions> ACLUserPermissionsList;
33 typedef QList<ACLUserPermissions>::iterator ACLUserPermissionsIterator;
34 typedef QList<ACLUserPermissions>::const_iterator ACLUserPermissionsConstIterator;
35 
36 typedef QPair<QString, unsigned short> ACLGroupPermissions;
37 typedef QList<ACLGroupPermissions> ACLGroupPermissionsList;
38 typedef QList<ACLGroupPermissions>::iterator ACLGroupPermissionsIterator;
39 typedef QList<ACLGroupPermissions>::const_iterator ACLGroupPermissionsConstIterator;
40 
47 class KIO_EXPORT KACL
48 {
49 public:
54  KACL( const QString & aclString );
55 
57  KACL( const KACL& rhs );
58 
63  KACL( mode_t basicPermissions );
64 
69  KACL();
70 
71  virtual ~KACL();
72 
73  KACL& operator=( const KACL& rhs );
74 
75  bool operator==( const KACL& rhs ) const;
76 
77  bool operator!=( const KACL& rhs ) const;
78 
83  bool isValid() const;
84 
90  unsigned short ownerPermissions() const;
91 
94  bool setOwnerPermissions( unsigned short );
95 
97  unsigned short owningGroupPermissions() const;
98 
101  bool setOwningGroupPermissions( unsigned short );
102 
104  unsigned short othersPermissions() const;
105 
108  bool setOthersPermissions( unsigned short );
109 
111  mode_t basePermissions() const;
112 
120  bool isExtended() const;
121 
126  unsigned short maskPermissions( bool &exists ) const;
127 
132  bool setMaskPermissions( unsigned short );
133 
139  unsigned short namedUserPermissions( const QString& name, bool *exists ) const;
140 
144  bool setNamedUserPermissions( const QString& name, unsigned short );
145 
150  ACLUserPermissionsList allUserPermissions() const;
151 
156  bool setAllUserPermissions( const ACLUserPermissionsList &list );
157 
163  unsigned short namedGroupPermissions( const QString& name, bool *exists ) const;
164 
168  bool setNamedGroupPermissions( const QString& name, unsigned short );
169 
175  ACLGroupPermissionsList allGroupPermissions() const;
180  bool setAllGroupPermissions( const ACLGroupPermissionsList & );
181 
185  bool setACL( const QString &aclStr );
186 
191  QString asString() const;
192 
193 protected:
194  virtual void virtual_hook( int id, void* data );
195 private:
196  class KACLPrivate;
197  KACLPrivate* const d;
198  KIO_EXPORT friend QDataStream & operator<< ( QDataStream & s, const KACL & a );
199  KIO_EXPORT friend QDataStream & operator>> ( QDataStream & s, KACL & a );
200 };
201 
202 KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KACL & a );
203 KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KACL & a );
204 
205 #endif
QDataStream
ACLGroupPermissionsList
QList< ACLGroupPermissions > ACLGroupPermissionsList
Definition: kacl.h:37
ACLGroupPermissions
QPair< QString, unsigned short > ACLGroupPermissions
Definition: kacl.h:36
name
const char * name(StandardAction id)
ACLGroupPermissionsConstIterator
QList< ACLGroupPermissions >::const_iterator ACLGroupPermissionsConstIterator
Definition: kacl.h:39
global.h
QList::const_iterator
ACLUserPermissionsIterator
QList< ACLUserPermissions >::iterator ACLUserPermissionsIterator
Definition: kacl.h:33
QString
QList
QList::iterator
ACLGroupPermissionsIterator
QList< ACLGroupPermissions >::iterator ACLGroupPermissionsIterator
Definition: kacl.h:38
QPair
ACLUserPermissions
QPair< QString, unsigned short > ACLUserPermissions
Definition: kacl.h:31
operator>>
QDataStream & operator>>(QDataStream &s, KACL &a)
Definition: kacl.cpp:664
KACL
The KACL class encapsulates a POSIX Access Control List.
Definition: kacl.h:47
ACLUserPermissionsConstIterator
QList< ACLUserPermissions >::const_iterator ACLUserPermissionsConstIterator
Definition: kacl.h:34
operator!=
int operator!=(KSSLCertificate &x, KSSLCertificate &y)
Definition: ksslcertificate.h:397
operator<<
QDataStream & operator<<(QDataStream &s, const KACL &a)
Definition: kacl.cpp:658
operator==
int operator==(KSSLCertificate &x, KSSLCertificate &y)
Definition: ksslcertificate.cpp:1026
KRecentDirs::list
QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition: krecentdirs.cpp:60
ACLUserPermissionsList
QList< ACLUserPermissions > ACLUserPermissionsList
Definition: kacl.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal