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
22#ifndef __GST_CHILD_PROXY_H__
23#define __GST_CHILD_PROXY_H__
24
25#include <glib-object.h>
26#include <gst/gst.h>
27
28G_BEGIN_DECLS
29
30
31#define GST_TYPE_CHILD_PROXY (gst_child_proxy_get_type ())
32#define GST_CHILD_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CHILD_PROXY, GstChildProxy))
33#define GST_IS_CHILD_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CHILD_PROXY))
34#define GST_CHILD_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_CHILD_PROXY, GstChildProxyInterface))
35
36/**
37 * GstChildProxy:
38 *
39 * Opaque #GstChildProxy data structure.
40 */
41typedef struct _GstChildProxy GstChildProxy; /* dummy object */
42typedef struct _GstChildProxyInterface GstChildProxyInterface;
43
44/**
45 * GstChildProxyInterface:
46 * @parent: parent interface type.
47 * @get_child_by_name: virtual method to fetch the child by name
48 * @get_child_by_index: virtual method to fetch the child by index
49 * @get_children_count: virtual method to get the children count
50 *
51 * #GstChildProxy interface.
52 */
53struct _GstChildProxyInterface
54{
55 GTypeInterface parent;
56
57 /* methods */
58 GObject * (*get_child_by_name) (GstChildProxy * parent, const gchar * name);
59 GObject * (*get_child_by_index) (GstChildProxy * parent, guint index);
60 guint (*get_children_count) (GstChildProxy * parent);
61 /*< private >*/
62 /* signals */
63 void (*child_added) (GstChildProxy * parent, GObject * child, const gchar * name);
64 void (*child_removed) (GstChildProxy * parent, GObject * child, const gchar * name);
65
66 /*< private >*/
67 gpointer _gst_reserved[GST_PADDING];
68};
69
70GST_API
71GType gst_child_proxy_get_type (void);
72
73GST_API
74GObject * gst_child_proxy_get_child_by_name (GstChildProxy * parent, const gchar * name);
75
76GST_API
77guint gst_child_proxy_get_children_count (GstChildProxy * parent);
78
79GST_API
80GObject * gst_child_proxy_get_child_by_index (GstChildProxy * parent, guint index);
81
82GST_API
83gboolean gst_child_proxy_lookup (GstChildProxy *object, const gchar *name,
84 GObject **target, GParamSpec **pspec);
85GST_API
86void gst_child_proxy_get_property (GstChildProxy * object, const gchar *name,
87 GValue *value);
88GST_API
89void gst_child_proxy_get_valist (GstChildProxy * object,
90 const gchar * first_property_name,
91 va_list var_args);
92GST_API
93void gst_child_proxy_get (GstChildProxy * object,
94 const gchar * first_property_name,
95 ...) G_GNUC_NULL_TERMINATED;
96GST_API
97void gst_child_proxy_set_property (GstChildProxy * object, const gchar *name,
98 const GValue *value);
99
100GST_API
101void gst_child_proxy_set_valist (GstChildProxy* object,
102 const gchar * first_property_name,
103 va_list var_args);
104GST_API
105void gst_child_proxy_set (GstChildProxy * object,
106 const gchar * first_property_name,
107 ...) G_GNUC_NULL_TERMINATED;
108GST_API
109void gst_child_proxy_child_added (GstChildProxy * parent, GObject * child,
110 const gchar *name);
111GST_API
112void gst_child_proxy_child_removed (GstChildProxy * parent, GObject * child,
113 const gchar *name);
114
115G_END_DECLS
116
117#endif /* __GST_CHILD_PROXY_H__ */
118