home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kdirnotify.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.8 KB  |  85 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2000 David Faure <faure@kde.org>
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2 of the License, or (at your option) any later version.
  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.  
  20. #ifndef __kdirnotify_h__
  21. #define __kdirnotify_h__
  22.  
  23. #include <dcopobject.h>
  24. #include <kurl.h>
  25.  
  26. /**
  27.  * An abstract class that receives notifications of added and removed files
  28.  * in any directory, local or remote.
  29.  * The information comes from the konqueror/kdesktop instance where the
  30.  * operation was done, and can interest KDirListers, bookmark handlers, etc.
  31.  */
  32. class KIO_EXPORT KDirNotify : public DCOPObject
  33. {
  34.    K_DCOP
  35. protected:
  36.   KDirNotify();
  37.   virtual ~KDirNotify() {}
  38.  
  39. public:
  40. k_dcop:
  41.   /**
  42.    * Notify that files have been added in @p directory
  43.    * Note: this is ASYNC so that it can be used with a broadcast.
  44.    * @param directory the directory that contains the new files
  45.    */
  46.   virtual ASYNC FilesAdded( const KURL & directory ) = 0;
  47.  
  48.   /**
  49.    * Notify that files have been deleted.
  50.    * Note: this is ASYNC so that it can be used with a broadcast
  51.    * @param fileList the files that have been deleted
  52.    */
  53.   virtual ASYNC FilesRemoved( const KURL::List & fileList ) = 0;
  54.  
  55.   /**
  56.    * Notify that files have been changed.
  57.    * At the moment, this is only used for new icon, but it could be
  58.    * used for size etc. as well.
  59.    * Note: this is ASYNC so that it can be used with a broadcast.
  60.    * @param fileList the list of changed files
  61.    */
  62.   virtual ASYNC FilesChanged( const KURL::List & fileList ) = 0;
  63.  
  64.   /**
  65.    * Notify that a file has been renamed.
  66.    * Note: this is ASYNC so that it can be used with a broadcast
  67.    * @param src a list containing original names of the renamed files
  68.    * @param dst a list of original names of the renamed files
  69.    */
  70.   virtual ASYNC FileRenamed( const KURL &src, const KURL &dst );
  71.  
  72.   // WARNING: When adding new methods, make sure to update 
  73.   // kdirnotify_stub.cpp and kdirnotify_stub.h manually. 
  74.   // They are not automatically generated since they contain
  75.   // handcoded changes.
  76.  
  77. private:
  78.   // @internal
  79.   static int s_serial;
  80. protected:
  81.     virtual void virtual_hook( int id, void* data );
  82. };
  83.  
  84. #endif
  85.