Changeset View
Changeset View
Standalone View
Standalone View
src/core/statjob.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 42 | public: | |||
---|---|---|---|---|---|
52 | * or to check if we can write to it. First case is "source", second is "dest". | 52 | * or to check if we can write to it. First case is "source", second is "dest". | ||
53 | * It is necessary to know what the StatJob is for, to tune the kioslave's behavior | 53 | * It is necessary to know what the StatJob is for, to tune the kioslave's behavior | ||
54 | * (e.g. with FTP). | 54 | * (e.g. with FTP). | ||
55 | * By default it is SourceSide. | 55 | * By default it is SourceSide. | ||
56 | * @param side SourceSide or DestinationSide | 56 | * @param side SourceSide or DestinationSide | ||
57 | */ | 57 | */ | ||
58 | void setSide(StatSide side); | 58 | void setSide(StatSide side); | ||
59 | 59 | | |||
60 | #if KIOCORE_ENABLE_DEPRECATED_SINCE(4, 0) | ||||
60 | /** | 61 | /** | ||
61 | * A stat() can have two meanings. Either we want to read from this URL, | 62 | * A stat() can have two meanings. Either we want to read from this URL, | ||
62 | * or to check if we can write to it. First case is "source", second is "dest". | 63 | * or to check if we can write to it. First case is "source", second is "dest". | ||
63 | * It is necessary to know what the StatJob is for, to tune the kioslave's behavior | 64 | * It is necessary to know what the StatJob is for, to tune the kioslave's behavior | ||
64 | * (e.g. with FTP). | 65 | * (e.g. with FTP). | ||
65 | * @param source true for "source" mode, false for "dest" mode | 66 | * @param source true for "source" mode, false for "dest" mode | ||
66 | * @deprecated use setSide(StatSide side). | 67 | * @deprecated Since 4.0, use setSide(StatSide side). | ||
67 | */ | 68 | */ | ||
68 | #ifndef KIOCORE_NO_DEPRECATED | 69 | KIOCORE_DEPRECATED_VERSION(4, 0, "Use StatJob::setSide(StatSide)") | ||
69 | KIOCORE_DEPRECATED void setSide(bool source); | 70 | void setSide(bool source); | ||
70 | #endif | 71 | #endif | ||
71 | 72 | | |||
72 | /** | 73 | /** | ||
73 | * Selects the level of @p details we want. | 74 | * Selects the level of @p details we want. | ||
74 | * By default this is 2 (all details wanted, including modification time, size, etc.), | 75 | * By default this is 2 (all details wanted, including modification time, size, etc.), | ||
75 | * setDetails(1) is used when deleting: we don't need all the information if it takes | 76 | * setDetails(1) is used when deleting: we don't need all the information if it takes | ||
76 | * too much time, no need to follow symlinks etc. | 77 | * too much time, no need to follow symlinks etc. | ||
77 | * setDetails(0) is used for very simple probing: we'll only get the answer | 78 | * setDetails(0) is used for very simple probing: we'll only get the answer | ||
▲ Show 20 Lines • Show All 101 Lines • ▼ Show 20 Line(s) | |||||
179 | * too much time, no need to follow symlinks etc. | 180 | * too much time, no need to follow symlinks etc. | ||
180 | * setDetails(0) is used for very simple probing: we'll only get the answer | 181 | * setDetails(0) is used for very simple probing: we'll only get the answer | ||
181 | * "it's a file or a directory or a symlink, or it doesn't exist". This is used by KRun and DeleteJob. | 182 | * "it's a file or a directory or a symlink, or it doesn't exist". This is used by KRun and DeleteJob. | ||
182 | * @param flags Can be HideProgressInfo here | 183 | * @param flags Can be HideProgressInfo here | ||
183 | * @return the job handling the operation. | 184 | * @return the job handling the operation. | ||
184 | */ | 185 | */ | ||
185 | KIOCORE_EXPORT StatJob *stat(const QUrl &url, KIO::StatJob::StatSide side, | 186 | KIOCORE_EXPORT StatJob *stat(const QUrl &url, KIO::StatJob::StatSide side, | ||
186 | short int details, JobFlags flags = DefaultFlags); | 187 | short int details, JobFlags flags = DefaultFlags); | ||
188 | | ||||
189 | #if KIOCORE_ENABLE_DEPRECATED_SINCE(4, 0) | ||||
187 | /** | 190 | /** | ||
188 | * Find all details for one file or directory. | 191 | * Find all details for one file or directory. | ||
189 | * This version of the call includes two additional booleans, @p sideIsSource and @p details. | 192 | * This version of the call includes two additional booleans, @p sideIsSource and @p details. | ||
190 | * | 193 | * | ||
191 | * @param url the URL of the file | 194 | * @param url the URL of the file | ||
192 | * @param sideIsSource is true when stating a source file (we will do a get on it if | 195 | * @param sideIsSource is true when stating a source file (we will do a get on it if | ||
193 | * the stat works) and false when stating a destination file (target of a copy). | 196 | * the stat works) and false when stating a destination file (target of a copy). | ||
194 | * The reason for this parameter is that in some cases the kioslave might not | 197 | * The reason for this parameter is that in some cases the kioslave might not | ||
Show All 10 Lines | |||||
205 | * @param details selects the level of details we want. | 208 | * @param details selects the level of details we want. | ||
206 | * By default this is 2 (all details wanted, including modification time, size, etc.), | 209 | * By default this is 2 (all details wanted, including modification time, size, etc.), | ||
207 | * setDetails(1) is used when deleting: we don't need all the information if it takes | 210 | * setDetails(1) is used when deleting: we don't need all the information if it takes | ||
208 | * too much time, no need to follow symlinks etc. | 211 | * too much time, no need to follow symlinks etc. | ||
209 | * setDetails(0) is used for very simple probing: we'll only get the answer | 212 | * setDetails(0) is used for very simple probing: we'll only get the answer | ||
210 | * "it's a file or a directory, or it doesn't exist". This is used by KRun. | 213 | * "it's a file or a directory, or it doesn't exist". This is used by KRun. | ||
211 | * @param flags Can be HideProgressInfo here | 214 | * @param flags Can be HideProgressInfo here | ||
212 | * @return the job handling the operation. | 215 | * @return the job handling the operation. | ||
216 | * @deprecated Since 4.0, use stat(const QUrl &, KIO::StatJob::StatSide, short int, JobFlags) | ||||
213 | */ | 217 | */ | ||
214 | #ifndef KIOCORE_NO_DEPRECATED | 218 | KIOCORE_DEPRECATED_VERSION(4, 0, "Use KIO::stat(const QUrl &, KIO::StatJob::StatSide, short int, JobFlags)") | ||
215 | KIOCORE_DEPRECATED_EXPORT StatJob *stat(const QUrl &url, bool sideIsSource, | 219 | KIOCORE_EXPORT StatJob *stat(const QUrl &url, bool sideIsSource, | ||
216 | short int details, JobFlags flags = DefaultFlags); | 220 | short int details, JobFlags flags = DefaultFlags); | ||
217 | #endif | 221 | #endif | ||
218 | 222 | | |||
219 | /** | 223 | /** | ||
220 | * Tries to map a local URL for the given URL, using a KIO job. | 224 | * Tries to map a local URL for the given URL, using a KIO job. | ||
221 | * | 225 | * | ||
222 | * Starts a (stat) job for determining the "most local URL" for a given URL. | 226 | * Starts a (stat) job for determining the "most local URL" for a given URL. | ||
223 | * Retrieve the result with StatJob::mostLocalUrl in the result slot. | 227 | * Retrieve the result with StatJob::mostLocalUrl in the result slot. | ||
224 | * @param url The URL we are testing. | 228 | * @param url The URL we are testing. | ||
225 | * \since 4.4 | 229 | * \since 4.4 | ||
226 | */ | 230 | */ | ||
227 | KIOCORE_EXPORT StatJob *mostLocalUrl(const QUrl &url, JobFlags flags = DefaultFlags); | 231 | KIOCORE_EXPORT StatJob *mostLocalUrl(const QUrl &url, JobFlags flags = DefaultFlags); | ||
228 | 232 | | |||
229 | } | 233 | } | ||
230 | 234 | | |||
231 | #endif | 235 | #endif |