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

kio/kio

  • kio
  • kio
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 <kio/global.h>
25 
26 typedef QPair<TQString, unsigned short> ACLUserPermissions;
27 typedef TQValueList<ACLUserPermissions> ACLUserPermissionsList;
28 typedef TQValueListIterator<ACLUserPermissions> ACLUserPermissionsIterator;
29 typedef TQValueListConstIterator<ACLUserPermissions> ACLUserPermissionsConstIterator;
30 
31 typedef QPair<TQString, unsigned short> ACLGroupPermissions;
32 typedef TQValueList<ACLGroupPermissions> ACLGroupPermissionsList;
33 typedef TQValueListIterator<ACLGroupPermissions> ACLGroupPermissionsIterator;
34 typedef TQValueListConstIterator<ACLGroupPermissions> ACLGroupPermissionsConstIterator;
35 
42 class KIO_EXPORT KACL
43 {
44 public:
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 
195 protected:
196  virtual void virtual_hook( int id, void* data );
197 private:
198  class KACLPrivate;
199  KACLPrivate * d;
200  KIO_EXPORT friend TQDataStream & operator<< ( TQDataStream & s, const KACL & a );
201  KIO_EXPORT friend TQDataStream & operator>> ( TQDataStream & s, KACL & a );
202 };
203 
204 KIO_EXPORT TQDataStream & operator<< ( TQDataStream & s, const KACL & a );
205 KIO_EXPORT TQDataStream & operator>> ( TQDataStream & s, KACL & a );
206 
207 #endif
KACL::asString
TQString asString() const
Return a string representation of the ACL.
Definition: kacl.cpp:606
KACL
The KCAL class encapsulates a POSIX Access Control List.
Definition: kacl.h:42

kio/kio

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

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.8.11
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |