GST_DEBUG_CATEGORY_STATIC (gst_uri_handler_debug);
#define GST_CAT_DEFAULT gst_uri_handler_debug
-enum
-{
- NEW_URI,
- LAST_SIGNAL
-};
-
-static guint gst_uri_handler_signals[LAST_SIGNAL] = { 0 };
-
-static void gst_uri_handler_base_init (gpointer g_class);
-
GType
gst_uri_handler_get_type (void)
{
GType _type;
static const GTypeInfo urihandler_info = {
sizeof (GstURIHandlerInterface),
- gst_uri_handler_base_init,
+ NULL,
NULL,
NULL,
NULL,
return urihandler_type;
}
-static void
-gst_uri_handler_base_init (gpointer g_class)
-{
- static gboolean initialized = FALSE;
-
- if (G_UNLIKELY (!initialized)) {
-
- /**
- * GstURIHandler::new-uri:
- * @handler: The #GstURIHandler which emitted the signal
- * @uri: (transfer none): The new URI, or NULL if the URI was removed
- *
- * The URI of the given @handler has changed.
- */
-
- gst_uri_handler_signals[NEW_URI] =
- g_signal_new ("new-uri", GST_TYPE_URI_HANDLER, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstURIHandlerInterface, new_uri), NULL, NULL,
- gst_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
- initialized = TRUE;
- }
-}
-
static const guchar acceptable[96] = { /* X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF */
0x00, 0x3F, 0x20, 0x20, 0x20, 0x00, 0x2C, 0x3F, 0x3F, 0x3F, 0x3F, 0x22, 0x20, 0x3F, 0x3F, 0x1C, /* 2X !"#$%&'()*+,-./ */
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x38, 0x20, 0x20, 0x2C, 0x20, 0x2C, /* 3X 0123456789:;<=>? */
return ret;
}
-/**
- * gst_uri_handler_new_uri:
- * @handler: A #GstURIHandler
- * @uri: new URI or NULL if it was unset
- *
- * Emits the new-uri signal for a given handler, when that handler has a new URI.
- * This function should only be called by URI handlers themselves.
- */
-void
-gst_uri_handler_new_uri (GstURIHandler * handler, const gchar * uri)
-{
- g_return_if_fail (GST_IS_URI_HANDLER (handler));
-
- g_signal_emit (handler, gst_uri_handler_signals[NEW_URI], 0, uri);
-}
-
static gchar *
gst_file_utils_canonicalise_path (const gchar * path)
{
struct _GstURIHandlerInterface {
GTypeInterface parent;
- /*< private >*/
- /* signals */
- void (* new_uri) (GstURIHandler * handler,
- const gchar * uri);
- /* idea for the future ?
- gboolean (* require_password) (GstURIHandler * handler,
- gchar ** username,
- gchar ** password);
- */
-
/* vtable */
-
/*< public >*/
/* querying capabilities */
GstURIType (* get_type) (GType type);
const gchar * (* get_uri) (GstURIHandler * handler);
gboolean (* set_uri) (GstURIHandler * handler,
const gchar * uri);
-
- /*< private >*/
- /* we might want to add functions here to query features,
- * someone with gnome-vfs knowledge go ahead */
-
- gpointer _gst_reserved[GST_PADDING];
};
/* general URI functions */
const gchar * gst_uri_handler_get_uri (GstURIHandler * handler);
gboolean gst_uri_handler_set_uri (GstURIHandler * handler,
const gchar * uri);
-void gst_uri_handler_new_uri (GstURIHandler * handler,
- const gchar * uri);
G_END_DECLS