summaryrefslogtreecommitdiff
path: root/gvfs/gvfs.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-11-30 22:55:24 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-11-30 22:55:24 +0100
commit016687cc49c811589951ebd064a86bdde1405866 (patch)
treec8affce18858467be6adcc4b9816388ba557e0c0 /gvfs/gvfs.c
parent01072f4baa7ae333e796800d8a17aa157fe08a4e (diff)
downloadtuxcmd-modules-016687cc49c811589951ebd064a86bdde1405866.tar.xz
Foundation of VFS capabilities
Diffstat (limited to 'gvfs/gvfs.c')
-rw-r--r--gvfs/gvfs.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gvfs/gvfs.c b/gvfs/gvfs.c
index 91a64c0..f62cfaa 100644
--- a/gvfs/gvfs.c
+++ b/gvfs/gvfs.c
@@ -120,6 +120,7 @@ g_error_to_TVFSResult (GError *error)
}
}
+
static void
ask_password_cb (GMountOperation *op,
const char *message,
@@ -195,6 +196,7 @@ ask_password_cb (GMountOperation *op,
g_mount_operation_reply (op, G_MOUNT_OPERATION_ABORTED);
}
+
static void
ask_question_cb (GMountOperation *op,
const gchar *message,
@@ -236,6 +238,7 @@ ask_question_cb (GMountOperation *op,
g_mount_operation_reply (op, G_MOUNT_OPERATION_UNHANDLED);
}
+
static void
mount_done_cb (GObject *object,
GAsyncResult *res,
@@ -263,6 +266,7 @@ mount_done_cb (GObject *object,
g_main_loop_quit (globs->mount_main_loop);
}
+
static TVFSResult
vfs_handle_mount (struct TVFSGlobs *globs, GFile *file)
{
@@ -288,6 +292,7 @@ vfs_handle_mount (struct TVFSGlobs *globs, GFile *file)
return globs->mount_result;
}
+
struct TVFSGlobs *
VFSNew (TVFSLogFunc log_func)
{
@@ -315,6 +320,7 @@ VFSNew (TVFSLogFunc log_func)
return globs;
}
+
void
VFSSetCallbacks (struct TVFSGlobs *globs,
TVFSAskQuestionCallback ask_question_callback,
@@ -328,6 +334,7 @@ VFSSetCallbacks (struct TVFSGlobs *globs,
globs->callback_data = data;
}
+
void
VFSFree (struct TVFSGlobs *globs)
{
@@ -335,12 +342,14 @@ VFSFree (struct TVFSGlobs *globs)
g_free (globs);
}
+
int
VFSVersion ()
{
return cVFSVersion;
}
+
struct TVFSInfo *
VFSGetInfo ()
{
@@ -354,6 +363,14 @@ VFSGetInfo ()
return module_info;
}
+
+guint32
+VFSGetCapabilities ()
+{
+ return VFS_CAP_HANDLES_MULTIPLE_REQUESTS | VFS_CAP_CAN_BROWSE_NETWORK;
+}
+
+
#if 0
char *
VFSGetArchiveExts ()
@@ -362,6 +379,7 @@ VFSGetArchiveExts ()
}
#endif
+
char *
VFSGetNetworkServices ()
{
@@ -388,6 +406,7 @@ VFSGetNetworkServices ()
return l;
}
+
TVFSResult
VFSOpenURI (struct TVFSGlobs *globs, const char *sURI)
{
@@ -448,6 +467,7 @@ VFSOpenURI (struct TVFSGlobs *globs, const char *sURI)
return cVFS_OK;
}
+
TVFSResult
VFSClose (struct TVFSGlobs *globs)
{
@@ -460,6 +480,7 @@ VFSClose (struct TVFSGlobs *globs)
return cVFS_OK;
}
+
static char *
get_absolute_path (GFile *file)
{
@@ -487,6 +508,7 @@ get_absolute_path (GFile *file)
return NULL;
}
+
char *
VFSGetPath (struct TVFSGlobs *globs)
{
@@ -498,6 +520,7 @@ VFSGetPath (struct TVFSGlobs *globs)
return s;
}
+
char *
VFSGetPathURI (struct TVFSGlobs *globs)
{
@@ -507,6 +530,7 @@ VFSGetPathURI (struct TVFSGlobs *globs)
return NULL;
}
+
TVFSResult
VFSGetFileSystemInfo (struct TVFSGlobs *globs, const char *APath, gint64 *FSSize, gint64 *FSFree, char **FSLabel)
{
@@ -543,6 +567,7 @@ VFSGetFileSystemInfo (struct TVFSGlobs *globs, const char *APath, gint64 *FSSize
return res;
}
+
/**************************************************************************************************************************************/
/**************************************************************************************************************************************/