chmodjob.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
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 
00034 
00035 
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
 
This file is part of the documentation for kio Library Version 3.2.0.