~ubuntu-branches/ubuntu/utopic/lasso/utopic-proposed

« back to all changes in this revision

Viewing changes to lasso/xml/soap-env_envelope.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2004-09-13 09:26:34 UTC
  • Revision ID: james.westby@ubuntu.com-20040913092634-01vdfl8j9cp94exa
Tags: upstream-0.4.1
ImportĀ upstreamĀ versionĀ 0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: soap-env_envelope.c,v 1.3 2004/08/13 15:16:13 fpeters Exp $ 
 
2
 *
 
3
 * Lasso - A free implementation of the Liberty Alliance specifications.
 
4
 *
 
5
 * Copyright (C) 2004 Entr'ouvert
 
6
 * http://lasso.entrouvert.org
 
7
 * 
 
8
 * Author: Valery Febvre <vfebvre@easter-eggs.com>
 
9
 *         Nicolas Clapies <nclapies@entrouvert.com>
 
10
 *
 
11
 * This program is free software; you can redistribute it and/or modify
 
12
 * it under the terms of the GNU General Public License as published by
 
13
 * the Free Software Foundation; either version 2 of the License, or
 
14
 * (at your option) any later version.
 
15
 * 
 
16
 * This program is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 * GNU General Public License for more details.
 
20
 * 
 
21
 * You should have received a copy of the GNU General Public License
 
22
 * along with this program; if not, write to the Free Software
 
23
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
24
 */
 
25
 
 
26
#include <lasso/xml/soap-env_envelope.h>
 
27
 
 
28
/*****************************************************************************/
 
29
/* public methods                                                            */
 
30
/*****************************************************************************/
 
31
 
 
32
void
 
33
lasso_soap_env_envelope_set_body(LassoSoapEnvEnvelope *envelope,
 
34
                                 LassoSoapEnvBody *body)
 
35
{
 
36
  LassoNodeClass *class;
 
37
  g_assert(LASSO_IS_SOAP_ENV_ENVELOPE(envelope));
 
38
  g_assert(LASSO_IS_SOAP_ENV_BODY(body));
 
39
 
 
40
  class = LASSO_NODE_GET_CLASS(envelope);
 
41
  class->add_child(LASSO_NODE(envelope),
 
42
                   LASSO_NODE(body),
 
43
                   FALSE);
 
44
}
 
45
 
 
46
/*****************************************************************************/
 
47
/* instance and class init functions                                         */
 
48
/*****************************************************************************/
 
49
 
 
50
static void
 
51
lasso_soap_env_envelope_instance_init(LassoSoapEnvEnvelope *node)
 
52
{
 
53
  LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
 
54
 
 
55
  class->set_ns(LASSO_NODE(node), lassoSoapEnvHRef,
 
56
                lassoSoapEnvPrefix);
 
57
  class->set_name(LASSO_NODE(node), "Envelope");
 
58
}
 
59
 
 
60
static void
 
61
lasso_soap_env_envelope_class_init(LassoSoapEnvEnvelopeClass *klass)
 
62
{
 
63
}
 
64
 
 
65
GType lasso_soap_env_envelope_get_type() {
 
66
  static GType this_type = 0;
 
67
 
 
68
  if (!this_type) {
 
69
    static const GTypeInfo this_info = {
 
70
      sizeof (LassoSoapEnvEnvelopeClass),
 
71
      NULL,
 
72
      NULL,
 
73
      (GClassInitFunc) lasso_soap_env_envelope_class_init,
 
74
      NULL,
 
75
      NULL,
 
76
      sizeof(LassoSoapEnvEnvelope),
 
77
      0,
 
78
      (GInstanceInitFunc) lasso_soap_env_envelope_instance_init,
 
79
    };
 
80
    
 
81
    this_type = g_type_register_static(LASSO_TYPE_NODE ,
 
82
                                       "LassoSoapEnvEnvelope",
 
83
                                       &this_info, 0);
 
84
  }
 
85
  return this_type;
 
86
}
 
87
 
 
88
LassoNode* lasso_soap_env_envelope_new() {
 
89
  return LASSO_NODE(g_object_new(LASSO_TYPE_SOAP_ENV_ENVELOPE,
 
90
                                 NULL));
 
91
}