Blame docs/reference/gio/html/GVfs.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>GVfs: GIO Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GIO Reference Manual">
Packit ae235b
<link rel="up" href="extending.html" title="Extending GIO">
Packit ae235b
<link rel="prev" href="extending.html" title="Extending GIO">
Packit ae235b
<link rel="next" href="GIOModule.html" title="GIOModule">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description  | 
Packit ae235b
                  Object Hierarchy
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

GVfs

Packit ae235b

GVfs — Virtual File System

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GFile *
Packit ae235b
Packit ae235b
Packit ae235b
(*GVfsFileLookupFunc) ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GFile *
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_get_file_for_path ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GFile *
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_get_file_for_uri ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GFile *
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_parse_name ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GVfs *
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_get_default ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GVfs *
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_get_local ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_is_active ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
const gchar * const *
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_get_supported_uri_schemes ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_register_uri_scheme ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_vfs_unregister_uri_scheme ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
 
Packit ae235b
GVfs
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_VFS_EXTENSION_POINT_NAME
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Object Hierarchy

Packit ae235b
    GObject
Packit ae235b
    ╰── GVfs
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <gio/gio.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

Entry point for using GIO functionality.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

GVfsFileLookupFunc ()

Packit ae235b
GFile *
Packit ae235b
(*GVfsFileLookupFunc) (GVfs *vfs,
Packit ae235b
                       const char *identifier,
Packit ae235b
                       gpointer user_data);
Packit ae235b

This function type is used by g_vfs_register_uri_scheme() to make it

Packit ae235b
possible for a client to associate an URI scheme to a different GFile
Packit ae235b
implementation.

Packit ae235b

The client should return a reference to the new file that has been

Packit ae235b
created for uri
Packit ae235b
, or NULL to continue with the default implementation.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

vfs

Packit ae235b

a GVfs

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

identifier

Packit ae235b

the identifier to lookup a GFile for. This can either

Packit ae235b
be an URI or a parse name as returned by g_file_get_parse_name()

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

user_data

Packit ae235b

user data passed to the function

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a GFile for identifier

Packit ae235b
. 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.50

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_get_file_for_path ()

Packit ae235b
GFile *
Packit ae235b
g_vfs_get_file_for_path (GVfs *vfs,
Packit ae235b
                         const char *path);
Packit ae235b

Gets a GFile for path

Packit ae235b
.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

vfs

Packit ae235b

a GVfs.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

path

Packit ae235b

a string containing a VFS path.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a GFile.

Packit ae235b
Free the returned object with g_object_unref(). 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_get_file_for_uri ()

Packit ae235b
GFile *
Packit ae235b
g_vfs_get_file_for_uri (GVfs *vfs,
Packit ae235b
                        const char *uri);
Packit ae235b

Gets a GFile for uri

Packit ae235b
.

Packit ae235b

This operation never fails, but the returned object

Packit ae235b
might not support any I/O operation if the URI
Packit ae235b
is malformed or if the URI scheme is not supported.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

vfs

Packit ae235b

aGVfs.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

uri

Packit ae235b

a string containing a URI

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a GFile.

Packit ae235b
Free the returned object with g_object_unref(). 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_parse_name ()

Packit ae235b
GFile *
Packit ae235b
g_vfs_parse_name (GVfs *vfs,
Packit ae235b
                  const char *parse_name);
Packit ae235b

This operation never fails, but the returned object might

Packit ae235b
not support any I/O operations if the parse_name
Packit ae235b
 cannot
Packit ae235b
be parsed by the GVfs module.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

vfs

Packit ae235b

a GVfs.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

parse_name

Packit ae235b

a string to be parsed by the VFS module.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a GFile for the given parse_name

Packit ae235b
.
Packit ae235b
Free the returned object with g_object_unref(). 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_get_default ()

Packit ae235b
GVfs *
Packit ae235b
g_vfs_get_default (void);
Packit ae235b

Gets the default GVfs for the system.

Packit ae235b
Packit ae235b

Returns

Packit ae235b

a GVfs.

Packit ae235b

[transfer none]

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_get_local ()

Packit ae235b
GVfs *
Packit ae235b
g_vfs_get_local (void);
Packit ae235b

Gets the local GVfs for the system.

Packit ae235b
Packit ae235b

Returns

Packit ae235b

a GVfs.

Packit ae235b

[transfer none]

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_is_active ()

Packit ae235b
gboolean
Packit ae235b
g_vfs_is_active (GVfs *vfs);
Packit ae235b

Checks if the VFS is active.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

vfs

Packit ae235b

a GVfs.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if construction of the vfs

Packit ae235b
was successful
Packit ae235b
and it is now active.

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_get_supported_uri_schemes ()

Packit ae235b
const gchar * const *
Packit ae235b
g_vfs_get_supported_uri_schemes (GVfs *vfs);
Packit ae235b

Gets a list of URI schemes supported by vfs

Packit ae235b
.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

vfs

Packit ae235b

a GVfs.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a NULL-terminated array of strings.

Packit ae235b
The returned array belongs to GIO and must
Packit ae235b
not be freed or modified. 

Packit ae235b

[transfer none]

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_register_uri_scheme ()

Packit ae235b
gboolean
Packit ae235b
g_vfs_register_uri_scheme (GVfs *vfs,
Packit ae235b
                           const char *scheme,
Packit ae235b
                           GVfsFileLookupFunc uri_func,
Packit ae235b
                           gpointer uri_data,
Packit ae235b
                           GDestroyNotify uri_destroy,
Packit ae235b
                           GVfsFileLookupFunc parse_name_func,
Packit ae235b
                           gpointer parse_name_data,
Packit ae235b
                           GDestroyNotify parse_name_destroy);
Packit ae235b

Registers uri_func

Packit ae235b
 and parse_name_func
Packit ae235b
 as the GFile URI and parse name
Packit ae235b
lookup functions for URIs with a scheme matching scheme
Packit ae235b
.
Packit ae235b
Note that scheme
Packit ae235b
 is registered only within the running application, as
Packit ae235b
opposed to desktop-wide as it happens with GVfs backends.

Packit ae235b

When a GFile is requested with an URI containing scheme

Packit ae235b
 (e.g. through
Packit ae235b
g_file_new_for_uri()), uri_func
Packit ae235b
 will be called to allow a custom
Packit ae235b
constructor. The implementation of uri_func
Packit ae235b
 should not be blocking, and
Packit ae235b
must not call g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme().

Packit ae235b

When g_file_parse_name() is called with a parse name obtained from such file,

Packit ae235b
parse_name_func
Packit ae235b
 will be called to allow the GFile to be created again. In
Packit ae235b
that case, it's responsibility of parse_name_func
Packit ae235b
 to make sure the parse
Packit ae235b
name matches what the custom GFile implementation returned when
Packit ae235b
g_file_get_parse_name() was previously called. The implementation of
Packit ae235b
parse_name_func
Packit ae235b
 should not be blocking, and must not call
Packit ae235b
g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme().

Packit ae235b

It's an error to call this function twice with the same scheme. To unregister

Packit ae235b
a custom URI scheme, use g_vfs_unregister_uri_scheme().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

vfs

Packit ae235b

a GVfs

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

scheme

Packit ae235b

an URI scheme, e.g. "http"

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

uri_func

Packit ae235b

a GVfsFileLookupFunc.

Packit ae235b
[scope notified][nullable]
Packit ae235b
Packit ae235b
Packit ae235b

uri_data

Packit ae235b

custom data passed to be passed to uri_func

Packit ae235b
, or NULL. 

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

uri_destroy

Packit ae235b

function to be called when unregistering the

Packit ae235b
URI scheme, or when vfs
Packit ae235b
is disposed, to free the resources used
Packit ae235b
by the URI lookup function. 

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

parse_name_func

Packit ae235b

a GVfsFileLookupFunc.

Packit ae235b
[scope notified][nullable]
Packit ae235b
Packit ae235b
Packit ae235b

parse_name_data

Packit ae235b

custom data passed to be passed to

Packit ae235b
parse_name_func
Packit ae235b
, or NULL. 

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

parse_name_destroy

Packit ae235b

function to be called when unregistering the

Packit ae235b
URI scheme, or when vfs
Packit ae235b
is disposed, to free the resources used
Packit ae235b
by the parse name lookup function. 

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if scheme

Packit ae235b
was successfully registered, or FALSE if a handler
Packit ae235b
for scheme
Packit ae235b
already exists.

Packit ae235b
Packit ae235b

Since: 2.50

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_vfs_unregister_uri_scheme ()

Packit ae235b
gboolean
Packit ae235b
g_vfs_unregister_uri_scheme (GVfs *vfs,
Packit ae235b
                             const char *scheme);
Packit ae235b

Unregisters the URI handler for scheme

Packit ae235b
 previously registered with
Packit ae235b
g_vfs_register_uri_scheme().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

vfs

Packit ae235b

a GVfs

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

scheme

Packit ae235b

an URI scheme, e.g. "http"

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if scheme

Packit ae235b
was successfully unregistered, or FALSE if a
Packit ae235b
handler for scheme
Packit ae235b
does not exist.

Packit ae235b
Packit ae235b

Since: 2.50

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b

GVfs

Packit ae235b
typedef struct _GVfs GVfs;
Packit ae235b

Virtual File System object.

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_VFS_EXTENSION_POINT_NAME

Packit ae235b
#define G_VFS_EXTENSION_POINT_NAME "gio-vfs"
Packit ae235b
Packit ae235b

Extension point for GVfs functionality.

Packit ae235b
See Extending GIO.

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>