Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

directory-handle.h

Go to the documentation of this file.
00001 /* $Id: directory-handle.h,v 1.7 2004/02/13 18:22:29 murrayc Exp $ */
00002 
00003 /* Copyright 2003 gnome-vfsmm Development Team
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the Free
00017  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 
00021 #ifndef _LIBGNOMEVFSMM_DIRECTORYHANDLE_H
00022 #define _LIBGNOMEVFSMM_DIRECTORYHANDLE_H
00023 
00024 #include <glibmm.h>
00025 
00026 #include <libgnomevfsmm/uri.h>
00027 #include <libgnomevfsmm/file-info.h>
00028 #include <libgnomevfsmm/enums.h>
00029 #include <libgnomevfsmm/exception.h>
00030 #include <libgnomevfs/gnome-vfs-directory.h>
00031 
00032 
00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00034 typedef struct GnomeVFSDirectoryHandle GnomeVFSDirectoryHandle;
00035 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00036 
00037 namespace Gnome
00038 {
00039 
00040 namespace Vfs
00041 {
00042 
00043 class DirectoryHandle
00044 {
00045 public:
00046   DirectoryHandle();
00047   virtual ~DirectoryHandle();
00048 
00049 
00051   typedef sigc::slot<bool, const Glib::ustring&, const Glib::RefPtr<const FileInfo>&, bool, bool&> SlotVisit;
00052 
00053   /* 
00054   typedef gboolean (* GnomeVFSDirectoryVisitFunc)        (const gchar *rel_path,
00055                                                   GnomeVFSFileInfo *info,
00056                                                   gboolean recursing_will_loop,
00057                                                   gpointer data,
00058                                                   gboolean *recurse);
00059   */
00060               
00061   static void visit(const Glib::ustring& uri, FileInfoOptions info_options, DirectoryVisitOptions visit_options, const SlotVisit& slot) throw(exception);
00062   static void visit(const Glib::RefPtr<const Uri>& uri, FileInfoOptions info_options, DirectoryVisitOptions visit_options, const SlotVisit& slot) throw(exception);
00063  
00064   static void visit_files(const Glib::ustring& uri, const Glib::ListHandle<Glib::ustring>& file_list, FileInfoOptions info_options, DirectoryVisitOptions visit_options, const SlotVisit& slot) throw(exception);
00065   static void visit_files(const Glib::RefPtr<const Uri>& uri, const Glib::ListHandle<Glib::ustring> & file_list, FileInfoOptions info_options, DirectoryVisitOptions visit_options, const SlotVisit& slot) throw(exception);
00066 
00067   static void list_load(const Glib::ListHandle<Glib::ustring>& list, const Glib::ustring& text_uri, FileInfoOptions info_options) throw(exception);
00068 
00069   void open(const Glib::ustring& text_uri, FileInfoOptions options = FILE_INFO_DEFAULT) throw(exception);
00070   void open(const Glib::RefPtr<const Uri>& uri, FileInfoOptions options = FILE_INFO_DEFAULT) throw(exception);
00071 
00072   void close() throw(exception);
00073 
00074   Glib::RefPtr<FileInfo> read_next(bool& file_exists) throw(exception);
00075 
00076   
00077   GnomeVFSDirectoryHandle* gobj();
00078   const GnomeVFSDirectoryHandle* gobj() const;  
00079 
00080 
00081 protected:
00082  
00083   GnomeVFSDirectoryHandle* gobj_;
00084 };
00085 
00086 } // namespace Vfs
00087 } // namespace Gnome
00088 
00089 
00090 
00091 
00092 #endif /* _LIBGNOMEVFSMM_DIRECTORYHANDLE_H */
00093 

Generated on Mon Mar 7 11:19:50 2005 for libgnomevfsmm by  doxygen 1.3.9.1