1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 2010 Red Hat, Inc. 4 */ 5 6 #ifndef __SOUP_CONTENT_SNIFFER_STREAM_H__ 7 #define __SOUP_CONTENT_SNIFFER_STREAM_H__ 1 8 9 #include <libsoup/soup-types.h> 10 #include <libsoup/soup-content-sniffer.h> 11 12 G_BEGIN_DECLS 13 14 #define SOUP_TYPE_CONTENT_SNIFFER_STREAM (soup_content_sniffer_stream_get_type ()) 15 #define SOUP_CONTENT_SNIFFER_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SOUP_TYPE_CONTENT_SNIFFER_STREAM, SoupContentSnifferStream)) 16 #define SOUP_CONTENT_SNIFFER_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SOUP_TYPE_CONTENT_SNIFFER_STREAM, SoupContentSnifferStreamClass)) 17 #define SOUP_IS_CONTENT_SNIFFER_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SOUP_TYPE_CONTENT_SNIFFER_STREAM)) 18 #define SOUP_IS_CONTENT_SNIFFER_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SOUP_TYPE_CONTENT_SNIFFER_STREAM)) 19 #define SOUP_CONTENT_SNIFFER_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SOUP_TYPE_CONTENT_SNIFFER_STREAM, SoupContentSnifferStreamClass)) 20 21 typedef struct _SoupContentSnifferStream SoupContentSnifferStream; 22 typedef struct _SoupContentSnifferStreamPrivate SoupContentSnifferStreamPrivate; 23 typedef struct _SoupContentSnifferStreamClass SoupContentSnifferStreamClass; 24 25 struct _SoupContentSnifferStream { 26 GFilterInputStream parent_instance; 27 28 /*< private >*/ 29 SoupContentSnifferStreamPrivate *priv; 30 }; 31 32 struct _SoupContentSnifferStreamClass { 33 GFilterInputStreamClass parent_class; 34 35 }; 36 37 GType soup_content_sniffer_stream_get_type (void) G_GNUC_CONST; 38 39 gboolean soup_content_sniffer_stream_is_ready (SoupContentSnifferStream *sniffer, 40 gboolean blocking, 41 GCancellable *cancellable, 42 GError **error); 43 const char *soup_content_sniffer_stream_sniff (SoupContentSnifferStream *sniffer, 44 GHashTable **params); 45 46 47 G_END_DECLS 48 49 #endif /* __SOUP_CONTENT_SNIFFER_STREAM_H__ */ 50