• 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
88
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
115
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
174
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
KACL::setNamedGroupPermissions
bool setNamedGroupPermissions(const QString &name, unsigned short)
Set the permissions for a group with the name name.
Definition kacl.cpp:541
KACL::maskPermissions
unsigned short maskPermissions(bool &exists) const
Return the entry for the permissions mask if there is one and sets exists to true.
Definition kacl.cpp:281
KACL::namedGroupPermissions
unsigned short namedGroupPermissions(const QString &name, bool *exists) const
Access to the permissions entry for a named group, if such an entry exists.
Definition kacl.cpp:516
KACL::namedUserPermissions
unsigned short namedUserPermissions(const QString &name, bool *exists) const
Access to the permissions entry for a named user, if such an entry exists.
Definition kacl.cpp:322
KACL::isExtended
bool isExtended() const
The interface to the extended ACL.
Definition kacl.cpp:131
KACL::setOthersPermissions
bool setOthersPermissions(unsigned short)
Set the permissions entry for others.
Definition kacl.cpp:254
KACL::setMaskPermissions
bool setMaskPermissions(unsigned short)
Set the permissions mask for the ACL.
Definition kacl.cpp:309
KACL::operator=
KACL & operator=(const KACL &rhs)
Definition kacl.cpp:99
KACL::setACL
bool setACL(const QString &aclStr)
Sets the whole list from a string.
Definition kacl.cpp:590
KACL::basePermissions
mode_t basePermissions() const
Definition kacl.cpp:264
KACL::KACL
KACL(const QString &aclString)
Creates a new KACL from aclString.
Definition kacl.cpp:65
KACL::isValid
bool isValid() const
Returns whether the KACL object represents a valid acl.
Definition kacl.cpp:120
KACL::setOwningGroupPermissions
bool setOwningGroupPermissions(unsigned short)
Set the owning group's permissions entry.
Definition kacl.cpp:235
KACL::virtual_hook
virtual void virtual_hook(int id, void *data)
Definition kacl.cpp:655
KACL::operator==
bool operator==(const KACL &rhs) const
Definition kacl.cpp:106
KACL::allGroupPermissions
ACLGroupPermissionsList allGroupPermissions() const
Returns the list of all group permission entries.
Definition kacl.cpp:553
KACL::setOwnerPermissions
bool setOwnerPermissions(unsigned short)
Set the owner's permissions entry.
Definition kacl.cpp:216
KACL::othersPermissions
unsigned short othersPermissions() const
Definition kacl.cpp:245
KACL::setAllUserPermissions
bool setAllUserPermissions(const ACLUserPermissionsList &list)
Replace the list of all user permissions with list.
Definition kacl.cpp:501
KACL::setNamedUserPermissions
bool setNamedUserPermissions(const QString &name, unsigned short)
Set the permissions for a user with the name name.
Definition kacl.cpp:404
KACL::allUserPermissions
ACLUserPermissionsList allUserPermissions() const
Returns the list of all group permission entries.
Definition kacl.cpp:415
KACL::operator!=
bool operator!=(const KACL &rhs) const
Definition kacl.cpp:115
KACL::asString
QString asString() const
Return a string representation of the ACL.
Definition kacl.cpp:610
KACL::setAllGroupPermissions
bool setAllGroupPermissions(const ACLGroupPermissionsList &)
Replace the list of all user permissions with list.
Definition kacl.cpp:576
KACL::ownerPermissions
unsigned short ownerPermissions() const
The standard (non-extended) part of an ACL.
Definition kacl.cpp:207
KACL::owningGroupPermissions
unsigned short owningGroupPermissions() const
Definition kacl.cpp:226
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 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