Remove extern "C" wrapping other includes
[platform/upstream/libsoup.git] / libsoup / soup-content-processor.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2012 Igalia, S.L.
4  */
5
6
7 #ifdef HAVE_CONFIG_H
8 #include <config.h>
9 #endif
10
11 #include "soup-content-processor.h"
12 #include "soup.h"
13
14 G_DEFINE_INTERFACE (SoupContentProcessor, soup_content_processor, G_TYPE_OBJECT)
15
16 static GInputStream *
17 soup_content_processor_real_wrap_input (SoupContentProcessor *processor,
18                                         GInputStream *base_stream,
19                                         SoupMessage *msg,
20                                         GError **error)
21 {
22         g_return_val_if_reached (NULL);
23 }
24
25 static void
26 soup_content_processor_default_init (SoupContentProcessorInterface *interface)
27 {
28         interface->processing_stage = SOUP_STAGE_INVALID;
29         interface->wrap_input = soup_content_processor_real_wrap_input;
30 }
31
32 GInputStream *
33 soup_content_processor_wrap_input (SoupContentProcessor *processor,
34                                    GInputStream *base_stream,
35                                    SoupMessage *msg,
36                                    GError **error)
37 {
38         g_return_val_if_fail (SOUP_IS_CONTENT_PROCESSOR (processor), NULL);
39
40         return SOUP_CONTENT_PROCESSOR_GET_INTERFACE (processor)->wrap_input (processor, base_stream, msg, error);
41 }
42
43 SoupProcessingStage
44 soup_content_processor_get_processing_stage (SoupContentProcessor *processor)
45 {
46         g_return_val_if_fail (SOUP_IS_CONTENT_PROCESSOR (processor), SOUP_STAGE_INVALID);
47
48         return SOUP_CONTENT_PROCESSOR_GET_INTERFACE (processor)->processing_stage;
49 }