32#ifndef ANNOTATIONJOBS_H
33#define ANNOTATIONJOBS_H
36#include <tqvaluevector.h>
41struct AnnotationAttribute {
42 AnnotationAttribute() {}
43 AnnotationAttribute( const TQString& e, const TQString& n, const TQString& v )
44 : entry( e ), name( n ), value( v ) {}
50typedef TQValueVector<AnnotationAttribute> AnnotationList;
68TDEIO::SimpleJob* setAnnotation( TDEIO::Slave* slave, const KURL& url, const TQString& entry,
69 const TQMap<TQString,TQString>& attributes );
86 const TQStringList& attributes );
103 const TQStringList& paths,
104 const TQString& annotation );
108class GetAnnotationJob : public TDEIO::SimpleJob
113 GetAnnotationJob( const KURL& url, const TQString& entry, const TQByteArray &packedArgs,
114 bool showProgressInfo );
116 const AnnotationList& annotations() const { return mAnnotations; }
119 void slotInfoMessage( TDEIO::Job*, const TQString& );
121 AnnotationList mAnnotations;
126class MultiGetAnnotationJob : public TDEIO::Job
132 MultiGetAnnotationJob( TDEIO::Slave* slave, const KURL& url, const TQStringList& entries, bool showProgressInfo );
136 void annotationResult( const TQString& entry, const TQString& value, bool found );
139 virtual void slotStart();
140 virtual void slotResult( TDEIO::Job *job );
143 TDEIO::Slave* mSlave;
145 const TQStringList mEntryList;
146 TQStringList::const_iterator mEntryListIterator;
150class MultiUrlGetAnnotationJob : public TDEIO::Job
156 MultiUrlGetAnnotationJob( TDEIO::Slave* slave, const KURL& baseUrl,
157 const TQStringList& paths, const TQString& annotation );
159 TQMap<TQString, TQString> annotations() const;
162 virtual void slotStart();
163 virtual void slotResult( TDEIO::Job *job );
166 TDEIO::Slave* mSlave;
168 const TQStringList mPathList;
169 TQStringList::const_iterator mPathListIterator;
170 TQString mAnnotation;
171 TQMap<TQString, TQString> mAnnotations;
175class MultiSetAnnotationJob : public TDEIO::Job
181 MultiSetAnnotationJob( TDEIO::Slave* slave, const KURL& url, const AnnotationList& annotations, bool showProgressInfo );
185 void annotationChanged( const TQString& entry, const TQString& attribute, const TQString& value );
188 virtual void slotStart();
189 virtual void slotResult( TDEIO::Job *job );
192 TDEIO::Slave* mSlave;
194 const AnnotationList mAnnotationList;
195 AnnotationList::const_iterator mAnnotationListIterator;
for multiUrlGetAnnotation
This namespace contains functions that return jobs for annotation operations.
TDEIO::SimpleJob * setAnnotation(TDEIO::Slave *slave, const KURL &url, const TQString &entry, const TQMap< TQString, TQString > &attributes) Set an annotation entry (note that it can have multiple attributes).
MultiGetAnnotationJob * multiGetAnnotation(TDEIO::Slave *slave, const KURL &url, const TQStringList &entries) Get multiple annotation entries Currently we assume we want to get the "value" for each,...
GetAnnotationJob * getAnnotation(TDEIO::Slave *slave, const KURL &url, const TQString &entry, const TQStringList &attributes) Get an annotation entry.
MultiUrlGetAnnotationJob * multiUrlGetAnnotation(TDEIO::Slave *slave, const KURL &baseUrl, const TQStringList &paths, const TQString &annotation) Get annotation entries for multiple folders.
MultiSetAnnotationJob * multiSetAnnotation(TDEIO::Slave *slave, const KURL &url, const AnnotationList &annotations) Set multiple annotation entries.
|