Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/widget/nsIPrintSettingsService.idl
*/
#ifndef __gen_nsIPrintSettingsService_h__
#define __gen_nsIPrintSettingsService_h__
#include "nsISupports.h"
#include "js/GCAnnotations.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIPrintSettings; /* forward declaration */
namespace mozilla {
namespace embedding {
class PrintData;
}
}
/* starting interface: nsIPrintSettingsService */
#define NS_IPRINTSETTINGSSERVICE_IID_STR "841387c8-72e6-484b-9296-bf6eea80d58a"
#define NS_IPRINTSETTINGSSERVICE_IID \
{0x841387c8, 0x72e6, 0x484b, \
{ 0x92, 0x96, 0xbf, 0x6e, 0xea, 0x80, 0xd5, 0x8a }}
class NS_NO_VTABLE nsIPrintSettingsService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPRINTSETTINGSSERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIPrintSettingsService;
/* [noscript] readonly attribute nsIPrintSettings defaultPrintSettingsForPrinting; */
NS_IMETHOD GetDefaultPrintSettingsForPrinting(nsIPrintSettings **aDefaultPrintSettingsForPrinting) = 0;
/* nsIPrintSettings createNewPrintSettings (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateNewPrintSettings(nsIPrintSettings **_retval) = 0;
/* readonly attribute AString lastUsedPrinterName; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetLastUsedPrinterName(nsAString& aLastUsedPrinterName) = 0;
/* void initPrintSettingsFromPrinter (in AString aPrinterName, in nsIPrintSettings aPrintSettings); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitPrintSettingsFromPrinter(const nsAString& aPrinterName, nsIPrintSettings *aPrintSettings) = 0;
/* void initPrintSettingsFromPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, bool aUsePrinterNamePrefix, uint32_t aFlags) = 0;
/* void maybeSavePrintSettingsToPrefs (in nsIPrintSettings aPrintSettings, in unsigned long aFlags); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MaybeSavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, uint32_t aFlags) = 0;
/* void maybeSaveLastUsedPrinterNameToPrefs (in AString aPrinterName); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MaybeSaveLastUsedPrinterNameToPrefs(const nsAString& aPrinterName) = 0;
/* [noscript] void SerializeToPrintData (in nsIPrintSettings aPrintSettings, in PrintDataPtr data); */
NS_IMETHOD SerializeToPrintData(nsIPrintSettings *aPrintSettings, mozilla::embedding::PrintData * data) = 0;
/* [noscript] void DeserializeToPrintSettings (in PrintDataRef data, in nsIPrintSettings aPrintSettings); */
NS_IMETHOD DeserializeToPrintSettings(const mozilla::embedding::PrintData & data, nsIPrintSettings *aPrintSettings) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIPrintSettingsService, NS_IPRINTSETTINGSSERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPRINTSETTINGSSERVICE \
NS_IMETHOD GetDefaultPrintSettingsForPrinting(nsIPrintSettings **aDefaultPrintSettingsForPrinting) override; \
NS_IMETHOD CreateNewPrintSettings(nsIPrintSettings **_retval) override; \
NS_IMETHOD GetLastUsedPrinterName(nsAString& aLastUsedPrinterName) override; \
NS_IMETHOD InitPrintSettingsFromPrinter(const nsAString& aPrinterName, nsIPrintSettings *aPrintSettings) override; \
NS_IMETHOD InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, bool aUsePrinterNamePrefix, uint32_t aFlags) override; \
NS_IMETHOD MaybeSavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, uint32_t aFlags) override; \
NS_IMETHOD MaybeSaveLastUsedPrinterNameToPrefs(const nsAString& aPrinterName) override; \
NS_IMETHOD SerializeToPrintData(nsIPrintSettings *aPrintSettings, mozilla::embedding::PrintData * data) override; \
NS_IMETHOD DeserializeToPrintSettings(const mozilla::embedding::PrintData & data, nsIPrintSettings *aPrintSettings) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIPRINTSETTINGSSERVICE \
nsresult GetDefaultPrintSettingsForPrinting(nsIPrintSettings **aDefaultPrintSettingsForPrinting); \
nsresult CreateNewPrintSettings(nsIPrintSettings **_retval); \
nsresult GetLastUsedPrinterName(nsAString& aLastUsedPrinterName); \
nsresult InitPrintSettingsFromPrinter(const nsAString& aPrinterName, nsIPrintSettings *aPrintSettings); \
nsresult InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, bool aUsePrinterNamePrefix, uint32_t aFlags); \
nsresult MaybeSavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, uint32_t aFlags); \
nsresult MaybeSaveLastUsedPrinterNameToPrefs(const nsAString& aPrinterName); \
nsresult SerializeToPrintData(nsIPrintSettings *aPrintSettings, mozilla::embedding::PrintData * data); \
nsresult DeserializeToPrintSettings(const mozilla::embedding::PrintData & data, nsIPrintSettings *aPrintSettings);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPRINTSETTINGSSERVICE(_to) \
NS_IMETHOD GetDefaultPrintSettingsForPrinting(nsIPrintSettings **aDefaultPrintSettingsForPrinting) override { return _to GetDefaultPrintSettingsForPrinting(aDefaultPrintSettingsForPrinting); } \
NS_IMETHOD CreateNewPrintSettings(nsIPrintSettings **_retval) override { return _to CreateNewPrintSettings(_retval); } \
NS_IMETHOD GetLastUsedPrinterName(nsAString& aLastUsedPrinterName) override { return _to GetLastUsedPrinterName(aLastUsedPrinterName); } \
NS_IMETHOD InitPrintSettingsFromPrinter(const nsAString& aPrinterName, nsIPrintSettings *aPrintSettings) override { return _to InitPrintSettingsFromPrinter(aPrinterName, aPrintSettings); } \
NS_IMETHOD InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, bool aUsePrinterNamePrefix, uint32_t aFlags) override { return _to InitPrintSettingsFromPrefs(aPrintSettings, aUsePrinterNamePrefix, aFlags); } \
NS_IMETHOD MaybeSavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, uint32_t aFlags) override { return _to MaybeSavePrintSettingsToPrefs(aPrintSettings, aFlags); } \
NS_IMETHOD MaybeSaveLastUsedPrinterNameToPrefs(const nsAString& aPrinterName) override { return _to MaybeSaveLastUsedPrinterNameToPrefs(aPrinterName); } \
NS_IMETHOD SerializeToPrintData(nsIPrintSettings *aPrintSettings, mozilla::embedding::PrintData * data) override { return _to SerializeToPrintData(aPrintSettings, data); } \
NS_IMETHOD DeserializeToPrintSettings(const mozilla::embedding::PrintData & data, nsIPrintSettings *aPrintSettings) override { return _to DeserializeToPrintSettings(data, aPrintSettings); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPRINTSETTINGSSERVICE(_to) \
NS_IMETHOD GetDefaultPrintSettingsForPrinting(nsIPrintSettings **aDefaultPrintSettingsForPrinting) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultPrintSettingsForPrinting(aDefaultPrintSettingsForPrinting); } \
NS_IMETHOD CreateNewPrintSettings(nsIPrintSettings **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateNewPrintSettings(_retval); } \
NS_IMETHOD GetLastUsedPrinterName(nsAString& aLastUsedPrinterName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastUsedPrinterName(aLastUsedPrinterName); } \
NS_IMETHOD InitPrintSettingsFromPrinter(const nsAString& aPrinterName, nsIPrintSettings *aPrintSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitPrintSettingsFromPrinter(aPrinterName, aPrintSettings); } \
NS_IMETHOD InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, bool aUsePrinterNamePrefix, uint32_t aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitPrintSettingsFromPrefs(aPrintSettings, aUsePrinterNamePrefix, aFlags); } \
NS_IMETHOD MaybeSavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, uint32_t aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MaybeSavePrintSettingsToPrefs(aPrintSettings, aFlags); } \
NS_IMETHOD MaybeSaveLastUsedPrinterNameToPrefs(const nsAString& aPrinterName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MaybeSaveLastUsedPrinterNameToPrefs(aPrinterName); } \
NS_IMETHOD SerializeToPrintData(nsIPrintSettings *aPrintSettings, mozilla::embedding::PrintData * data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SerializeToPrintData(aPrintSettings, data); } \
NS_IMETHOD DeserializeToPrintSettings(const mozilla::embedding::PrintData & data, nsIPrintSettings *aPrintSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeserializeToPrintSettings(data, aPrintSettings); }
#endif /* __gen_nsIPrintSettingsService_h__ */