summaryrefslogtreecommitdiff
path: root/libsoup/content-sniffer/soup-content-sniffer.h
blob: 6931b6e4e324e6d280ad587c605dc60a0df4d801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2009 Gustavo Noronha Silva.
 */

#pragma once

#include "soup-types.h"
#include "soup-message-body.h"

G_BEGIN_DECLS

#define SOUP_TYPE_CONTENT_SNIFFER (soup_content_sniffer_get_type ())
SOUP_AVAILABLE_IN_2_28
G_DECLARE_DERIVABLE_TYPE (SoupContentSniffer, soup_content_sniffer, SOUP, CONTENT_SNIFFER, GObject)

struct _SoupContentSnifferClass {
	GObjectClass parent_class;

	char* (*sniff)              (SoupContentSniffer *sniffer,
				     SoupMessage *msg,
				     GBytes *buffer,
				     GHashTable **params);
	gsize (*get_buffer_size)    (SoupContentSniffer *sniffer);

	gpointer padding[6];
};

SOUP_AVAILABLE_IN_2_28
SoupContentSniffer *soup_content_sniffer_new             (void);

SOUP_AVAILABLE_IN_2_28
char               *soup_content_sniffer_sniff           (SoupContentSniffer  *sniffer,
							  SoupMessage         *msg,
							  GBytes              *buffer,
							  GHashTable         **params);
SOUP_AVAILABLE_IN_2_28
gsize               soup_content_sniffer_get_buffer_size (SoupContentSniffer  *sniffer);

G_END_DECLS