urihandler: remove "new-uri" signal
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 13 Nov 2011 15:37:40 +0000 (15:37 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 13 Nov 2011 15:37:40 +0000 (15:37 +0000)
No one but filesrc used that API. Should probably be replaced by
requiring an "uri" property instead, and then objects can do a
notify on that. Also removed interface structure padding, it's
not needed.

docs/gst/gstreamer-sections.txt
gst/gsturi.c
gst/gsturi.h
plugins/elements/gstfilesrc.c

index 5ab04e8..6880c6f 100644 (file)
@@ -2709,7 +2709,6 @@ gst_uri_handler_get_uri_type
 gst_uri_handler_get_protocols
 gst_uri_handler_get_uri
 gst_uri_handler_set_uri
-gst_uri_handler_new_uri
 <SUBSECTION Standard>
 GST_URI_HANDLER
 GST_IS_URI_HANDLER
index 66ab40c..2a027f9 100644 (file)
 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)
 {
@@ -71,7 +61,7 @@ gst_uri_handler_get_type (void)
     GType _type;
     static const GTypeInfo urihandler_info = {
       sizeof (GstURIHandlerInterface),
-      gst_uri_handler_base_init,
+      NULL,
       NULL,
       NULL,
       NULL,
@@ -92,29 +82,6 @@ gst_uri_handler_get_type (void)
   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:;<=>?   */
@@ -759,22 +726,6 @@ gst_uri_handler_set_uri (GstURIHandler * handler, const gchar * uri)
   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)
 {
index 176d70e..5068729 100644 (file)
@@ -80,18 +80,7 @@ typedef struct _GstURIHandlerInterface GstURIHandlerInterface;
 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);
@@ -101,12 +90,6 @@ struct _GstURIHandlerInterface {
   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 */
@@ -137,8 +120,6 @@ gchar **    gst_uri_handler_get_protocols   (GstURIHandler * handler);
 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
 
index 86900b0..6d5fa46 100644 (file)
@@ -257,7 +257,7 @@ gst_file_src_set_location (GstFileSrc * src, const gchar * location)
     GST_INFO ("uri      : %s", src->uri);
   }
   g_object_notify (G_OBJECT (src), "location");
-  gst_uri_handler_new_uri (GST_URI_HANDLER (src), src->uri);
+  /* FIXME 0.11: notify "uri" property once there is one */
 
   return TRUE;