15 #ifndef __KMAIL_SIEVE_JOB_H__ 16 #define __KMAIL_SIEVE_JOB_H__ 19 #include <tqvaluestack.h> 21 #include <tqstringlist.h> 22 #include <tqcstring.h> 25 #include <tdeio/global.h> 34 class SieveJob : public TQObject { 38 enum Command { Get, Put, Activate, Deactivate, SearchActive, List, Delete }; 39 SieveJob( const KURL & url, const TQString & script, 40 const TQValueStack<Command> & commands, 41 TQObject * parent=0, const char * name=0 ); 42 SieveJob( const KURL & url, const TQString & script, 43 const TQValueStack<Command> & commands, 44 bool showProgressInfo, 45 TQObject * parent=0, const char * name=0 ); 49 enum Existence { DontKnow, Yes, No }; 55 static SieveJob * put( const KURL & dest, const TQString & script, 56 bool makeActive, bool wasActive ); 61 static SieveJob * get( const KURL & src, bool showProgressInfo=true ); 66 static SieveJob * list( const KURL & url ); 68 static SieveJob * del( const KURL & url ); 70 static SieveJob * activate( const KURL & url ); 72 static SieveJob * desactivate( const KURL & url ); 74 void kill( bool quiet= true ); 76 const TQStringList & sieveCapabilities() const { 77 return mSieveCapabilities; 80 bool fileExists() const { 85 void gotScript( KMail::SieveJob * job, bool success, 86 const TQString & script, bool active ); 95 void gotList( KMail::SieveJob *job, bool success, 96 const TQStringList &scriptList, const TQString &activeScript ); 98 void result( KMail::SieveJob * job, bool success, 99 const TQString & script, bool active ); 101 void item( KMail::SieveJob * job, const TQString & filename, bool active ); 104 void schedule( Command command, bool showProgressInfo ); 107 void slotData( TDEIO::Job *, const TQByteArray & ); 108 void slotDataReq( TDEIO::Job *, TQByteArray & ); 109 void slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList & ); 110 void slotResult( TDEIO::Job * ); 115 TQTextDecoder * mDec; 117 TQString mActiveScriptName; 118 Existence mFileExists; 119 TQStringList mSieveCapabilities; 120 TQValueStack<Command> mCommands; 121 bool mShowProgressInfo; 124 TQStringList mAvailableScripts; 129 #endif // __KMAIL_SIEVE_JOB_H__
|