Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / null / printerinfomanager.cxx
blob6545ffb2a89810f4adae22cdcb3c6c0b9ec50f2e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <memory>
21 #include "printerinfomanager.hxx"
23 #include "unx/gendata.hxx"
25 // needed since we declare a std::unique_ptr<SystemQueueInfo>
26 namespace psp
28 class SystemQueueInfo
33 using namespace psp;
34 using namespace osl;
37 PrinterInfoManager& PrinterInfoManager::get()
39 SalData* pSalData = GetSalData();
40 if( ! pSalData->m_pPIManager )
41 pSalData->m_pPIManager = new PrinterInfoManager();
42 return *pSalData->m_pPIManager;
45 void PrinterInfoManager::release()
47 SalData* pSalData = GetSalData();
48 delete pSalData->m_pPIManager;
49 pSalData->m_pPIManager = nullptr;
52 PrinterInfoManager::PrinterInfoManager( Type eType ) :
53 m_pQueueInfo( nullptr ),
54 m_eType( eType ),
55 m_bUseIncludeFeature( false ),
56 m_bUseJobPatch( true ),
57 m_aSystemDefaultPaper( "A4" )
59 // initSystemDefaultPaper();
62 PrinterInfoManager::~PrinterInfoManager()
67 bool PrinterInfoManager::checkPrintersChanged( bool /* bWait */ )
69 return false;
72 void PrinterInfoManager::initialize()
74 // ???
77 void PrinterInfoManager::listPrinters( ::std::list< OUString >& rList ) const
79 (void) this;
81 rList.clear();
84 const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& /* rPrinter */ ) const
86 static PrinterInfo aEmptyInfo;
88 (void) this;
90 return aEmptyInfo;
93 bool PrinterInfoManager::writePrinterConfig()
95 return false;
98 bool PrinterInfoManager::addPrinter( const OUString& /* rPrinterName */, const OUString& /* rDriverName */ )
100 return false;
103 bool PrinterInfoManager::removePrinter( const OUString& /* rPrinterName */, bool /* bCheckOnly */ )
105 return false;
108 bool PrinterInfoManager::setDefaultPrinter( const OUString& /* rPrinterName */ )
110 return false;
113 bool PrinterInfoManager::checkFeatureToken( const OUString& /* rPrinterName */, const char* /* pToken */ ) const
115 (void) this;
117 return false;
120 FILE* PrinterInfoManager::startSpool( const OUString& /* rPrintername */, bool /* bQuickCommand */ )
122 return nullptr;
125 bool PrinterInfoManager::endSpool( const OUString& /*rPrintername*/, const OUString& /*rJobTitle*/, FILE* /* pFile */, const JobData& /*rDocumentJobData*/, bool /*bBanner*/, const OUString& /*rFaxNumber*/ )
127 return true;
130 void PrinterInfoManager::setupJobContextData( JobData& /* rData */ )
135 void PrinterInfoManager::setDefaultPaper( PPDContext& /* rContext */ ) const
137 (void) this;
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */