File: soup-content-processor.h

package info (click to toggle)
libsoup3 3.6.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,728 kB
  • sloc: ansic: 62,034; python: 202; xml: 97; sh: 84; makefile: 32; javascript: 5
file content (44 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (3)
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
42
43
44
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2012 Igalia, S.L.
 */

#pragma once

#include "soup-types.h"

G_BEGIN_DECLS

#define SOUP_TYPE_CONTENT_PROCESSOR (soup_content_processor_get_type ())
G_DECLARE_INTERFACE (SoupContentProcessor, soup_content_processor, SOUP, CONTENT_PROCESSOR, GObject)

typedef enum {
	SOUP_STAGE_INVALID,

	SOUP_STAGE_MESSAGE_BODY,      /* Raw network data */
	SOUP_STAGE_TRANSFER_ENCODING, /* SoupBodyInputStream is here */
	SOUP_STAGE_ENTITY_BODY,       /* Has Transfer-Encoding removed */
	SOUP_STAGE_CONTENT_ENCODING,  /* SoupContentDecoder works here */
	SOUP_STAGE_BODY_DATA          /* Actual body data */
} SoupProcessingStage;

struct _SoupContentProcessorInterface {
	GTypeInterface parent;

	SoupProcessingStage processing_stage;

	/* methods */
	GInputStream*       (*wrap_input)             (SoupContentProcessor *processor,
						       GInputStream         *base_stream,
						       SoupMessage          *msg,
						       GError              **error);
};

GInputStream       *soup_content_processor_wrap_input           (SoupContentProcessor *processor,
								 GInputStream         *base_stream,
								 SoupMessage          *msg,
								 GError              **error);

SoupProcessingStage soup_content_processor_get_processing_stage (SoupContentProcessor *processor);

G_END_DECLS