redo socket writing API
[swfdec.git] / swfdec / swfdec_stream_target.h
blob546f6c92fa13e826974f59575833ddcf73106ba5
1 /* Swfdec
2 * Copyright (C) 2007-2008 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef __SWFDEC_STREAM_TARGET_H__
21 #define __SWFDEC_STREAM_TARGET_H__
23 #include <swfdec/swfdec.h>
25 G_BEGIN_DECLS
28 #define SWFDEC_TYPE_STREAM_TARGET (swfdec_stream_target_get_type ())
29 #define SWFDEC_STREAM_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_STREAM_TARGET, SwfdecStreamTarget))
30 #define SWFDEC_IS_STREAM_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_STREAM_TARGET))
31 #define SWFDEC_STREAM_TARGET_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), SWFDEC_TYPE_STREAM_TARGET, SwfdecStreamTargetInterface))
33 typedef struct _SwfdecStreamTarget SwfdecStreamTarget; /* dummy object */
34 typedef struct _SwfdecStreamTargetInterface SwfdecStreamTargetInterface;
36 struct _SwfdecStreamTargetInterface {
37 GTypeInterface parent;
39 /* mandatory vfunc */
40 SwfdecPlayer * (* get_player) (SwfdecStreamTarget * target);
41 /* optional vfuncs */
42 void (* open) (SwfdecStreamTarget * target,
43 SwfdecStream * stream);
44 gboolean (* parse) (SwfdecStreamTarget * target,
45 SwfdecStream * stream);
46 void (* close) (SwfdecStreamTarget * target,
47 SwfdecStream * stream);
48 void (* error) (SwfdecStreamTarget * target,
49 SwfdecStream * stream);
50 void (* writable) (SwfdecStreamTarget * target,
51 SwfdecStream * stream);
54 GType swfdec_stream_target_get_type (void) G_GNUC_CONST;
56 SwfdecPlayer * swfdec_stream_target_get_player (SwfdecStreamTarget * target);
57 void swfdec_stream_target_open (SwfdecStreamTarget * target,
58 SwfdecStream * stream);
59 gboolean swfdec_stream_target_parse (SwfdecStreamTarget * target,
60 SwfdecStream * stream);
61 void swfdec_stream_target_close (SwfdecStreamTarget * target,
62 SwfdecStream * stream);
63 void swfdec_stream_target_error (SwfdecStreamTarget * target,
64 SwfdecStream * stream);
65 void swfdec_stream_target_writable (SwfdecStreamTarget * target,
66 SwfdecStream * stream);
69 G_END_DECLS
71 #endif /* __SWFDEC_STREAM_TARGET_H__ */