• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • tdeio
  • tdeio
kacl.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 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#include <sys/types.h>
24#include <tdeio/global.h>
25
26typedef TQPair<TQString, unsigned short> ACLUserPermissions;
27typedef TQValueList<ACLUserPermissions> ACLUserPermissionsList;
28typedef TQValueListIterator<ACLUserPermissions> ACLUserPermissionsIterator;
29typedef TQValueListConstIterator<ACLUserPermissions> ACLUserPermissionsConstIterator;
30
31typedef TQPair<TQString, unsigned short> ACLGroupPermissions;
32typedef TQValueList<ACLGroupPermissions> ACLGroupPermissionsList;
33typedef TQValueListIterator<ACLGroupPermissions> ACLGroupPermissionsIterator;
34typedef TQValueListConstIterator<ACLGroupPermissions> ACLGroupPermissionsConstIterator;
35
42class TDEIO_EXPORT KACL
43{
44public:
49 KACL( const TQString & aclString );
50
52 KACL( const KACL& rhs );
53
58 KACL( mode_t basicPermissions );
59
64 KACL();
65
66 virtual ~KACL();
67
68 KACL& operator=( const KACL& rhs ) {
69 if ( this != &rhs )
70 setACL( rhs.asString() );
71 return *this;
72 }
73
74 bool operator==( const KACL& rhs ) const;
75
76 bool operator!=( const KACL& rhs ) const {
77 return !operator==( rhs );
78 }
79
84 bool isValid() const;
85
91 unsigned short ownerPermissions() const;
92
95 bool setOwnerPermissions( unsigned short );
96
98 unsigned short owningGroupPermissions() const;
99
102 bool setOwningGroupPermissions( unsigned short );
103
105 unsigned short othersPermissions() const;
106
109 bool setOthersPermissions( unsigned short );
110
112 mode_t basePermissions() const;
113
121 bool isExtended() const;
122
127 unsigned short maskPermissions( bool &exists ) const;
128
133 bool setMaskPermissions( unsigned short );
134
140 unsigned short namedUserPermissions( const TQString& name, bool *exists ) const;
141
142
146 bool setNamedUserPermissions( const TQString& name, unsigned short );
147
152 ACLUserPermissionsList allUserPermissions() const;
153
158 bool setAllUserPermissions( const ACLUserPermissionsList &list );
159
165 unsigned short namedGroupPermissions( const TQString& name, bool *exists ) const;
166
170 bool setNamedGroupPermissions( const TQString& name, unsigned short );
171
177 ACLGroupPermissionsList allGroupPermissions() const;
182 bool setAllGroupPermissions( const ACLGroupPermissionsList & );
183
187 bool setACL( const TQString &aclStr );
188
193 TQString asString() const;
194
195protected:
196 virtual void virtual_hook( int id, void* data );
197private:
198 class KACLPrivate;
199 KACLPrivate * d;
200 TDEIO_EXPORT friend TQDataStream & operator<< ( TQDataStream & s, const KACL & a );
201 TDEIO_EXPORT friend TQDataStream & operator>> ( TQDataStream & s, KACL & a );
202};
203
204TDEIO_EXPORT TQDataStream & operator<< ( TQDataStream & s, const KACL & a );
205TDEIO_EXPORT TQDataStream & operator>> ( TQDataStream & s, KACL & a );
206
207#endif
KACL
The KCAL class encapsulates a POSIX Access Control List.
Definition kacl.h:43
KACL::asString
TQString asString() const
Return a string representation of the ACL.
Definition kacl.cpp:606

tdeio/tdeio

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

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.8
This website is maintained by Timothy Pearson.