back to development
[swfdec.git] / swfdec / swfdec_socket.h
blob8a4eb2cdad83da8386a851ad98efc2c3b38153fe
1 /* Swfdec
2 * Copyright (C) 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_SOCKET_H_
21 #define _SWFDEC_SOCKET_H_
23 #include <glib-object.h>
24 #include <swfdec/swfdec_stream.h>
25 #include <swfdec/swfdec_player.h>
27 G_BEGIN_DECLS
29 typedef struct _SwfdecSocket SwfdecSocket;
30 typedef struct _SwfdecSocketClass SwfdecSocketClass;
32 #define SWFDEC_TYPE_SOCKET (swfdec_socket_get_type())
33 #define SWFDEC_IS_SOCKET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_SOCKET))
34 #define SWFDEC_IS_SOCKET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_SOCKET))
35 #define SWFDEC_SOCKET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_SOCKET, SwfdecSocket))
36 #define SWFDEC_SOCKET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_SOCKET, SwfdecSocketClass))
37 #define SWFDEC_SOCKET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_SOCKET, SwfdecSocketClass))
39 struct _SwfdecSocket
41 SwfdecStream stream;
44 struct _SwfdecSocketClass
46 /*< private >*/
47 SwfdecStreamClass stream_class;
49 /*< public >*/
50 void (* connect) (SwfdecSocket * socket,
51 SwfdecPlayer * player,
52 const char * hostname,
53 guint port);
55 void (* send) (SwfdecSocket * socket,
56 SwfdecBuffer * buffer);
59 GType swfdec_socket_get_type (void);
62 G_END_DECLS
63 #endif