chmodjob.h00001
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
00046 class KIO_EXPORT ChmodJob : public KIO::Job
00047 {
00048 Q_OBJECT
00049 public:
00053 ChmodJob( const KFileItemList & lstItems, int permissions, int mask,
00054 int newOwner, int newGroup,
00055 bool recursive, bool showProgressInfo );
00056
00057 protected:
00058 void chmodNextFile();
00059
00060 protected slots:
00061
00062 virtual void slotResult( KIO::Job *job );
00063 void slotEntries( KIO::Job * , const KIO::UDSEntryList & );
00064 void processList();
00065
00066 private:
00067 struct ChmodInfo
00068 {
00069 KURL url;
00070 int permissions;
00071 };
00072 enum { STATE_LISTING, STATE_CHMODING } state;
00073 int m_permissions;
00074 int m_mask;
00075 int m_newOwner;
00076 int m_newGroup;
00077 bool m_recursive;
00078 KFileItemList m_lstItems;
00079 QValueList<ChmodInfo> m_infos;
00080 protected:
00081 virtual void virtual_hook( int id, void* data );
00082 private:
00083 class ChmodJobPrivate* d;
00084 };
00085
00086
00111 KIO_EXPORT ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int mask,
00112 QString newOwner, QString newGroup,
00113 bool recursive, bool showProgressInfo = true );
00114
00115 }
00116
00117 #endif
|