gstchildproxy.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /* GStreamer
  2. * Copyright (C) 2005 Stefan Kost <[email protected]>
  3. *
  4. * gstchildproxy.h: interface header for multi child elements
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  19. * Boston, MA 02110-1301, USA.
  20. */
  21. #ifndef __GST_CHILD_PROXY_H__
  22. #define __GST_CHILD_PROXY_H__
  23. #include <glib-object.h>
  24. #include <gst/gst.h>
  25. G_BEGIN_DECLS
  26. #define GST_TYPE_CHILD_PROXY (gst_child_proxy_get_type ())
  27. #define GST_CHILD_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CHILD_PROXY, GstChildProxy))
  28. #define GST_IS_CHILD_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CHILD_PROXY))
  29. #define GST_CHILD_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_CHILD_PROXY, GstChildProxyInterface))
  30. /**
  31. * GstChildProxy:
  32. *
  33. * Opaque #GstChildProxy data structure.
  34. */
  35. typedef struct _GstChildProxy GstChildProxy; /* dummy object */
  36. typedef struct _GstChildProxyInterface GstChildProxyInterface;
  37. /**
  38. * GstChildProxyInterface:
  39. * @parent: parent interface type.
  40. * @get_child_by_name: virtual method to fetch the child by name
  41. * @get_child_by_index: virtual method to fetch the child by index
  42. * @get_children_count: virtual method to get the children count
  43. *
  44. * #GstChildProxy interface.
  45. */
  46. struct _GstChildProxyInterface
  47. {
  48. GTypeInterface parent;
  49. /* methods */
  50. GObject * (*get_child_by_name) (GstChildProxy * parent, const gchar * name);
  51. GObject * (*get_child_by_index) (GstChildProxy * parent, guint index);
  52. guint (*get_children_count) (GstChildProxy * parent);
  53. /*< private >*/
  54. /* signals */
  55. void (*child_added) (GstChildProxy * parent, GObject * child, const gchar * name);
  56. void (*child_removed) (GstChildProxy * parent, GObject * child, const gchar * name);
  57. /*< private >*/
  58. gpointer _gst_reserved[GST_PADDING];
  59. };
  60. GType gst_child_proxy_get_type (void);
  61. GObject * gst_child_proxy_get_child_by_name (GstChildProxy * parent, const gchar * name);
  62. guint gst_child_proxy_get_children_count (GstChildProxy * parent);
  63. GObject * gst_child_proxy_get_child_by_index (GstChildProxy * parent, guint index);
  64. gboolean gst_child_proxy_lookup (GstChildProxy *object, const gchar *name,
  65. GObject **target, GParamSpec **pspec);
  66. void gst_child_proxy_get_property (GstChildProxy * object, const gchar *name,
  67. GValue *value);
  68. void gst_child_proxy_get_valist (GstChildProxy * object,
  69. const gchar * first_property_name,
  70. va_list var_args);
  71. void gst_child_proxy_get (GstChildProxy * object,
  72. const gchar * first_property_name,
  73. ...) G_GNUC_NULL_TERMINATED;
  74. void gst_child_proxy_set_property (GstChildProxy * object, const gchar *name,
  75. const GValue *value);
  76. void gst_child_proxy_set_valist (GstChildProxy* object,
  77. const gchar * first_property_name,
  78. va_list var_args);
  79. void gst_child_proxy_set (GstChildProxy * object,
  80. const gchar * first_property_name,
  81. ...) G_GNUC_NULL_TERMINATED;
  82. void gst_child_proxy_child_added (GstChildProxy * parent, GObject * child,
  83. const gchar *name);
  84. void gst_child_proxy_child_removed (GstChildProxy * parent, GObject * child,
  85. const gchar *name);
  86. G_END_DECLS
  87. #endif /* __GST_CHILD_PROXY_H__ */