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

KIO

  • 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
31typedef QPair<QString, unsigned short> ACLUserPermissions;
32typedef QList<ACLUserPermissions> ACLUserPermissionsList;
33typedef QList<ACLUserPermissions>::iterator ACLUserPermissionsIterator;
34typedef QList<ACLUserPermissions>::const_iterator ACLUserPermissionsConstIterator;
35
36typedef QPair<QString, unsigned short> ACLGroupPermissions;
37typedef QList<ACLGroupPermissions> ACLGroupPermissionsList;
38typedef QList<ACLGroupPermissions>::iterator ACLGroupPermissionsIterator;
39typedef QList<ACLGroupPermissions>::const_iterator ACLGroupPermissionsConstIterator;
40
47class KIO_EXPORT KACL
48{
49public:
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
193protected:
194 virtual void virtual_hook( int id, void* data );
195private:
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
202KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KACL & a );
203KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KACL & a );
204
205#endif
KACL
The KACL class encapsulates a POSIX Access Control List.
Definition: kacl.h:48
QList
QPair
global.h
ACLUserPermissionsIterator
QList< ACLUserPermissions >::iterator ACLUserPermissionsIterator
Definition: kacl.h:33
operator>>
QDataStream & operator>>(QDataStream &s, KACL &a)
Definition: kacl.cpp:664
ACLGroupPermissionsList
QList< ACLGroupPermissions > ACLGroupPermissionsList
Definition: kacl.h:37
ACLUserPermissionsConstIterator
QList< ACLUserPermissions >::const_iterator ACLUserPermissionsConstIterator
Definition: kacl.h:34
ACLGroupPermissions
QPair< QString, unsigned short > ACLGroupPermissions
Definition: kacl.h:36
ACLUserPermissionsList
QList< ACLUserPermissions > ACLUserPermissionsList
Definition: kacl.h:32
ACLGroupPermissionsConstIterator
QList< ACLGroupPermissions >::const_iterator ACLGroupPermissionsConstIterator
Definition: kacl.h:39
ACLGroupPermissionsIterator
QList< ACLGroupPermissions >::iterator ACLGroupPermissionsIterator
Definition: kacl.h:38
operator<<
QDataStream & operator<<(QDataStream &s, const KACL &a)
Definition: kacl.cpp:658
ACLUserPermissions
QPair< QString, unsigned short > ACLUserPermissions
Definition: kacl.h:31
operator==
bool operator==(const KEntry &k1, const KEntry &k2)
operator!=
bool operator!=(const KEntry &k1, const KEntry &k2)
name
const char * name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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