Rewrite PSPP output engine.
[pspp-builds.git] / src / output / driver.h
1 /* PSPP - a program for statistical analysis.
2    Copyright (C) 1997-9, 2000, 2007, 2009 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef OUTPUT_DRIVER_H
18 #define OUTPUT_DRIVER_H 1
19
20 #include <stdbool.h>
21
22 struct output_item;
23 struct string_map;
24 struct string_set;
25
26 void output_close (void);
27
28 struct output_driver *output_driver_create (const char *class_name,
29                                             struct string_map *options);
30
31 bool output_define_macro (const char *, struct string_map *macros);
32 void output_read_configuration (const struct string_map *macros,
33                                 const struct string_set *drivers);
34 void output_configure_driver (const char *);
35
36 void output_list_classes (void);
37
38 void output_submit (struct output_item *);
39 void output_flush (void);
40
41 /* Device types. */
42 enum output_device_type
43   {
44     OUTPUT_DEVICE_UNKNOWN,      /* Unknown type of device. */
45     OUTPUT_DEVICE_LISTING,      /* Listing device. */
46     OUTPUT_DEVICE_SCREEN,       /* Screen device. */
47     OUTPUT_DEVICE_PRINTER       /* Printer device. */
48   };
49 unsigned int output_get_enabled_types (void);
50 void output_set_enabled_types (unsigned int);
51 void output_set_type_enabled (bool enable, enum output_device_type);
52
53 #endif /* output/driver.h */