00001
00002
00003 #ifndef _HILDON_FMMM_FILE_SYSTEM_MODEL_H
00004 #define _HILDON_FMMM_FILE_SYSTEM_MODEL_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <gtkmm/treeiter.h>
00031 #include <gtkmm/treemodel.h>
00032 #include <glibmm/object.h>
00033
00034 #include <gtkmm/treepath.h>
00035
00036 #include <hildon-widgets/hildon-file-system-common.h>
00037
00038
00039 #include <hildon-widgets/hildon-file-system-model.h>
00040
00041
00042 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00043 #endif
00044
00045
00046 namespace Hildon
00047 { class FileSystemModel_Class; }
00048 namespace Hildon
00049 {
00050
00056 class FileSystemModel
00057 : public Glib::Object,
00058 public Gtk::TreeModel
00059 {
00060
00061 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00062
00063 public:
00064 typedef FileSystemModel CppObjectType;
00065 typedef FileSystemModel_Class CppClassType;
00066 typedef HildonFileSystemModel BaseObjectType;
00067 typedef HildonFileSystemModelClass BaseClassType;
00068
00069 private: friend class FileSystemModel_Class;
00070 static CppClassType filesystemmodel_class_;
00071
00072 private:
00073
00074 FileSystemModel(const FileSystemModel&);
00075 FileSystemModel& operator=(const FileSystemModel&);
00076
00077 protected:
00078 explicit FileSystemModel(const Glib::ConstructParams& construct_params);
00079 explicit FileSystemModel(HildonFileSystemModel* castitem);
00080
00081 #endif
00082
00083 public:
00084 virtual ~FileSystemModel();
00085
00086 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00087 static GType get_type() G_GNUC_CONST;
00088 static GType get_base_type() G_GNUC_CONST;
00089 #endif
00090
00092 HildonFileSystemModel* gobj() { return reinterpret_cast<HildonFileSystemModel*>(gobject_); }
00093
00095 const HildonFileSystemModel* gobj() const { return reinterpret_cast<HildonFileSystemModel*>(gobject_); }
00096
00098 HildonFileSystemModel* gobj_copy();
00099
00100 private:
00101
00102
00103 public:
00104 FileSystemModel();
00105
00106
00107 Gtk::TreeModel::iterator search_local_path(const Glib::ustring& path, bool recursive = true) const;
00108 Gtk::TreeModel::iterator search_local_path(const Glib::ustring& path, const Gtk::TreeModel::iterator& start_iter, bool recursive = true) const; ;
00109
00110 Gtk::TreeModel::iterator search_uri(const Glib::ustring& uri, bool recursive = true) const;
00111 Gtk::TreeModel::iterator search_uri(const Glib::ustring& uri, const Gtk::TreeModel::iterator& start_iter, bool recursive = true) const;
00112
00113
00114 Gtk::TreeModel::iterator search_path(const GtkFilePath* path, bool recursive = true) const;
00115 Gtk::TreeModel::iterator search_path(const GtkFilePath* path, const Gtk::TreeModel::iterator& start_iter, bool recursive = true) const;
00116
00117
00118 Gtk::TreeModel::iterator load_local_path(const Glib::ustring& path);
00119
00120
00121 Gtk::TreeModel::iterator load_uri(const Glib::ustring& uri);
00122
00123
00124 Gtk::TreeModel::iterator load_path(const GtkFilePath* path);
00125
00126
00138 Glib::ustring new_item(const Gtk::TreeModel::iterator& parent, const Glib::ustring& stub_name, const Glib::ustring& extension);
00139
00140
00151 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00152 Glib::ustring autoname_uri(const Glib::ustring& uri);
00153 #else
00154 Glib::ustring autoname_uri(const Glib::ustring& uri, std::auto_ptr<Glib::Error>& error);
00155 #endif //GLIBMM_EXCEPTIONS_ENABLED
00156
00157
00158
00159
00167 void iter_available(const Gtk::TreeModel::iterator& iter, bool available);
00168
00169
00173 void reset_available();
00174
00175
00176 public:
00177
00178 public:
00179
00180 #ifdef GLIBMM_VFUNCS_ENABLED
00181 #endif //GLIBMM_VFUNCS_ENABLED
00182
00183 protected:
00184
00185 #ifdef GLIBMM_VFUNCS_ENABLED
00186 #endif //GLIBMM_VFUNCS_ENABLED
00187
00188
00189 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00190 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00191
00192
00193 };
00194
00195 }
00196
00197
00198 namespace Glib
00199 {
00205 Glib::RefPtr<Hildon::FileSystemModel> wrap(HildonFileSystemModel* object, bool take_copy = false);
00206 }
00207
00208
00209 #endif
00210