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 <kfileitem.h>
00029 
00030 /*
00031 
00032  NOTE : This job is currently in ksycoca because kfileitem needs to know
00033  about mimetypes. For KDE 3.0, make a base class for KFileItem, that holds
00034  all the information except the mimetype, so that jobs can use it.
00035 
00036 */
00037 
00038 namespace KIO {
00039 
00040     struct ChmodInfo;
00041 
00046     class ChmodJob : public KIO::Job
00047     {
00048         Q_OBJECT
00049     public:
00050         ChmodJob( const KFileItemList & lstItems,  int permissions, int mask,
00051                   int newOwner, int newGroup,
00052                   bool recursive, bool showProgressInfo );
00053 
00054     protected:
00055         void chmodNextFile();
00056 
00057     protected slots:
00058 
00059         virtual void slotResult( KIO::Job *job );
00060         void slotEntries( KIO::Job * , const KIO::UDSEntryList & );
00061         void processList();
00062 
00063     private:
00064         enum { STATE_LISTING, STATE_CHMODING } state;
00065         int m_permissions;
00066         int m_mask;
00067         int m_newOwner;
00068         int m_newGroup;
00069         bool m_recursive;
00070         KFileItemList m_lstItems;
00071         QValueList<ChmodInfo> m_infos;
00072     protected:
00073         virtual void virtual_hook( int id, void* data );
00074     private:
00075         class ChmodJobPrivate* d;
00076     };
00077 
00078 
00103     ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int mask,
00104                       QString newOwner, QString newGroup,
00105                       bool recursive, bool showProgressInfo = true );
00106 
00107 }
00108 
00109 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:12:43 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001