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

tdeio/tdeio

  • tdeio
  • tdeio
observer.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Matej Koss <koss@miesto.sk>
3  David Faure <faure@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 #ifndef __tdeio_observer_h__
20 #define __tdeio_observer_h__
21 
22 #include <tqobject.h>
23 #include <dcopobject.h>
24 #include <tqintdict.h>
25 
26 #include <tdeio/global.h>
27 #include <tdeio/authinfo.h>
28 #include "tdeio/job.h"
29 #include "tdeio/skipdlg.h"
30 #include "tdeio/renamedlg.h"
31 
32 class UIServer_stub;
33 class KURL;
34 
35 namespace TDEIO {
36  class Job;
37 }
38 
55 class TDEIO_EXPORT Observer : public TQObject, public DCOPObject {
56 
57  K_DCOP
58  TQ_OBJECT
59 
60 public:
61 
66  static Observer * self() {
67  if (!s_pObserver) s_pObserver = new Observer;
68  return s_pObserver;
69  }
70 
78  int newJob( TDEIO::Job * job, bool showProgress );
79 
85  void jobFinished( int progressId );
86 
90  bool openPassDlg( const TQString& prompt, TQString& user, TQString& pass,
91  bool readOnly );
92 
98  bool openPassDlg( TDEIO::AuthInfo& info );
99 
111  static int messageBox( int progressId, int type, const TQString &text, const TQString &caption,
112  const TQString &buttonYes, const TQString &buttonNo );
113 
128  static int messageBox( int progressId, int type, const TQString &text, const TQString &caption,
129  const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName );
130 
135  TDEIO::RenameDlg_Result open_RenameDlg( TDEIO::Job * job,
136  const TQString & caption,
137  const TQString& src, const TQString & dest,
138  TDEIO::RenameDlg_Mode mode,
139  TQString& newDest,
140  TDEIO::filesize_t sizeSrc = (TDEIO::filesize_t) -1,
141  TDEIO::filesize_t sizeDest = (TDEIO::filesize_t) -1,
142  time_t ctimeSrc = (time_t) -1,
143  time_t ctimeDest = (time_t) -1,
144  time_t mtimeSrc = (time_t) -1,
145  time_t mtimeDest = (time_t) -1
146  );
147 
152  TDEIO::SkipDlg_Result open_SkipDlg( TDEIO::Job * job,
153  bool multi,
154  const TQString & error_text );
155 
156 k_dcop:
161  void killJob( int progressId );
162 
167  TDEIO::MetaData metadata( int progressId );
168 
169 protected:
170 
171  static Observer * s_pObserver;
172  Observer();
173  ~Observer() {}
174 
175  UIServer_stub * m_uiserver;
176 
177  TQIntDict< TDEIO::Job > m_dctJobs;
178 
179 public slots:
180 
181  void slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size );
182  void slotTotalFiles( TDEIO::Job*, unsigned long files );
183  void slotTotalDirs( TDEIO::Job*, unsigned long dirs );
184 
185  void slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t size );
186  void slotProcessedFiles( TDEIO::Job*, unsigned long files );
187  void slotProcessedDirs( TDEIO::Job*, unsigned long dirs );
188 
189  void slotSpeed( TDEIO::Job*, unsigned long speed );
190  void slotPercent( TDEIO::Job*, unsigned long percent );
191  void slotInfoMessage( TDEIO::Job*, const TQString & msg );
192 
193  void slotCopying( TDEIO::Job*, const KURL& from, const KURL& to );
194  void slotMoving( TDEIO::Job*, const KURL& from, const KURL& to );
195  void slotDeleting( TDEIO::Job*, const KURL& url );
197  void slotTransferring( TDEIO::Job*, const KURL& url );
198  void slotCreatingDir( TDEIO::Job*, const KURL& dir );
199  // currently unused
200  void slotCanResume( TDEIO::Job*, TDEIO::filesize_t offset );
201 
202 public:
203  void stating( TDEIO::Job*, const KURL& url );
204  void mounting( TDEIO::Job*, const TQString & dev, const TQString & point );
205  void unmounting( TDEIO::Job*, const TQString & point );
206 protected:
207  virtual void virtual_hook( int id, void* data );
208 private:
209  class ObserverPrivate* d;
210 };
211 #endif
Observer
Observer for TDEIO::Job progress information.
Definition: observer.h:55
TDEIO::AuthInfo
This class is intended to make it easier to prompt for, cache and retrieve authorization information.
Definition: authinfo.h:52
TDEIO::Job
The base class for all jobs.
Definition: jobclasses.h:67
TDEIO::MetaData
MetaData is a simple map of key/value strings.
Definition: global.h:516
TDEIO
A namespace for TDEIO globals.
Definition: authinfo.h:29
TDEIO::RenameDlg_Result
RenameDlg_Result
The result of open_RenameDlg().
Definition: renamedlg.h:40
TDEIO::filesize_t
TQ_ULLONG filesize_t
64-bit file size
Definition: global.h:39

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.1
This website is maintained by Timothy Pearson.