Installer import into contrib (real import this time)
[dragonfly.git] / contrib / bsdinstaller-1.1.6 / src / lib / libdfui / encoding.h
1 /*
2  * Copyright (c)2004 Cat's Eye Technologies.  All rights reserved.
3  * 
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 
8  *   Redistributions of source code must retain the above copyright
9  *   notice, this list of conditions and the following disclaimer.
10  * 
11  *   Redistributions in binary form must reproduce the above copyright
12  *   notice, this list of conditions and the following disclaimer in
13  *   the documentation and/or other materials provided with the
14  *   distribution.
15  * 
16  *   Neither the name of Cat's Eye Technologies nor the names of its
17  *   contributors may be used to endorse or promote products derived
18  *   from this software without specific prior written permission. 
19  * 
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24  * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31  * OF THE POSSIBILITY OF SUCH DAMAGE. 
32  */
33
34 /*
35  * encoding.h
36  * $Id: encoding.h,v 1.7 2005/02/07 06:40:00 cpressey Exp $
37  */
38
39 #include <aura/buffer.h>
40
41 #include "dfui.h"
42
43 /*
44  * ENCODER
45  */
46
47 void                     dfui_encode_string(struct aura_buffer *, const char *);
48 void                     dfui_encode_int(struct aura_buffer *, int);
49 void                     dfui_encode_bool(struct aura_buffer *, int );
50
51 void                     dfui_encode_info(struct aura_buffer *, struct dfui_info *);
52
53 void                     dfui_encode_datasets(struct aura_buffer *, struct dfui_dataset *);
54 void                     dfui_encode_dataset(struct aura_buffer *, struct dfui_dataset *);
55
56 void                     dfui_encode_celldatas(struct aura_buffer *, struct dfui_celldata *);
57 void                     dfui_encode_celldata(struct aura_buffer *, struct dfui_celldata *);
58
59 void                     dfui_encode_properties(struct aura_buffer *, struct dfui_property *);
60 void                     dfui_encode_property(struct aura_buffer *, struct dfui_property *);
61
62 void                     dfui_encode_fields(struct aura_buffer *, struct dfui_field *);
63 void                     dfui_encode_field(struct aura_buffer *, struct dfui_field *);
64
65 void                     dfui_encode_options(struct aura_buffer *, struct dfui_option *);
66 void                     dfui_encode_option(struct aura_buffer *, struct dfui_option *);
67
68 void                     dfui_encode_actions(struct aura_buffer *, struct dfui_action *);
69 void                     dfui_encode_action(struct aura_buffer *, struct dfui_action *);
70
71 void                     dfui_encode_form(struct aura_buffer *, struct dfui_form *);
72
73 void                     dfui_encode_response(struct aura_buffer *, struct dfui_response *);
74
75 void                     dfui_encode_progress(struct aura_buffer *, struct dfui_progress *);
76
77 /*
78  * DECODER
79  */
80
81 char                    *dfui_decode_string(struct aura_buffer *);
82 int                      dfui_decode_int(struct aura_buffer *);
83 int                      dfui_decode_bool(struct aura_buffer *);
84
85 struct dfui_info        *dfui_decode_info(struct aura_buffer *);
86
87 struct dfui_celldata    *dfui_decode_celldata(struct aura_buffer *);
88 struct dfui_celldata    *dfui_decode_celldatas(struct aura_buffer *);
89
90 struct dfui_property    *dfui_decode_property(struct aura_buffer *);
91 struct dfui_property    *dfui_decode_properties(struct aura_buffer *);
92
93 struct dfui_dataset     *dfui_decode_dataset(struct aura_buffer *);
94 struct dfui_dataset     *dfui_decode_datasets(struct aura_buffer *);
95
96 struct dfui_field       *dfui_decode_field(struct aura_buffer *);
97 struct dfui_field       *dfui_decode_fields(struct aura_buffer *);
98
99 struct dfui_option      *dfui_decode_option(struct aura_buffer *);
100 struct dfui_option      *dfui_decode_options(struct aura_buffer *);
101
102 struct dfui_action      *dfui_decode_action(struct aura_buffer *);
103 struct dfui_action      *dfui_decode_actions(struct aura_buffer *);
104
105 struct dfui_form        *dfui_decode_form(struct aura_buffer *);
106
107 struct dfui_response    *dfui_decode_response(struct aura_buffer *);
108
109 struct dfui_progress    *dfui_decode_progress(struct aura_buffer *);