• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • tdeio
  • tdeio
netaccess.cpp
1 /* $Id$
2 
3  This file is part of the KDE libraries
4  Copyright (C) 1997 Torben Weis (weis@kde.org)
5  Copyright (C) 1998 Matthias Ettrich (ettrich@kde.org)
6  Copyright (C) 1999 David Faure (faure@kde.org)
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 
24 #include <stdlib.h>
25 #include <stdio.h>
26 #include <signal.h>
27 #include <unistd.h>
28 
29 #include <cstring>
30 
31 #include <tqstring.h>
32 #include <tqapplication.h>
33 #include <tqfile.h>
34 #include <tqmetaobject.h>
35 
36 #include <tdeapplication.h>
37 #include <tdelocale.h>
38 #include <tdetempfile.h>
39 #include <kdebug.h>
40 #include <kurl.h>
41 #include <tdeio/job.h>
42 #include <tdeio/scheduler.h>
43 
44 #include "tdeio/netaccess.h"
45 
46 using namespace TDEIO;
47 
48 TQString * NetAccess::lastErrorMsg;
49 int NetAccess::lastErrorCode = 0;
50 TQStringList* NetAccess::tmpfiles;
51 
52 bool NetAccess::download(const KURL& u, TQString & target)
53 {
54  return NetAccess::download (u, target, 0);
55 }
56 
57 bool NetAccess::download(const KURL& u, TQString & target, TQWidget* window)
58 {
59  if (u.isLocalFile()) {
60  // file protocol. We do not need the network
61  target = u.path();
62  bool accessible = checkAccess(target, R_OK);
63  if(!accessible)
64  {
65  if(!lastErrorMsg)
66  lastErrorMsg = new TQString;
67  *lastErrorMsg = i18n("File '%1' is not readable").arg(target);
68  lastErrorCode = ERR_COULD_NOT_READ;
69  }
70  return accessible;
71  }
72 
73  if (target.isEmpty())
74  {
75  KTempFile tmpFile;
76  target = tmpFile.name();
77  if (!tmpfiles)
78  tmpfiles = new TQStringList;
79  tmpfiles->append(target);
80  }
81 
82  NetAccess kioNet;
83  KURL dest;
84  dest.setPath( target );
85  return kioNet.filecopyInternal( u, dest, -1, true /*overwrite*/,
86  false, window, false /*copy*/);
87 }
88 
89 bool NetAccess::upload(const TQString& src, const KURL& target)
90 {
91  return NetAccess::upload(src, target, 0);
92 }
93 
94 bool NetAccess::upload(const TQString& src, const KURL& target, TQWidget* window)
95 {
96  if (target.isEmpty())
97  return false;
98 
99  // If target is local... well, just copy. This can be useful
100  // when the client code uses a temp file no matter what.
101  // Let's make sure it's not the exact same file though
102  if (target.isLocalFile() && target.path() == src)
103  return true;
104 
105  NetAccess kioNet;
106  KURL s;
107  s.setPath(src);
108  return kioNet.filecopyInternal( s, target, -1, true /*overwrite*/,
109  false, window, false /*copy*/ );
110 }
111 
112 bool NetAccess::copy( const KURL & src, const KURL & target )
113 {
114  return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, 0L );
115 }
116 
117 bool NetAccess::copy( const KURL & src, const KURL & target, TQWidget* window )
118 {
119  return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, window );
120 }
121 
122 bool NetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
123  bool overwrite, bool resume, TQWidget* window )
124 {
125  NetAccess kioNet;
126  return kioNet.filecopyInternal( src, target, permissions, overwrite, resume,
127  window, false /*copy*/ );
128 }
129 
130 
131 bool NetAccess::file_move( const KURL& src, const KURL& target, int permissions,
132  bool overwrite, bool resume, TQWidget* window )
133 {
134  NetAccess kioNet;
135  return kioNet.filecopyInternal( src, target, permissions, overwrite, resume,
136  window, true /*move*/ );
137 }
138 
139 bool NetAccess::dircopy( const KURL & src, const KURL & target )
140 {
141  return NetAccess::dircopy( src, target, 0 );
142 }
143 
144 bool NetAccess::dircopy( const KURL & src, const KURL & target, TQWidget* window )
145 {
146  KURL::List srcList;
147  srcList.append( src );
148  return NetAccess::dircopy( srcList, target, window );
149 }
150 
151 bool NetAccess::dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window )
152 {
153  NetAccess kioNet;
154  return kioNet.dircopyInternal( srcList, target, window, false /*copy*/ );
155 }
156 
157 bool NetAccess::move( const KURL& src, const KURL& target, TQWidget* window )
158 {
159  KURL::List srcList;
160  srcList.append( src );
161  return NetAccess::move( srcList, target, window );
162 }
163 
164 bool NetAccess::move( const KURL::List& srcList, const KURL& target, TQWidget* window )
165 {
166  NetAccess kioNet;
167  return kioNet.dircopyInternal( srcList, target, window, true /*move*/ );
168 }
169 
170 bool NetAccess::exists( const KURL & url )
171 {
172  return NetAccess::exists( url, false, 0 );
173 }
174 
175 bool NetAccess::exists( const KURL & url, TQWidget* window )
176 {
177  return NetAccess::exists( url, false, window );
178 }
179 
180 bool NetAccess::exists( const KURL & url, bool source )
181 {
182  return NetAccess::exists( url, source, 0 );
183 }
184 
185 bool NetAccess::exists( const KURL & url, bool source, TQWidget* window )
186 {
187  if ( url.isLocalFile() )
188  return TQFile::exists( url.path() );
189  NetAccess kioNet;
190  return kioNet.statInternal( url, 0 /*no details*/, source, window );
191 }
192 
193 KURL NetAccess::localURL(const KURL& url, TQWidget* window)
194 {
195  NetAccess kioNet;
196  return kioNet.localURLInternal( url, window );
197 }
198 
199 bool NetAccess::stat( const KURL & url, TDEIO::UDSEntry & entry )
200 {
201  return NetAccess::stat( url, entry, 0 );
202 }
203 
204 bool NetAccess::stat( const KURL & url, TDEIO::UDSEntry & entry, TQWidget* window )
205 {
206  NetAccess kioNet;
207  bool ret = kioNet.statInternal( url, 2 /*all details*/, true /*source*/, window );
208  if (ret)
209  entry = kioNet.m_entry;
210  return ret;
211 }
212 
213 KURL NetAccess::mostLocalURL(const KURL & url, TQWidget* window)
214 {
215  if ( url.isLocalFile() )
216  {
217  return url;
218  }
219 
220  TDEIO::UDSEntry entry;
221  if (!stat(url, entry, window))
222  {
223  return url;
224  }
225 
226  TQString path;
227 
228  // Extract the local path from the TDEIO::UDSEntry
229  TDEIO::UDSEntry::ConstIterator it = entry.begin();
230  const TDEIO::UDSEntry::ConstIterator end = entry.end();
231  for ( ; it != end; ++it )
232  {
233  if ( (*it).m_uds == TDEIO::UDS_LOCAL_PATH )
234  {
235  path = (*it).m_str;
236  break;
237  }
238  }
239 
240  if ( !path.isEmpty() )
241  {
242  KURL new_url;
243  new_url.setPath(path);
244  return new_url;
245  }
246 
247  return url;
248 }
249 
250 
251 bool NetAccess::del( const KURL & url )
252 {
253  return NetAccess::del( url, 0 );
254 }
255 
256 bool NetAccess::del( const KURL & url, TQWidget* window )
257 {
258  NetAccess kioNet;
259  return kioNet.delInternal( url, window );
260 }
261 
262 bool NetAccess::mkdir( const KURL & url, int permissions )
263 {
264  return NetAccess::mkdir( url, 0, permissions );
265 }
266 
267 bool NetAccess::mkdir( const KURL & url, TQWidget* window, int permissions )
268 {
269  NetAccess kioNet;
270  return kioNet.mkdirInternal( url, permissions, window );
271 }
272 
273 TQString NetAccess::fish_execute( const KURL & url, const TQString command, TQWidget* window )
274 {
275  NetAccess kioNet;
276  return kioNet.fish_executeInternal( url, command, window );
277 }
278 
279 bool NetAccess::synchronousRun( Job* job, TQWidget* window, TQByteArray* data,
280  KURL* finalURL, TQMap<TQString, TQString>* metaData )
281 {
282  NetAccess kioNet;
283  return kioNet.synchronousRunInternal( job, window, data, finalURL, metaData );
284 }
285 
286 TQString NetAccess::mimetype( const KURL& url )
287 {
288  NetAccess kioNet;
289  return kioNet.mimetypeInternal( url, 0 );
290 }
291 
292 TQString NetAccess::mimetype( const KURL& url, TQWidget* window )
293 {
294  NetAccess kioNet;
295  return kioNet.mimetypeInternal( url, window );
296 }
297 
298 void NetAccess::removeTempFile(const TQString& name)
299 {
300  if (!tmpfiles)
301  return;
302  if (tmpfiles->contains(name))
303  {
304  unlink(TQFile::encodeName(name));
305  tmpfiles->remove(name);
306  }
307 }
308 
309 bool NetAccess::filecopyInternal(const KURL& src, const KURL& target, int permissions,
310  bool overwrite, bool resume, TQWidget* window, bool move)
311 {
312  bJobOK = true; // success unless further error occurs
313 
314  TDEIO::Scheduler::checkSlaveOnHold(true);
315  TDEIO::Job * job = move
316  ? TDEIO::file_move( src, target, permissions, overwrite, resume )
317  : TDEIO::file_copy( src, target, permissions, overwrite, resume );
318  job->setWindow (window);
319  connect( job, TQT_SIGNAL( result (TDEIO::Job *) ),
320  this, TQT_SLOT( slotResult (TDEIO::Job *) ) );
321 
322  enter_loop();
323  return bJobOK;
324 }
325 
326 bool NetAccess::dircopyInternal(const KURL::List& src, const KURL& target,
327  TQWidget* window, bool move)
328 {
329  bJobOK = true; // success unless further error occurs
330 
331  TDEIO::Job * job = move
332  ? TDEIO::move( src, target )
333  : TDEIO::copy( src, target );
334  job->setWindow (window);
335  connect( job, TQT_SIGNAL( result (TDEIO::Job *) ),
336  this, TQT_SLOT( slotResult (TDEIO::Job *) ) );
337 
338  enter_loop();
339  return bJobOK;
340 }
341 
342 bool NetAccess::statInternal( const KURL & url, int details, bool source,
343  TQWidget* window )
344 {
345  bJobOK = true; // success unless further error occurs
346  TDEIO::StatJob * job = TDEIO::stat( url, !url.isLocalFile() );
347  job->setWindow (window);
348  job->setDetails( details );
349  job->setSide( source );
350  connect( job, TQT_SIGNAL( result (TDEIO::Job *) ),
351  this, TQT_SLOT( slotResult (TDEIO::Job *) ) );
352  enter_loop();
353  return bJobOK;
354 }
355 
356 KURL NetAccess::localURLInternal( const KURL & url, TQWidget* window )
357 {
358  m_localURL = url;
359  TDEIO::LocalURLJob* job = TDEIO::localURL(url);
360  job->setWindow (window);
361  connect(job, TQT_SIGNAL( localURL(TDEIO::Job*, const KURL&, bool) ),
362  this, TQT_SLOT( slotLocalURL(TDEIO::Job*, const KURL&, bool) ));
363  enter_loop();
364  return m_localURL;
365 }
366 
367 bool NetAccess::delInternal( const KURL & url, TQWidget* window )
368 {
369  bJobOK = true; // success unless further error occurs
370  TDEIO::Job * job = TDEIO::del( url );
371  job->setWindow (window);
372  connect( job, TQT_SIGNAL( result (TDEIO::Job *) ),
373  this, TQT_SLOT( slotResult (TDEIO::Job *) ) );
374  enter_loop();
375  return bJobOK;
376 }
377 
378 bool NetAccess::mkdirInternal( const KURL & url, int permissions,
379  TQWidget* window )
380 {
381  bJobOK = true; // success unless further error occurs
382  TDEIO::Job * job = TDEIO::mkdir( url, permissions );
383  job->setWindow (window);
384  connect( job, TQT_SIGNAL( result (TDEIO::Job *) ),
385  this, TQT_SLOT( slotResult (TDEIO::Job *) ) );
386  enter_loop();
387  return bJobOK;
388 }
389 
390 TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window )
391 {
392  bJobOK = true; // success unless further error occurs
393  m_mimetype = TQString::fromLatin1("unknown");
394  TDEIO::Job * job = TDEIO::mimetype( url );
395  job->setWindow (window);
396  connect( job, TQT_SIGNAL( result (TDEIO::Job *) ),
397  this, TQT_SLOT( slotResult (TDEIO::Job *) ) );
398  connect( job, TQT_SIGNAL( mimetype (TDEIO::Job *, const TQString &) ),
399  this, TQT_SLOT( slotMimetype (TDEIO::Job *, const TQString &) ) );
400  enter_loop();
401  return m_mimetype;
402 }
403 
404 void NetAccess::slotMimetype( TDEIO::Job *, const TQString & type )
405 {
406  m_mimetype = type;
407 }
408 
409 void NetAccess::slotLocalURL(TDEIO::Job*, const KURL & url, bool)
410 {
411  m_localURL = url;
412  tqApp->exit_loop();
413 }
414 
415 TQString NetAccess::fish_executeInternal(const KURL & url, const TQString command, TQWidget* window)
416 {
417  TQString target, remoteTempFileName, resultData;
418  KURL tempPathUrl;
419  KTempFile tmpFile;
420  tmpFile.setAutoDelete( true );
421 
422  if( url.protocol() == "fish" )
423  {
424  // construct remote temp filename
425  tempPathUrl = url;
426  remoteTempFileName = tmpFile.name();
427  // only need the filename KTempFile adds some KDE specific dirs
428  // that probably does not exist on the remote side
429  int pos = remoteTempFileName.findRev('/');
430  remoteTempFileName = "/tmp/fishexec_" + remoteTempFileName.mid(pos + 1);
431  tempPathUrl.setPath( remoteTempFileName );
432  bJobOK = true; // success unless further error occurs
433  TQByteArray packedArgs;
434  TQDataStream stream( packedArgs, IO_WriteOnly );
435 
436  stream << int('X') << tempPathUrl << command;
437 
438  TDEIO::Job * job = TDEIO::special( tempPathUrl, packedArgs, true );
439  job->setWindow( window );
440  connect( job, TQT_SIGNAL( result (TDEIO::Job *) ),
441  this, TQT_SLOT( slotResult (TDEIO::Job *) ) );
442  enter_loop();
443 
444  // since the TDEIO::special does not provide feedback we need to download the result
445  if( NetAccess::download( tempPathUrl, target, window ) )
446  {
447  TQFile resultFile( target );
448 
449  if (resultFile.open( IO_ReadOnly ))
450  {
451  TQTextStream ts( &resultFile );
452  ts.setEncoding( TQTextStream::Locale ); // Locale??
453  resultData = ts.read();
454  resultFile.close();
455  NetAccess::del( tempPathUrl, window );
456  }
457  }
458  }
459  else
460  {
461  resultData = i18n( "ERROR: Unknown protocol '%1'" ).arg( url.protocol() );
462  }
463  return resultData;
464 }
465 
466 bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
467  KURL* finalURL, TQMap<TQString,TQString>* metaData )
468 {
469  job->setWindow( window );
470 
471  m_metaData = metaData;
472  if ( m_metaData ) {
473  for ( TQMap<TQString, TQString>::iterator it = m_metaData->begin(); it != m_metaData->end(); ++it ) {
474  job->addMetaData( it.key(), it.data() );
475  }
476  }
477 
478  if ( finalURL ) {
479  SimpleJob *sj = dynamic_cast<SimpleJob*>( job );
480  if ( sj ) {
481  m_url = sj->url();
482  }
483  }
484 
485  connect( job, TQT_SIGNAL( result (TDEIO::Job *) ),
486  this, TQT_SLOT( slotResult (TDEIO::Job *) ) );
487 
488  TQMetaObject *meta = job->metaObject();
489 
490  static const char dataSignal[] = "data(TDEIO::Job*,const " TQBYTEARRAY_OBJECT_NAME_STRING "&)";
491  if ( meta->findSignal( dataSignal ) != -1 ) {
492  connect( job, TQT_SIGNAL(data(TDEIO::Job*,const TQByteArray&)),
493  this, TQT_SLOT(slotData(TDEIO::Job*,const TQByteArray&)) );
494  }
495 
496  static const char redirSignal[] = "redirection(TDEIO::Job*,const KURL&)";
497  if ( meta->findSignal( redirSignal ) != -1 ) {
498  connect( job, TQT_SIGNAL(redirection(TDEIO::Job*,const KURL&)),
499  this, TQT_SLOT(slotRedirection(TDEIO::Job*, const KURL&)) );
500  }
501 
502  enter_loop();
503 
504  if ( finalURL )
505  *finalURL = m_url;
506  if ( data )
507  *data = m_data;
508 
509  return bJobOK;
510 }
511 
512 // If a troll sees this, he kills me
513 void tqt_enter_modal( TQWidget *widget );
514 void tqt_leave_modal( TQWidget *widget );
515 
516 void NetAccess::enter_loop()
517 {
518  TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal));
519  dummy.setFocusPolicy( TQ_NoFocus );
520  tqt_enter_modal(&dummy);
521  tqApp->enter_loop();
522  tqt_leave_modal(&dummy);
523 }
524 
525 void NetAccess::slotResult( TDEIO::Job * job )
526 {
527  lastErrorCode = job->error();
528  bJobOK = !job->error();
529  if ( !bJobOK ) {
530  if ( !lastErrorMsg ) {
531  lastErrorMsg = new TQString;
532  }
533  *lastErrorMsg = job->errorString();
534  }
535  if ( job->isA("TDEIO::StatJob") ) {
536  m_entry = static_cast<TDEIO::StatJob *>(job)->statResult();
537  }
538 
539  if ( m_metaData ) {
540  *m_metaData = job->metaData();
541  }
542 
543  tqApp->exit_loop();
544 }
545 
546 void NetAccess::slotData( TDEIO::Job*, const TQByteArray& data )
547 {
548  if ( data.isEmpty() ) {
549  return;
550  }
551 
552  unsigned offset = m_data.size();
553  m_data.resize( offset + data.size() );
554  std::memcpy( m_data.data() + offset, data.data(), data.size() );
555 }
556 
557 void NetAccess::slotRedirection( TDEIO::Job*, const KURL& url )
558 {
559  m_url = url;
560 }
561 
562 #include "netaccess.moc"
TDEIO::UDS_LOCAL_PATH
A local file path if the ioslave display files sitting on the local filesystem (but in another hierar...
Definition: global.h:338
TDEIO::UDSEntry
TQValueList< UDSAtom > UDSEntry
An entry is the list of atoms containing all the information for a file or URL.
Definition: global.h:507
TDEIO::NetAccess::mostLocalURL
static KURL mostLocalURL(const KURL &url, TQWidget *window)
Tries to map a local URL for the given URL.
Definition: netaccess.cpp:213
TDEIO::NetAccess::stat
static bool stat(const KURL &url, TDEIO::UDSEntry &entry, TQWidget *window)
Tests whether a URL exists and return information on it.
Definition: netaccess.cpp:204
TDEIO::NetAccess::file_move
static bool file_move(const KURL &src, const KURL &target, int permissions=-1, bool overwrite=false, bool resume=false, TQWidget *window=0L)
Full-fledged equivalent of TDEIO::file_move.
Definition: netaccess.cpp:131
TDEIO::NetAccess::del
static bool del(const KURL &url, TQWidget *window)
Deletes a file or a directory in a synchronous way.
Definition: netaccess.cpp:256
TDEIO::NetAccess::copy
static bool copy(const KURL &src, const KURL &target, TQWidget *window)
Alternative to upload for copying over the network.
Definition: netaccess.cpp:117
TDEIO::Job::metaData
MetaData metaData() const
Get meta data received from the slave.
Definition: job.cpp:388
TDEIO::Job::errorString
TQString errorString() const
Converts an error code and a non-i18n error message into an error message in the current language...
Definition: global.cpp:225
TDEIO::del
TDEIO_EXPORT DeleteJob * del(const KURL &src, bool shred=false, bool showProgressInfo=true)
Delete a file or directory.
Definition: job.cpp:4421
TDEIO::SimpleJob::url
const KURL & url() const
Returns the SimpleJob's URL.
Definition: jobclasses.h:548
TDEIO::move
TDEIO_EXPORT CopyJob * move(const KURL &src, const KURL &dest, bool showProgressInfo=true)
Moves a file or directory src to the given destination dest.
Definition: job.cpp:3943
TDEIO::NetAccess::upload
static bool upload(const TQString &src, const KURL &target, TQWidget *window)
Uploads file src to URL target.
Definition: netaccess.cpp:94
TDEIO::Scheduler::checkSlaveOnHold
static void checkSlaveOnHold(bool b)
When true, the next job will check whether TDELauncher has a slave on hold that is suitable for the j...
Definition: scheduler.h:279
TDEIO
A namespace for TDEIO globals.
Definition: authinfo.h:29
TDEIO::NetAccess::mkdir
static bool mkdir(const KURL &url, TQWidget *window, int permissions=-1)
Creates a directory in a synchronous way.
Definition: netaccess.cpp:267
TDEIO::NetAccess::removeTempFile
static void removeTempFile(const TQString &name)
Removes the specified file if and only if it was created by TDEIO::NetAccess as a temporary file for ...
Definition: netaccess.cpp:298
TDEIO::StatJob::setSide
void setSide(bool source)
A stat() can have two meanings.
Definition: jobclasses.h:708
TDEIO::NetAccess::exists
static bool exists(const KURL &url, bool source, TQWidget *window)
Tests whether a URL exists.
Definition: netaccess.cpp:185
TDEIO::NetAccess::download
static bool download(const KURL &src, TQString &target, TQWidget *window)
Downloads a file from an arbitrary URL (src) to a temporary file on the local filesystem (target)...
Definition: netaccess.cpp:57
TDEIO::Job
The base class for all jobs.
Definition: jobclasses.h:67
TDEIO::StatJob
A TDEIO job that retrieves information about a file or directory.
Definition: jobclasses.h:687
TDEIO::Job::setWindow
void setWindow(TQWidget *window)
Associate this job with a window given by window.
Definition: job.cpp:352
TDEIO::NetAccess::localURL
static KURL localURL(const KURL &url, TQWidget *window)
Returns the output of the localURL TDEIO job.
Definition: netaccess.cpp:193
TDEIO::NetAccess::fish_execute
static TQString fish_execute(const KURL &url, const TQString command, TQWidget *window)
Executes a remote process via the fish ioslave in a synchronous way.
Definition: netaccess.cpp:273
TDEIO::NetAccess
Net Transparency.
Definition: netaccess.h:59
TDEIO::NetAccess::dircopy
static bool dircopy(const KURL &src, const KURL &target, TQWidget *window)
Alternative method for copying over the network.
Definition: netaccess.cpp:144
TDEIO::localURL
TDEIO_EXPORT LocalURLJob * localURL(const KURL &remoteUrl)
Retrieve local URL if available.
Definition: job.cpp:841
TDEIO::Job::error
int error() const
Returns the error code, if there has been an error.
Definition: jobclasses.h:94
TDEIO::stat
TDEIO_EXPORT StatJob * stat(const KURL &url, bool showProgressInfo=true)
Find all details for one file or directory.
Definition: job.cpp:921
TDEIO::Job::addMetaData
void addMetaData(const TQString &key, const TQString &value)
Add key/value pair to the meta data that is sent to the slave.
Definition: job.cpp:405
TDEIO::mimetype
TDEIO_EXPORT MimetypeJob * mimetype(const KURL &url, bool showProgressInfo=true)
Find mimetype for one file or directory.
Definition: job.cpp:1544
TDEIO::LocalURLJob
A TDEIO job that finds a local URL.
Definition: jobclasses.h:1865
TDEIO::file_move
TDEIO_EXPORT FileCopyJob * file_move(const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
Move a single file.
Definition: job.cpp:2004
TDEIO::StatJob::setDetails
void setDetails(short int details)
Selects the level of details we want.
Definition: jobclasses.h:719
TDEIO::SimpleJob
A simple job (one url and one command).
Definition: jobclasses.h:527
TDEIO::NetAccess::file_copy
static bool file_copy(const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, TQWidget *window=0L)
Full-fledged equivalent of TDEIO::file_copy.
Definition: netaccess.cpp:122
TDEIO::mkdir
TDEIO_EXPORT SimpleJob * mkdir(const KURL &url, int permissions=-1)
Creates a single directory.
Definition: job.cpp:751
TDEIO::special
TDEIO_EXPORT SimpleJob * special(const KURL &url, const TQByteArray &data, bool showProgressInfo=true)
Execute any command that is specific to one slave (protocol).
Definition: job.cpp:786
TDEIO::NetAccess::move
static bool move(const KURL &src, const KURL &target, TQWidget *window=0L)
Full-fledged equivalent of TDEIO::move.
Definition: netaccess.cpp:157
TDEIO::NetAccess::synchronousRun
static bool synchronousRun(Job *job, TQWidget *window, TQByteArray *data=0, KURL *finalURL=0, TQMap< TQString, TQString > *metaData=0)
This function executes a job in a synchronous way.
Definition: netaccess.cpp:279

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.8.8
This website is maintained by Timothy Pearson.