libgnomevfsmm  2.26.0
file-info.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _LIBGNOMEVFSMM_FILE_INFO_H
4 #define _LIBGNOMEVFSMM_FILE_INFO_H
5 
6 
7 #include <glibmm.h>
8 
9 /* $Id: file-info.hg,v 1.13 2005/11/16 19:50:26 murrayc Exp $ */
10 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
11 
12 /* Copyright 2003 gnome-vfsmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 
30 #include <libgnomevfsmm/enums.h>
31 #include <libgnomevfsmm/types.h>
32 
33 
34 namespace Gnome
35 {
36 
37 namespace Vfs
38 {
39 
40 //TODO: This is actually now a boxed-type, with a get_type() function.
41 
42 class FileInfo
43 {
44  public:
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46  typedef FileInfo CppObjectType;
47  typedef GnomeVFSFileInfo BaseObjectType;
48 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
49 
50  static Glib::RefPtr<FileInfo> create();
51 
52  // For use with Glib::RefPtr<> only.
53  void reference() const;
54  void unreference() const;
55 
57  GnomeVFSFileInfo* gobj();
58 
60  const GnomeVFSFileInfo* gobj() const;
61 
63  GnomeVFSFileInfo* gobj_copy() const;
64 
65 protected:
66  // Do not derive this. Gnome::Vfs::FileInfo can neither be constructed nor deleted.
68  void operator delete(void*, size_t);
69 
70 private:
71  // noncopyable
72  FileInfo(const FileInfo&);
73  FileInfo& operator=(const FileInfo&);
74 
75 
76 public:
77 
78 
81  void clear();
82 
86  Glib::ustring get_mime_type() const;
87 
91  Glib::RefPtr<FileInfo> duplicate();
92 
93 
97  std::string get_name() const;
98 
99  /* Fields which are actually valid in this structure. */
100 //GnomeVFSFileInfoFields valid_fields;
101 
106 
111 
116 
117  /* These are only valid if `is_local' is TRUE (see below). */
118  //dev_t device;
119  //GnomeVFSInodeNumber inode;
120 
121 
125  guint get_link_count() const;
126 
130  guint get_uid() const;
131 
135  guint get_gid() const;
136 
142 
148 
153  guint get_io_block_size() const;
154 
158  time_t get_access_time() const;
159 
163  time_t get_modification_time() const;
164 
168  time_t get_creation_time() const;
169 
173  std::string get_symlink_name() const;
174 
179  bool is_symlink() const;
180 
181 
182 };
183 
184 } // namespace Vfs
185 } // namespace Gnome
186 
187 #ifndef DOXYGEN_SHOULD_SKIP_THIS
188 namespace Glib
189 {
190  RefPtr<Gnome::Vfs::FileInfo> wrap(GnomeVFSFileInfo* object, bool take_copy);
191 
192  namespace Container_Helpers
193  {
198  template <>
199  struct TypeTraits< Glib::RefPtr<Gnome::Vfs::FileInfo> >
200  {
201  typedef Glib::RefPtr<Gnome::Vfs::FileInfo> CppType;
202  typedef Gnome::Vfs::FileInfo::BaseObjectType * CType;
203  typedef Gnome::Vfs::FileInfo::BaseObjectType * CTypeNonConst;
204 
205  static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); }
206  static CType to_c_type (CType ptr) { return ptr; }
207  static CppType to_cpp_type (CType ptr)
208  {
209  return Glib::wrap(ptr, true);
210  }
211 
212  static void release_c_type (CType ptr)
213  {
214  gnome_vfs_file_info_unref(const_cast<CTypeNonConst>(ptr));
215  }
216  };
217  } // namespace Container_Helpers
218 } // namespace Glib
219 
220 #endif // DOXYGEN_SHOULD_SKIP_THIS
221 
222 
223 namespace Gnome
224 {
225 
226 namespace Vfs
227 {
228 
234 bool operator==(const FileInfo& lhs, const FileInfo& rhs);
235 
241 bool operator!=(const FileInfo& lhs, const FileInfo& rhs);
242 
243 
244 } // namespace Vfs
245 
246 } // namespace Gnome
247 
248 
249 namespace Glib
250 {
251 
260  Glib::RefPtr<Gnome::Vfs::FileInfo> wrap(GnomeVFSFileInfo* object, bool take_copy = false);
261 
262 } // namespace Glib
263 
264 
265 #endif /* _LIBGNOMEVFSMM_FILE_INFO_H */
266 
Gnome::Vfs::FileInfo::get_name
std::string get_name() const
Get the name property of this FileInfo.
Gnome::Vfs::FileInfo::FileInfo
FileInfo()
Gnome::Vfs::FileInfo::wrap
Glib::RefPtr< Gnome::Vfs::FileInfo > wrap(GnomeVFSFileInfo *object, bool take_copy=false)
A Glib::wrap() method for this object.
Gnome::Vfs::FileInfo::get_access_time
time_t get_access_time() const
Get the access time of this FileInfo.
Gnome::Vfs::FileInfo::duplicate
Glib::RefPtr< FileInfo > duplicate()
Duplicates orig and returns it.
Gnome
Definition: address.h:37
types.h
Gnome::Vfs::FileInfo::reference
void reference() const
Gnome::Vfs::FileInfo::is_symlink
bool is_symlink() const
Find out if this FileInfo is a symbolic link.
Gnome::Vfs::FileInfo::get_creation_time
time_t get_creation_time() const
Get the creation time of this FileInfo.
Gnome::Vfs::FileInfo::get_io_block_size
guint get_io_block_size() const
Get the I/O block size of this FileInfo.
Gnome::Vfs::FileInfo::get_flags
FileFlags get_flags() const
Get the special flags of this FileInfo.
Gnome::Vfs::FileInfo::get_symlink_name
std::string get_symlink_name() const
Get the symlink name of this FileInfo.
Gnome::Vfs::FileInfo::get_uid
guint get_uid() const
Get the user id of this FileInfo.
Gnome::Vfs::FileInfo::unreference
void unreference() const
Gnome::Vfs::FileInfo::create
static Glib::RefPtr< FileInfo > create()
Gnome::Vfs::FileInfo
Definition: file-info.h:43
Gnome::Vfs::FileInfo::get_block_count
FileSize get_block_count() const
Get the size of this FileInfo.
Gnome::Vfs::FileInfo::get_gid
guint get_gid() const
Get the group id of this FileInfo.
Gnome::Vfs::FileInfo::clear
void clear()
Clears the attributes so they are ready to accept new data.
Gnome::Vfs::FilePermissions
FilePermissions
Definition: enums.h:442
Gnome::Vfs::FileInfo::get_modification_time
time_t get_modification_time() const
Get the modification time of this FileInfo.
Gnome::Vfs::FileInfo::operator==
bool operator==(const FileInfo &lhs, const FileInfo &rhs)
Gnome::Vfs::FileSize
GnomeVFSFileSize FileSize
Definition: types.h:29
Gnome::Vfs::FileInfo::gobj
GnomeVFSFileInfo * gobj()
Provides access to the underlying C instance.
Gnome::Vfs::FileFlags
FileFlags
Definition: enums.h:374
Gnome::Vfs::FileInfo::get_type
FileType get_type() const
Get the file type of this FileInfo.
Gnome::Vfs::FileInfo::gobj_copy
GnomeVFSFileInfo * gobj_copy() const
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Gnome::Vfs::FileInfo::gobj
const GnomeVFSFileInfo * gobj() const
Provides access to the underlying C instance.
Gnome::Vfs::FileType
FileType
Definition: enums.h:414
enums.h
Gnome::Vfs::FileInfo::get_size
FileSize get_size() const
Get the size of this FileInfo.
Gnome::Vfs::FileInfo::get_permissions
FilePermissions get_permissions() const
Get the permissions of this FileInfo.
Gnome::Vfs::FileInfo::operator!=
bool operator!=(const FileInfo &lhs, const FileInfo &rhs)
Gnome::Vfs::FileInfo::get_link_count
guint get_link_count() const
Get the link count of this FileInfo.
Gnome::Vfs::FileInfo::get_mime_type
Glib::ustring get_mime_type() const
Retrieve MIME type from this object.
Glib
Definition: address.h:120