2007-01-12 00:54:29 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-01-12 00:54:29 +03:00
|
|
|
|
2007-01-18 09:34:07 +03:00
|
|
|
#ifndef nsPrintOptionsX_h_
|
|
|
|
#define nsPrintOptionsX_h_
|
2007-01-12 00:54:29 +03:00
|
|
|
|
|
|
|
#include "nsPrintOptionsImpl.h"
|
|
|
|
|
2015-05-06 21:10:21 +03:00
|
|
|
namespace mozilla
|
|
|
|
{
|
|
|
|
namespace embedding
|
|
|
|
{
|
|
|
|
class PrintData;
|
|
|
|
} // namespace embedding
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2007-01-12 00:54:29 +03:00
|
|
|
class nsPrintOptionsX : public nsPrintOptions
|
|
|
|
{
|
|
|
|
public:
|
2008-09-25 06:26:58 +04:00
|
|
|
nsPrintOptionsX();
|
|
|
|
virtual ~nsPrintOptionsX();
|
2015-05-06 21:10:21 +03:00
|
|
|
|
2016-11-10 04:37:40 +03:00
|
|
|
/*
|
|
|
|
* These serialize and deserialize methods are not symmetrical in that
|
|
|
|
* printSettingsX != deserialize(serialize(printSettingsX)). This is because
|
|
|
|
* the native print settings stored in the nsPrintSettingsX's NSPrintInfo
|
|
|
|
* object are not fully serialized. Only the values needed for successful
|
|
|
|
* printing are.
|
|
|
|
*/
|
2015-05-06 21:10:21 +03:00
|
|
|
NS_IMETHODIMP SerializeToPrintData(nsIPrintSettings* aSettings,
|
|
|
|
nsIWebBrowserPrint* aWBP,
|
|
|
|
mozilla::embedding::PrintData* data);
|
|
|
|
NS_IMETHODIMP DeserializeToPrintSettings(const mozilla::embedding::PrintData& data,
|
|
|
|
nsIPrintSettings* settings);
|
|
|
|
|
2007-01-12 00:54:29 +03:00
|
|
|
protected:
|
2008-09-25 06:26:58 +04:00
|
|
|
nsresult _CreatePrintSettings(nsIPrintSettings **_retval);
|
2012-08-22 19:56:38 +04:00
|
|
|
nsresult ReadPrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName, uint32_t aFlags);
|
|
|
|
nsresult WritePrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName, uint32_t aFlags);
|
2007-01-12 00:54:29 +03:00
|
|
|
};
|
|
|
|
|
2007-01-18 09:34:07 +03:00
|
|
|
#endif // nsPrintOptionsX_h_
|