3 #ifndef _LIBGNOMEVFSMM_URI_H 4 #define _LIBGNOMEVFSMM_URI_H 32 #include <libgnomevfs/gnome-vfs-uri.h> 33 #include <libgnomevfs/gnome-vfs-ops.h> 64 {
return static_cast<MakeURIDirs>(
static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
68 {
return static_cast<MakeURIDirs>(
static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
72 {
return static_cast<MakeURIDirs>(
static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
76 {
return static_cast<MakeURIDirs>(~static_cast<
unsigned>(flags)); }
80 {
return (lhs = static_cast<MakeURIDirs>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
84 {
return (lhs = static_cast<MakeURIDirs>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
88 {
return (lhs = static_cast<MakeURIDirs>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
94 #ifndef DOXYGEN_SHOULD_SKIP_THIS 95 typedef Uri CppObjectType;
96 typedef GnomeVFSURI BaseObjectType;
108 const GnomeVFSURI*
gobj()
const;
116 void operator delete(
void*, size_t);
121 Uri& operator=(
const Uri&);
130 static Glib::RefPtr<Uri>
create(
const Glib::ustring& uri);
137 Glib::RefPtr<Uri>
resolve_relative(
const Glib::ustring& relative_reference);
146 Glib::RefPtr<Uri>
append_string(
const Glib::ustring& uri_fragment);
154 Glib::RefPtr<Uri>
append_path(
const Glib::ustring& path);
175 Glib::RefPtr<Uri>
dup();
258 bool equal(
const Glib::RefPtr<const Uri>& uri)
const;
269 bool is_parent(
const Glib::RefPtr<const Uri>& possible_child,
bool recursive =
true)
const;
327 static Glib::ustring
make_full_from_relative(
const Glib::ustring& base_uri,
const Glib::ustring& relative_uri);
375 static bool uris_match(
const Glib::ustring& uri_1,
const Glib::ustring& uri_2);
383 static Glib::ustring
get_scheme(
const Glib::ustring& uri);
402 #ifdef GLIBMM_EXCEPTIONS_ENABLED 411 #ifdef GLIBMM_EXCEPTIONS_ENABLED 414 void create_symbolic_link(
const Glib::ustring& target_reference, std::auto_ptr<Gnome::Vfs::exception>& error);
427 #ifdef GLIBMM_EXCEPTIONS_ENABLED 488 Glib::RefPtr<Gnome::Vfs::Uri>
wrap(GnomeVFSURI*
object,
bool take_copy =
false);
static Glib::ustring make_from_input(const Glib::ustring &uri)
Takes a user input path/URI and makes a valid URI out of it.
FileSize get_volume_free_space() const
This only works for URIs with the file: scheme.
Glib::RefPtr< Uri > get_parent()
Retrieve this object's parent Uri.
Glib::RefPtr< Uri > append_path(const Glib::ustring &path)
Create a new Uri object by appending path to this Uri object.
Glib::ustring get_scheme() const
Retrieve this object's scheme.
Definition: address.h:119
void set_user_name(const Glib::ustring &user_name)
Set user_name as the user name for this Uri.
Glib::RefPtr< Uri > resolve_relative(const Glib::ustring &relative_reference)
Create a new Uri from relative_reference to this object.
Glib::ustring get_host_name() const
Retrieve this object's host name.
Glib::RefPtr< Uri > dup()
Duplicate this Uri.
static Glib::ustring make_full_from_relative(const Glib::ustring &base_uri, const Glib::ustring &relative_uri)
Returns a full Uri given a full base URI, and a secondary URI which may be relative.
static Glib::ustring make_canonical_strip_fragment(const Glib::ustring &uri)
If the uri passed contains a fragment (anything after a '#') strips if, then makes the URI canonical...
Glib::ustring to_string(URIHideOptions hide_options=URI_HIDE_NONE) const
Translate this Uri into a printable string.
static Glib::ustring make_from_shell_arg(const Glib::ustring &uri)
Similar to gnome_vfs_make_uri_from_input, except that:
Glib::ustring get_password() const
Retrieve the password for this object.
static bool uris_match(const Glib::ustring &uri_1, const Glib::ustring &uri_2)
Compare two URIs.
Glib::ustring get_user_name() const
Retrieve the user name in this object.
bool operator==(const Uri &lhs, const Uri &rhs)
Glib::ustring get_path() const
Retrieve full path name for this Uri.
bool equal(const Glib::RefPtr< const Uri > &uri) const
Compare a and b.
Glib::RefPtr< FileInfo > get_file_info(FileInfoOptions options=FILE_INFO_DEFAULT) const
Retrieve the file info for this Uri.
Glib::RefPtr< Gnome::Vfs::Uri > wrap(GnomeVFSURI *object, bool take_copy=false)
A Glib::wrap() method for this object.
Glib::ustring extract_dirname() const
Extract the name of the directory in which the file pointed to by this Uri is stored as a new string...
bool has_parent() const
Check if this Uri has a parent or not.
GnomeVFSURI * gobj_copy() const
Provides access to the underlying C instance. The caller is responsible for unrefing it...
Glib::RefPtr< Uri > append_string(const Glib::ustring &uri_fragment)
Create a new Uri object by appending uri_fragment to this Uri object.
Glib::ustring extract_short_name() const
Retrieve base file name for this Uri, ignoring any trailing path separators.
Glib::ustring get_fragment_identifier() const
Retrieve the optional fragment identifier for this Uri.
GnomeVFSFileSize FileSize
Definition: types.h:29
bool is_local() const
Check if this Uri is a local (native) file system.
void create_symbolic_link(const Glib::ustring &target_reference)
Creates a symbolic link from this Uri to target_reference.
static Glib::RefPtr< Uri > create(const Glib::ustring &uri)
Create a new Uri from the text string uri.
void set_password(const Glib::ustring &password)
Set password as the password for this Uri.
guint get_host_port() const
Retrieve this object's host port number.
Glib::RefPtr< Uri > append_file_name(const Glib::ustring &filename)
Create a new Uri object by appending filename to this Uri object.
Definition: exception.h:33
GnomeVFSURI * gobj()
Provides access to the underlying C instance.
bool operator!=(const Uri &lhs, const Uri &rhs)
Glib::ustring extract_short_path_name() const
Retrieve base file name for this Uri, ignoring any trailing path separators.
void set_host_name(const Glib::ustring &host_name)
Set host_name as the host name accessed by this Uri.
bool is_parent(const Glib::RefPtr< const Uri > &possible_child, bool recursive=true) const
Check if possible_child is contained by this Uri.
static Glib::ustring format_for_display(const Glib::ustring &uri)
Filter, modify, unescape and change URIs to make them appropriate to display to users.
void set_host_port(guint host_port)
Set the host port number in this Uri.
bool uri_exists() const
Check if this Uri points to an existing entity.