summaryrefslogtreecommitdiff
path: root/client/gvfsurimapper.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2007-11-12 12:22:05 +0000
committerAlexander Larsson <alexl@src.gnome.org>2007-11-12 12:22:05 +0000
commit5390fb86582c79939b7a51ef512bd28664bbb1ca (patch)
tree5a4bb1e7f34929b7ca7e8c0675183f5e884eb702 /client/gvfsurimapper.h
parent31644982c385c859b9d4b3794b1d842d32aaebd8 (diff)
downloadgvfs-5390fb86582c79939b7a51ef512bd28664bbb1ca.tar.gz
Add new functions
2007-11-12 Alexander Larsson <alexl@redhat.com> * common/gmountspec.[ch]: (g_mount_spec_new_from_data): (g_mount_spec_set_with_len): Add new functions * client/Makefile.am: * common/Makefile.am: Update for moved files Build non-shared version of common libs. Ups non-shared common libs in client module. * common/gvfsuriutils.[ch]: Removed. * client/gvfsuriutils.[ch]: Added. Moved uriutils to gvfs (not used by daemon) Re-namespace to g_vfs_* * common/gvfsurimapper.[ch]: Removed. * client/gvfsurimapper.[ch]: Added. Move UriMapper to client lib Remove/Hide use of GMountSpec * client/gdaemonvfs.c: * client/smburi.c: Update to the new APIs * client/gvfsfusedaemon.c: * daemon/gvfsbackendtrash.c: * daemon/gvfsjobqueryfsinfo.c: Fix warnings svn path=/trunk/; revision=1020
Diffstat (limited to 'client/gvfsurimapper.h')
-rw-r--r--client/gvfsurimapper.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/client/gvfsurimapper.h b/client/gvfsurimapper.h
new file mode 100644
index 00000000..139630e5
--- /dev/null
+++ b/client/gvfsurimapper.h
@@ -0,0 +1,100 @@
+/* GIO - GLib Input, Output and Streaming Library
+ *
+ * Copyright (C) 2006-2007 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Alexander Larsson <alexl@redhat.com>
+ */
+
+#ifndef __G_VFS_URI_MAPPER_H__
+#define __G_VFS_URI_MAPPER_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define G_VFS_TYPE_URI_MAPPER (g_vfs_uri_mapper_get_type ())
+#define G_VFS_URI_MAPPER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_VFS_TYPE_URI_MAPPER, GVfsUriMapper))
+#define G_VFS_URI_MAPPER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_VFS_TYPE_URI_MAPPER, GVfsUriMapperClass))
+#define G_VFS_URI_MAPPER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_VFS_TYPE_URI_MAPPER, GVfsUriMapperClass))
+#define G_IS_VFS_URI_MAPPER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_VFS_TYPE_URI_MAPPER))
+#define G_IS_VFS_URI_MAPPER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_VFS_TYPE_URI_MAPPER))
+
+typedef struct _GVfsUriMapper GVfsUriMapper; /* Dummy typedef */
+typedef struct _GVfsUriMapperClass GVfsUriMapperClass;
+
+struct _GVfsUriMapper {
+ GObject parent;
+};
+
+typedef struct {
+ char *key;
+ char *value;
+} GVfsUriMountInfoKey;
+
+typedef struct {
+ GArray *keys;
+ char *path;
+} GVfsUriMountInfo;
+
+struct _GVfsUriMapperClass
+{
+ GObjectClass parent_class;
+
+ /* Virtual Table */
+
+ const char * const * (*get_handled_schemes) (GVfsUriMapper *mapper);
+ GVfsUriMountInfo * (*from_uri) (GVfsUriMapper *mapper,
+ const char *uri);
+
+ const char * const * (*get_handled_mount_types) (GVfsUriMapper *mapper);
+ char * (*to_uri) (GVfsUriMapper *mapper,
+ GVfsUriMountInfo *mount_info,
+ gboolean allow_utf8);
+ const char * (*to_uri_scheme) (GVfsUriMapper *mapper,
+ GVfsUriMountInfo *mount_info);
+};
+
+GType g_vfs_uri_mapper_get_type (void) G_GNUC_CONST;
+
+GVfsUriMountInfo *g_vfs_uri_mount_info_new (const char *type);
+void g_vfs_uri_mount_info_free (GVfsUriMountInfo *info);
+const char * g_vfs_uri_mount_info_get (GVfsUriMountInfo *info,
+ const char *key);
+void g_vfs_uri_mount_info_set (GVfsUriMountInfo *info,
+ const char *key,
+ const char *value);
+void g_vfs_uri_mount_info_set_with_len (GVfsUriMountInfo *info,
+ const char *key,
+ const char *value,
+ int value_len);
+
+const char * const *g_vfs_uri_mapper_get_handled_schemes (GVfsUriMapper *mapper);
+GVfsUriMountInfo * g_vfs_uri_mapper_from_uri (GVfsUriMapper *mapper,
+ const char *uri);
+
+const char * const *g_vfs_uri_mapper_get_handled_mount_types (GVfsUriMapper *mapper);
+char * g_vfs_uri_mapper_to_uri (GVfsUriMapper *mapper,
+ GVfsUriMountInfo *mount_info,
+ gboolean allow_utf8);
+const char * g_vfs_uri_mapper_to_uri_scheme (GVfsUriMapper *mapper,
+ GVfsUriMountInfo *mount_infoxo);
+
+
+G_END_DECLS
+
+#endif /* __G_VFS_URI_MAPPER_H__ */