-void output_driver_register (struct output_driver *);
-void output_driver_unregister (struct output_driver *);
-bool output_driver_is_registered (const struct output_driver *);
-
-/* Common drivers. */
-extern const struct output_driver_class ascii_class;
-extern const struct output_driver_class html_class;
-extern const struct output_driver_class odt_class;
-extern const struct output_driver_class csv_class;
-#ifdef HAVE_CAIRO
-extern const struct output_driver_class cairo_class;
-#endif
+/* Useful for output driver implementation. */
+void output_driver_track_current_command (const struct output_item *, char **);
+\f
+/* An abstract way for the output subsystem to create an output driver. */
+struct output_driver_factory
+ {
+ /* The file extension, without the leading dot, e.g. "pdf". */
+ const char *extension;
+
+ /* Creates a new output driver of this class. NAME and TYPE should be
+ passed directly to output_driver_init. Returns the new output driver if
+ successful, otherwise a null pointer.
+
+ It is up to the driver class to decide how to interpret OPTIONS. The
+ create function should delete pairs that it understands from OPTIONS,
+ because the caller may issue errors about unknown options for any pairs
+ that remain. The functions in output/options.h can be useful.
+
+ The returned driver should not have been registered (with
+ output_driver_register). The caller will register the driver (if this
+ is desirable). */
+ struct output_driver *(*create) (const char *name,
+ enum settings_output_devices type,
+ struct string_map *options);
+ };
+