configure.ac: Bump libsoup requirement as libsoup does not support async client opera...
[platform/upstream/gst-plugins-good.git] / ext / soup / gstsouphttpsrc.h
1 /* GStreamer
2  * Copyright (C) <2007> Wouter Cloetens <wouter@mind.be>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 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  * Library General Public License for more 
13  */
14
15 #ifndef __GST_SOUPHTTP_SRC_H__
16 #define __GST_SOUPHTTP_SRC_H__
17
18 #include <gst/gst.h>
19 #include <gst/base/gstpushsrc.h>
20 #include <glib.h>
21
22 G_BEGIN_DECLS
23
24 #include <libsoup/soup.h>
25
26 #define GST_TYPE_SOUPHTTP_SRC \
27   (gst_souphttp_src_get_type())
28 #define GST_SOUPHTTP_SRC(obj) \
29   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SOUPHTTP_SRC,GstSouphttpSrc))
30 #define GST_SOUPHTTP_SRC_CLASS(klass) \
31   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SOUPHTTP_SRC,GstSouphttpSrcClass))
32 #define GST_IS_SOUPHTTP_SRC(obj) \
33   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SOUPHTTP_SRC))
34 #define GST_IS_SOUPHTTP_SRC_CLASS(klass) \
35   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SOUPHTTP_SRC))
36
37 typedef struct _GstSouphttpSrc GstSouphttpSrc;
38 typedef struct _GstSouphttpSrcClass GstSouphttpSrcClass;
39
40 struct _GstSouphttpSrc {
41   GstPushSrc element;
42
43   gchar * location;                     /* Full URI. */
44   GMainContext * context;               /* I/O context. */
45   GMainLoop * loop;                     /* Event loop. */
46   SoupSession * session;                /* Async context. */
47   SoupMessage * msg;                    /* Request message. */
48   GstFlowReturn ret;                    /* Return code from callback. */
49   GstBuffer ** outbuf;                  /* Return buffer allocated by callback. */
50   gboolean interrupted;                 /* Signal unlock(). */
51   gboolean have_size;                   /* Received and parsed Content-Length header. */
52   guint64 content_size;                 /* Value of Content-Length header. */
53 };
54
55 struct _GstSouphttpSrcClass {
56   GstPushSrcClass parent_class;
57 };
58
59 GType gst_souphttp_src_get_type (void);
60
61 G_END_DECLS
62
63 #endif /* __GST_SOUPHTTP_SRC_H__ */
64