1 /*
2  * Copyright 1999-2006 University of Chicago
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * 
8  * http://www.apache.org/licenses/LICENSE-2.0
9  * 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #include "xsd_byte.h"
19 #include "globus_soap_message.h"
20 #include "globus_i_xsd.h"
21
22 GLOBUS_I_XSD_DEFINE_QNAME(xsd, byte);
23 GLOBUS_I_XSD_DEFINE_TYPE_INFO(xsd_byte);
24 0 GLOBUS_I_XSD_DEFINE_TYPE_FUNCTIONS(xsd_byte);
25
26 0 GLOBUS_I_XSD_DEFINE_INIT_CONTENTS_GENERIC(xsd_byte);
27 0 GLOBUS_I_XSD_DEFINE_DESTROY_CONTENTS_GENERIC(xsd_byte);
28 0 GLOBUS_I_XSD_DEFINE_COPY_CONTENTS_GENERIC(xsd_byte);
29
30 globus_result_t
31 xsd_byte_serialize_contents(
32     const xsd_QName *                   element,
33     const xsd_byte *                    instance,
34     globus_soap_message_handle_t        message_handle,
35     globus_xsd_element_options_t        options)
36 {
37 0     globus_result_t                     result = GLOBUS_SUCCESS;
38 0     GlobusFuncName(xsd_byte_serialize_contents);
39 0     GlobusSoapMessageDebugEnter();
40
41     /* serialize contents of type */
42 0     result = globus_soap_message_serialize_byte(
43         message_handle, instance);
44
45 0     GlobusSoapMessageDebugExit();
46 0     return result;
47 }
48
49 globus_result_t
50 xsd_byte_deserialize_contents(
51     const xsd_QName *                   eqn,
52     xsd_byte *                          instance,
53     globus_soap_message_handle_t        message_handle,
54     globus_xsd_element_options_t        options)
55 0 {
56 0     globus_result_t                     result = GLOBUS_SUCCESS;
57 0     GlobusFuncName(xsd_byte_deserialize_contents);
58 0     GlobusSoapMessageDebugEnter();
59     
60 0     result = globus_soap_message_deserialize_byte(
61         message_handle, instance);
62
63 0     GlobusSoapMessageDebugExit();
64 0     return result;