a13f56ca9fb3086780956d2d589a9e55f3394bbf
[platform/upstream/libsoup.git] / libsoup / soup-soap-response.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2003, Novell, Inc.
4  */
5
6 #ifndef SOUP_SOAP_RESPONSE_H
7 #define SOUP_SOAP_RESPONSE_H
8
9 #include <glib-object.h>
10 #include <libxml/tree.h>
11
12 G_BEGIN_DECLS
13
14 #define SOUP_TYPE_SOAP_RESPONSE            (soup_soap_response_get_type ())
15 #define SOUP_SOAP_RESPONSE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SOAP_RESPONSE, SoupSoapResponse))
16 #define SOUP_SOAP_RESPONSE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SOAP_RESPONSE, SoupSoapResponseClass))
17 #define SOUP_IS_SOAP_RESPONSE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SOAP_RESPONSE))
18 #define SOUP_IS_SOAP_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SOAP_RESPONSE))
19 #define SOUP_SOAP_RESPONSE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SOAP_RESPONSE, SoupSoapResponseClass))
20
21 typedef struct _SoupSoapResponsePrivate SoupSoapResponsePrivate;
22
23 typedef struct {
24         GObject parent;
25         SoupSoapResponsePrivate *priv;
26 } SoupSoapResponse;
27
28 typedef struct {
29         GObjectClass parent_class;
30 } SoupSoapResponseClass;
31
32 GType             soup_soap_response_get_type (void);
33
34 SoupSoapResponse *soup_soap_response_new (void);
35 SoupSoapResponse *soup_soap_response_new_from_string (const char *xmlstr);
36
37 gboolean          soup_soap_response_from_string (SoupSoapResponse *response, const char *xmlstr);
38 char             *soup_soap_response_to_string (SoupSoapResponse *response);
39
40 const char       *soup_soap_response_get_method_name (SoupSoapResponse *response);
41 void              soup_soap_response_set_method_name (SoupSoapResponse *response,
42                                                       const char *method_name);
43
44 typedef xmlNode SoupSoapParameter;
45
46 const char        *soup_soap_parameter_get_name (SoupSoapParameter *param);
47 int                soup_soap_parameter_get_int_value (SoupSoapParameter *param);
48 char              *soup_soap_parameter_get_string_value (SoupSoapParameter *param);
49 SoupSoapParameter *soup_soap_parameter_get_first_child (SoupSoapParameter *param);
50 SoupSoapParameter *soup_soap_parameter_get_first_child_by_name (SoupSoapParameter *param,
51                                                                 const char *name);
52 SoupSoapParameter *soup_soap_parameter_get_next_child (SoupSoapParameter *param);
53 SoupSoapParameter *soup_soap_parameter_get_next_child_by_name (SoupSoapParameter *param,
54                                                                const char *name);
55
56 const GList       *soup_soap_response_get_parameters (SoupSoapResponse *response);
57 SoupSoapParameter *soup_soap_response_get_first_parameter (SoupSoapResponse *response);
58 SoupSoapParameter *soup_soap_response_get_first_parameter_by_name (SoupSoapResponse *response,
59                                                                    const char *name);
60 SoupSoapParameter *soup_soap_response_get_next_parameter (SoupSoapResponse *response,
61                                                           SoupSoapParameter *from);
62 SoupSoapParameter *soup_soap_response_get_next_parameter_by_name (SoupSoapResponse *response,
63                                                                   SoupSoapParameter *from,
64                                                                   const char *name);
65
66 G_END_DECLS
67
68 #endif