1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set tabstop=8 softtabstop=4 shiftwidth=4 expandtab: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsPSPrinters_h___
8 #define nsPSPrinters_h___
15 class nsPSPrinterList
{
20 * Is the PostScript module enabled or disabled?
21 * @return true if enabled,
27 * Obtain a list of printers (print destinations) supported by the
28 * PostScript module, Each entry will be in the form <type>/<name>,
29 * where <type> is a printer type string, and <name> is the actual
32 * @param aList Upon return, this is populated with the list of
33 * printer names as described above, replacing any
34 * previous contents. Each entry is a UTF8 string.
35 * There should always be at least one entry. The
36 * first entry is the default print destination.
38 void GetPrinterList(nsTArray
<nsCString
>& aList
);
41 kTypeUnknown
, // Not actually handled by the PS module
42 kTypePS
, // Generic postscript module printer
43 kTypeCUPS
// CUPS printer
47 * Identify a printer's type from its name.
48 * @param aName The printer's full name as a UTF8 string, including
49 * the <type> portion as described for GetPrinterList().
50 * @return The PrinterType value for this name.
52 static PrinterType
GetPrinterType(const nsACString
& aName
);
55 #endif /* nsPSPrinters_h___ */