2 * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd.
3 * Copyright (C) 2010 Jens Georg <mail@jensge.org>
5 * Author: Jorn Baayen <jorn@openedhand.com>
6 * Jens Georg <mail@jensge.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GSSDP_SOCKET_SOURCE_H__
25 #define __GSSDP_SOCKET_SOURCE_H__
27 #include <glib-object.h>
33 #define GSSDP_TYPE_SOCKET_SOURCE \
34 (gssdp_socket_source_get_type ())
35 #define GSSDP_SOCKET_SOURCE(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
37 GSSDP_TYPE_SOCKET_SOURCE, \
39 #define GSSDP_SOCKET_SOURCE_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_CAST ((klass), \
41 GSSDP_TYPE_SOCKET_SOURCE, \
42 GSSDPSocketSourceClass))
43 #define GSSDP_IS_SOCKET_SOURCE(obj) \
44 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
45 GSSDP_TYPE_SOCKET_SOURCE))
46 #define GSSDP_IS_SOCKET_SOURCE_CLASS(klass) \
47 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
48 GSSDP_TYPE_SOCKET_SOURCE))
49 #define GSSDP_SOCKET_SOURCE_GET_CLASS(obj) \
50 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
51 GSSDP_TYPE_SOCKET_SOURCE, \
52 GSSDPSocketSourceClass))
54 typedef struct _GSSDPSocketSourcePrivate GSSDPSocketSourcePrivate;
57 GSSDP_SOCKET_SOURCE_TYPE_REQUEST,
58 GSSDP_SOCKET_SOURCE_TYPE_MULTICAST,
59 GSSDP_SOCKET_SOURCE_TYPE_SEARCH
60 } GSSDPSocketSourceType;
64 typedef struct _GSSDPSocketSource {
67 GSSDPSocketSourcePrivate *priv;
70 typedef struct _GSSDPSocketSourceClass {
71 GObjectClass parent_class;
72 } GSSDPSocketSourceClass;
74 G_GNUC_INTERNAL GSSDPSocketSource *
75 gssdp_socket_source_new (GSSDPSocketSourceType type,
79 G_GNUC_INTERNAL GSocket*
80 gssdp_socket_source_get_socket (GSSDPSocketSource *socket_source);
83 gssdp_socket_source_set_callback (GSSDPSocketSource *socket_source,
88 gssdp_socket_source_attach (GSSDPSocketSource *socket_source);
92 #endif /* __GSSDP_SOCKET_SOURCE_H__ */