kio Library API Documentation

chmodjob.h

00001 // -*- c++ -*- 00002 /* This file is part of the KDE libraries 00003 Copyright (C) 2000 David Faure <faure@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 00019 */ 00020 00021 #ifndef __kio_chmodjob_h__ 00022 #define __kio_chmodjob_h__ 00023 00024 #include <kurl.h> 00025 #include <qstring.h> 00026 00027 #include <kio/global.h> 00028 #include <kio/job.h> 00029 #include <kfileitem.h> 00030 00031 /* 00032 00033 NOTE : This job is currently in ksycoca because kfileitem needs to know 00034 about mimetypes. For KDE 3.0, make a base class for KFileItem, that holds 00035 all the information except the mimetype, so that jobs can use it. 00036 00037 */ 00038 00039 namespace KIO { 00040 00041 struct ChmodInfo; 00042 00048 class ChmodJob : public KIO::Job 00049 { 00050 Q_OBJECT 00051 public: 00055 ChmodJob( const KFileItemList & lstItems, int permissions, int mask, 00056 int newOwner, int newGroup, 00057 bool recursive, bool showProgressInfo ); 00058 00059 protected: 00060 void chmodNextFile(); 00061 00062 protected slots: 00063 00064 virtual void slotResult( KIO::Job *job ); 00065 void slotEntries( KIO::Job * , const KIO::UDSEntryList & ); 00066 void processList(); 00067 00068 private: 00069 enum { STATE_LISTING, STATE_CHMODING } state; 00070 int m_permissions; 00071 int m_mask; 00072 int m_newOwner; 00073 int m_newGroup; 00074 bool m_recursive; 00075 KFileItemList m_lstItems; 00076 QValueList<ChmodInfo> m_infos; 00077 protected: 00078 virtual void virtual_hook( int id, void* data ); 00079 private: 00080 class ChmodJobPrivate* d; 00081 }; 00082 00083 00108 ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int mask, 00109 QString newOwner, QString newGroup, 00110 bool recursive, bool showProgressInfo = true ); 00111 00112 } 00113 00114 #endif
KDE Logo
This file is part of the documentation for kio Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 16 17:22:27 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003