summaryrefslogtreecommitdiffstats
path: root/gio
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-08-01 16:35:48 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-08-01 16:35:48 +0000
commit60d03ac1b8f211e805ea129b54d2a60b40627255 (patch)
tree6e8372c0f45de7a9bee01c4d6bc9d9e6131a0ac0 /gio
parentbaee1fed7d769e6e2e31c046e19a2d3818ae27f7 (diff)
downloadpygobject-60d03ac1b8f211e805ea129b54d2a60b40627255.tar.gz
pygobject-60d03ac1b8f211e805ea129b54d2a60b40627255.tar.xz
pygobject-60d03ac1b8f211e805ea129b54d2a60b40627255.zip
Bug 545846 – g_vfs_get_supported_uri_schemes is missing
2008-08-01 Johan Dahlin <johan@gnome.org> Bug 545846 – g_vfs_get_supported_uri_schemes is missing * gio/gio.defs: * gio/gio.override: * tests/test_gio.py: Wrap, add test and documentation svn path=/trunk/; revision=904
Diffstat (limited to 'gio')
-rw-r--r--gio/gio.defs9
-rw-r--r--gio/gio.override21
2 files changed, 30 insertions, 0 deletions
diff --git a/gio/gio.defs b/gio/gio.defs
index 791caff..be3087d 100644
--- a/gio/gio.defs
+++ b/gio/gio.defs
@@ -4320,6 +4320,15 @@
(return-type "GVfs*")
)
+(define-method get_supported_uri_schemes
+ (docstring
+"VFS.get_supported_uri_schemes() -> [uri, ..]\n"
+"Gets a list of URI schemes supported by vfs.")
+ (of-object "GVfs")
+ (c-name "g_vfs_get_supported_uri_schemes")
+ (return-type "const-char*-const*")
+)
+
;; From gwin32appinfo.h
diff --git a/gio/gio.override b/gio/gio.override
index 9146ba3..46fc6a6 100644
--- a/gio/gio.override
+++ b/gio/gio.override
@@ -282,3 +282,24 @@ _wrap_g_mount_unmount(PyGObject *self,
Py_INCREF(Py_None);
return Py_None;
}
+%%
+override g_vfs_get_supported_uri_schemes noargs
+static PyObject *
+_wrap_g_vfs_get_supported_uri_schemes(PyGObject *self)
+{
+ const char * const *names;
+ PyObject *ret;
+
+ names = g_vfs_get_supported_uri_schemes(G_VFS(self->obj));
+
+ ret = PyList_New(0);
+ while (names && *names) {
+ PyObject *item = PyString_FromString(names[0]);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+
+ names++;
+ }
+
+ return ret;
+}