2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wtay@chello.be>
4 * 2001 Bastien Nocera <hadess@hadess.net>
5 * 2003 Colin Walters <walters@verbum.org>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
30 #include <libgnomevfs/gnome-vfs.h>
31 #include "gstgnomevfsuri.h"
35 /* FIXME: move this to source and sink and remove this file:
36 * e.g. sinks cannot save to http:// and src cannot read from burn://
39 _internal_get_supported_uris (gpointer data)
41 /* no dav/davs in the list, because they don't appear to be reliable enough */
42 const gchar *uris[] = {
43 "http://localhost/bla",
44 "https://localhost/bla",
46 "smb://localhost/bla",
47 "ftp://localhost/bla",
48 "sftp://localhost/bla",
49 "nfs://localhost/bla",
50 "ssh://localhost/bla",
57 result = g_new0 (gchar *, G_N_ELEMENTS (uris) + 1);
58 for (n = 0; n < G_N_ELEMENTS (uris); n++) {
59 uri = gnome_vfs_uri_new (uris[n]);
61 gchar *protocol = g_strdup (uris[n]);
64 gnome_vfs_uri_unref (uri);
65 for (n = 0; protocol[n] != '\0'; n++) {
66 if (protocol[n] == ':') {
72 GST_DEBUG ("adding protocol '%s'", protocol);
73 result[r++] = protocol;
75 GST_DEBUG ("could not create GnomeVfsUri from '%s'", uris[n]);
84 gst_gnomevfs_get_supported_uris (void)
86 static GOnce once = G_ONCE_INIT;
88 g_once (&once, _internal_get_supported_uris, NULL);
89 return (gchar **) once.retval;