blob: df0f86dd04d2422658212cda898d2cf4e1b62f99 [file] [log] [blame]
Robert Shearman35d327b2005-12-08 12:52:13 +01001/*
2 * Format String Generator for IDL Compiler
3 *
Eric Kohl15509382006-03-23 10:33:08 +01004 * Copyright 2005-2006 Eric Kohl
Robert Shearman35d327b2005-12-08 12:52:13 +01005 * Copyright 2005 Robert Shearman
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
Jonathan Ernst360a3f92006-05-18 14:49:52 +020019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Robert Shearman35d327b2005-12-08 12:52:13 +010020 */
21
22
Robert Shearman7e5cf942005-12-26 13:14:28 +010023enum pass
24{
25 PASS_IN,
26 PASS_OUT,
27 PASS_RETURN
28};
29
Robert Shearman55df46a2006-02-07 12:32:24 +010030enum remoting_phase
31{
32 PHASE_BUFFERSIZE,
33 PHASE_MARSHAL,
34 PHASE_UNMARSHAL,
35 PHASE_FREE
36};
37
Robert Shearman35d327b2005-12-08 12:52:13 +010038void write_procformatstring(FILE *file, type_t *iface);
Robert Shearman435e36e2005-12-13 11:22:08 +010039void write_typeformatstring(FILE *file, type_t *iface);
Eric Kohl12d4d9c2006-03-29 12:42:29 +020040size_t get_type_memsize(const type_t *type);
Eric Kohl7fb3f122006-04-09 14:38:57 +020041unsigned int get_required_buffer_size(const var_t *var, unsigned int *alignment, enum pass pass);
Robert Shearman27c32222006-03-31 12:49:36 +010042void print_phase_basetype(FILE *file, int indent, enum remoting_phase phase, enum pass pass, const var_t *var, const char *varname);
Robert Shearman55df46a2006-02-07 12:32:24 +010043void write_remoting_arguments(FILE *file, int indent, const func_t *func, unsigned int *type_offset, enum pass pass, enum remoting_phase phase);
Robert Shearman6d76ad82006-01-24 11:05:51 +010044size_t get_size_procformatstring_var(const var_t *var);
45size_t get_size_typeformatstring_var(const var_t *var);
Eric Kohl15509382006-03-23 10:33:08 +010046size_t get_size_procformatstring(const type_t *iface);
47size_t get_size_typeformatstring(const type_t *iface);
Robert Shearmanb59c9952006-01-27 12:53:32 +010048int write_expr_eval_routines(FILE *file, const char *iface);
49void write_expr_eval_routine_list(FILE *file, const char *iface);