gstpad: Add some DISABLE_DEPRECATED markers in the header too
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 18 Aug 2009 12:05:40 +0000 (14:05 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 18 Aug 2009 12:57:08 +0000 (14:57 +0200)
The internal links function is deprecated since some time and
there already were GST_REMOVE_DEPRECATED markers in the source file,
now add them to the header too.

Fixes bug #592209.

gst/gstpad.c
gst/gstpad.h

index af65724..f978a67 100644 (file)
@@ -122,6 +122,15 @@ static gboolean gst_pad_acceptcaps_default (GstPad * pad, GstCaps * caps);
 static xmlNodePtr gst_pad_save_thyself (GstObject * object, xmlNodePtr parent);
 #endif
 
+/* Some deprecated stuff that we need inside here for
+ * backwards compatibility */
+#ifdef GST_DISABLE_DEPRECATED
+#ifndef GST_REMOVE_DEPRECATED
+#define GST_PAD_INTLINKFUNC(pad)       (GST_PAD_CAST(pad)->intlinkfunc)
+GList *gst_pad_get_internal_links_default (GstPad * pad);
+#endif
+#endif
+
 static GstObjectClass *parent_class = NULL;
 static guint gst_pad_signals[LAST_SIGNAL] = { 0 };
 
@@ -341,8 +350,10 @@ gst_pad_init (GstPad * pad)
   GST_PAD_QUERYTYPEFUNC (pad) =
       GST_DEBUG_FUNCPTR (gst_pad_get_query_types_default);
   GST_PAD_QUERYFUNC (pad) = GST_DEBUG_FUNCPTR (gst_pad_query_default);
+#ifndef GST_REMOVE_DEPRECATED
   GST_PAD_INTLINKFUNC (pad) =
       GST_DEBUG_FUNCPTR (gst_pad_get_internal_links_default);
+#endif
   GST_PAD_ITERINTLINKFUNC (pad) =
       GST_DEBUG_FUNCPTR (gst_pad_iterate_internal_links_default);
 
index fa53012..e79adb2 100644 (file)
@@ -698,7 +698,9 @@ struct _GstPadClass {
 #define GST_PAD_EVENTFUNC(pad)         (GST_PAD_CAST(pad)->eventfunc)
 #define GST_PAD_QUERYTYPEFUNC(pad)     (GST_PAD_CAST(pad)->querytypefunc)
 #define GST_PAD_QUERYFUNC(pad)         (GST_PAD_CAST(pad)->queryfunc)
+#ifndef GST_DISABLE_DEPRECATED
 #define GST_PAD_INTLINKFUNC(pad)       (GST_PAD_CAST(pad)->intlinkfunc)
+#endif
 #define GST_PAD_ITERINTLINKFUNC(pad)    (GST_PAD_CAST(pad)->iterintlinkfunc)
 
 #define GST_PAD_PEER(pad)              (GST_PAD_CAST(pad)->peer)
@@ -923,9 +925,11 @@ gboolean           gst_pad_pause_task                      (GstPad *pad);
 gboolean               gst_pad_stop_task                       (GstPad *pad);
 
 /* internal links */
+#ifndef GST_DISABLE_DEPRECATED
 void                   gst_pad_set_internal_link_function      (GstPad *pad, GstPadIntLinkFunction intlink);
 GList*                 gst_pad_get_internal_links              (GstPad *pad);
 GList*                 gst_pad_get_internal_links_default      (GstPad *pad);
+#endif
 
 void                    gst_pad_set_iterate_internal_links_function (GstPad * pad,
                                                                  GstPadIterIntLinkFunction iterintlink);