1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2012 Igalia, S.L.
7 #ifndef __SOUP_CONTENT_PROCESSOR_H__
8 #define __SOUP_CONTENT_PROCESSOR_H__ 1
10 #include <libsoup/soup-types.h>
15 #define SOUP_TYPE_CONTENT_PROCESSOR (soup_content_processor_get_type ())
16 #define SOUP_CONTENT_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_CONTENT_PROCESSOR, SoupContentProcessor))
17 #define SOUP_IS_CONTENT_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_CONTENT_PROCESSOR))
18 #define SOUP_CONTENT_PROCESSOR_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), SOUP_TYPE_CONTENT_PROCESSOR, SoupContentProcessorInterface))
23 SOUP_STAGE_MESSAGE_BODY, /* Raw network data */
24 SOUP_STAGE_TRANSFER_ENCODING, /* SoupBodyInputStream is here */
25 SOUP_STAGE_ENTITY_BODY, /* Has Transfer-Encoding removed */
26 SOUP_STAGE_CONTENT_ENCODING, /* SoupContentDecoder works here */
27 SOUP_STAGE_BODY_DATA /* Actual body data */
28 } SoupProcessingStage;
30 typedef struct _SoupContentProcessor SoupContentProcessor;
31 typedef struct _SoupContentProcessorInterface SoupContentProcessorInterface;
33 struct _SoupContentProcessorInterface {
34 GTypeInterface parent;
36 SoupProcessingStage processing_stage;
39 GInputStream* (*wrap_input) (SoupContentProcessor *processor,
40 GInputStream *base_stream,
45 GType soup_content_processor_get_type (void);
47 GInputStream *soup_content_processor_wrap_input (SoupContentProcessor *processor,
48 GInputStream *base_stream,
52 SoupProcessingStage soup_content_processor_get_processing_stage (SoupContentProcessor *processor);
56 #endif /* __SOUP_CONTENT_PROCESSOR_H__ */