Exemplo n.º 1
0
gsize
soup_content_sniffer_get_buffer_size (SoupContentSniffer *sniffer)
{
	g_return_val_if_fail (SOUP_IS_CONTENT_SNIFFER (sniffer), 0);

	return SOUP_CONTENT_SNIFFER_GET_CLASS (sniffer)->get_buffer_size (sniffer);
}
Exemplo n.º 2
0
static void
soup_content_sniffer_got_headers_cb (SoupMessage *msg, SoupContentSniffer *sniffer)
{
    SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg);
    SoupContentSnifferClass *content_sniffer_class = SOUP_CONTENT_SNIFFER_GET_CLASS (sniffer);

    priv->bytes_for_sniffing = content_sniffer_class->get_buffer_size (sniffer);
}
Exemplo n.º 3
0
char *
soup_content_sniffer_sniff (SoupContentSniffer *sniffer,
                            SoupMessage *msg, SoupBuffer *buffer,
                            GHashTable **params)
{
    g_return_val_if_fail (SOUP_IS_CONTENT_SNIFFER (sniffer), NULL);
    g_return_val_if_fail (SOUP_IS_MESSAGE (msg), NULL);
    g_return_val_if_fail (buffer != NULL, NULL);

    return SOUP_CONTENT_SNIFFER_GET_CLASS (sniffer)->sniff (sniffer, msg, buffer, params);
}