LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
psp::CUPSManager Class Referencefinal

#include <cupsmgr.hxx>

Inheritance diagram for psp::CUPSManager:
[legend]
Collaboration diagram for psp::CUPSManager:
[legend]

Public Member Functions

const PPDParsercreateCUPSParser (const OUString &rPrinter)
 wraps cupsGetPPD, so unlink after use ! More...
 
const char * authenticateUser ()
 
virtual FILE * startSpool (const OUString &rPrinterName, bool bQuickCommand) override
 
virtual bool endSpool (const OUString &rPrinterName, const OUString &rJobTitle, FILE *pFile, const JobData &rDocumentJobData, bool bBanner, const OUString &rFaxNumber) override
 
virtual void setupJobContextData (JobData &rData) override
 
virtual bool checkPrintersChanged (bool bWait) override
 check if the printer configuration has changed More...
 
- Public Member Functions inherited from psp::PrinterInfoManager
Type getType () const
 
void listPrinters (std::vector< OUString > &rVector) const
 
const PrinterInfogetPrinterInfo (const OUString &rPrinter) const
 
const OUString & getDefaultPrinter () const
 
virtual void setupJobContextData (JobData &rData)
 
virtual bool checkPrintersChanged (bool bWait)
 
virtual FILE * startSpool (const OUString &rPrinterName, bool bQuickCommand)
 
virtual bool endSpool (const OUString &rPrinterName, const OUString &rJobTitle, FILE *pFile, const JobData &rDocumentJobData, bool bBanner, const OUString &rFaxNumber)
 
bool getUseIncludeFeature () const
 
bool getUseJobPatch () const
 
bool checkFeatureToken (const OUString &rPrinterName, std::string_view pToken) const
 
virtual ~PrinterInfoManager ()
 

Static Public Member Functions

static void runDestThread (void *pMgr)
 
static CUPSManagertryLoadCUPS ()
 
- Static Public Member Functions inherited from psp::PrinterInfoManager
static PrinterInfoManagerget ()
 

Private Member Functions

 CUPSManager ()
 
virtual ~CUPSManager () override
 
virtual void initialize () override
 
void runDests ()
 
OString threadedCupsGetPPD (const char *pPrinter)
 

Static Private Member Functions

static void getOptionsFromDocumentSetup (const JobData &rJob, bool bBanner, int &rNumOptions, void **rOptions)
 

Private Attributes

std::unordered_map< FILE *, OString, FPtrHashm_aSpoolFiles
 
int m_nDests
 
void * m_pDests
 
bool m_bNewDests
 
std::unordered_map< OUString, intm_aCUPSDestMap
 
std::unordered_map< OUString, PPDContextm_aDefaultContexts
 
OString m_aUser
 
OString m_aPassword
 this is a security risk, but the CUPS API demands to deliver a pointer to a static buffer containing the password, so this cannot be helped More...
 
osl::Mutex m_aCUPSMutex
 
oslThread m_aDestThread
 
osl::Mutex m_aGetPPDMutex
 
bool m_bPPDThreadRunning
 

Additional Inherited Members

- Public Types inherited from psp::PrinterInfoManager
enum class  Type {
  Default = 0 ,
  CUPS = 1 ,
  CPD = 2
}
 
- Protected Member Functions inherited from psp::PrinterInfoManager
 PrinterInfoManager (Type eType=Type::Default)
 
virtual void initialize ()
 
void setDefaultPaper (PPDContext &rInfo) const
 
- Protected Attributes inherited from psp::PrinterInfoManager
std::unordered_map< OUString, Printerm_aPrinters
 
PrinterInfo m_aGlobalDefaults
 
std::vector< WatchFilem_aWatchFiles
 
OUString m_aDefaultPrinter
 
OUString m_aSystemPrintCommand
 
std::vector< SystemPrintQueuem_aSystemPrintQueues
 
std::unique_ptr< SystemQueueInfo > m_pQueueInfo
 
Type m_eType
 
bool m_bUseIncludeFeature
 
bool m_bUseJobPatch
 
OUString m_aSystemDefaultPaper
 

Detailed Description

Definition at line 38 of file cupsmgr.hxx.

Constructor & Destructor Documentation

◆ CUPSManager()

psp::CUPSManager::CUPSManager ( )
private

◆ ~CUPSManager()

virtual psp::CUPSManager::~CUPSManager ( )
overrideprivatevirtual

Member Function Documentation

◆ authenticateUser()

const char * psp::CUPSManager::authenticateUser ( )

◆ checkPrintersChanged()

virtual bool psp::CUPSManager::checkPrintersChanged ( bool  bWait)
overridevirtual

check if the printer configuration has changed

Reimplemented from psp::PrinterInfoManager.

◆ createCUPSParser()

const PPDParser * psp::CUPSManager::createCUPSParser ( const OUString &  rPrinter)

wraps cupsGetPPD, so unlink after use !

◆ endSpool()

virtual bool psp::CUPSManager::endSpool ( const OUString &  rPrinterName,
const OUString &  rJobTitle,
FILE *  pFile,
const JobData rDocumentJobData,
bool  bBanner,
const OUString &  rFaxNumber 
)
overridevirtual

Reimplemented from psp::PrinterInfoManager.

◆ getOptionsFromDocumentSetup()

static void psp::CUPSManager::getOptionsFromDocumentSetup ( const JobData rJob,
bool  bBanner,
int rNumOptions,
void **  rOptions 
)
staticprivate

◆ initialize()

virtual void psp::CUPSManager::initialize ( )
overrideprivatevirtual

Reimplemented from psp::PrinterInfoManager.

◆ runDests()

void psp::CUPSManager::runDests ( )
private

◆ runDestThread()

static void psp::CUPSManager::runDestThread ( void *  pMgr)
static

◆ setupJobContextData()

virtual void psp::CUPSManager::setupJobContextData ( JobData rData)
overridevirtual

Reimplemented from psp::PrinterInfoManager.

◆ startSpool()

virtual FILE * psp::CUPSManager::startSpool ( const OUString &  rPrinterName,
bool  bQuickCommand 
)
overridevirtual

Reimplemented from psp::PrinterInfoManager.

References FILE.

◆ threadedCupsGetPPD()

OString psp::CUPSManager::threadedCupsGetPPD ( const char *  pPrinter)
private

◆ tryLoadCUPS()

static CUPSManager * psp::CUPSManager::tryLoadCUPS ( )
static

Member Data Documentation

◆ m_aCUPSDestMap

std::unordered_map< OUString, int > psp::CUPSManager::m_aCUPSDestMap
private

Definition at line 44 of file cupsmgr.hxx.

◆ m_aCUPSMutex

osl::Mutex psp::CUPSManager::m_aCUPSMutex
private

Definition at line 54 of file cupsmgr.hxx.

◆ m_aDefaultContexts

std::unordered_map< OUString, PPDContext > psp::CUPSManager::m_aDefaultContexts
private

Definition at line 46 of file cupsmgr.hxx.

◆ m_aDestThread

oslThread psp::CUPSManager::m_aDestThread
private

Definition at line 55 of file cupsmgr.hxx.

◆ m_aGetPPDMutex

osl::Mutex psp::CUPSManager::m_aGetPPDMutex
private

Definition at line 57 of file cupsmgr.hxx.

◆ m_aPassword

OString psp::CUPSManager::m_aPassword
private

this is a security risk, but the CUPS API demands to deliver a pointer to a static buffer containing the password, so this cannot be helped

Definition at line 52 of file cupsmgr.hxx.

◆ m_aSpoolFiles

std::unordered_map< FILE*, OString, FPtrHash > psp::CUPSManager::m_aSpoolFiles
private

Definition at line 40 of file cupsmgr.hxx.

◆ m_aUser

OString psp::CUPSManager::m_aUser
private

Definition at line 48 of file cupsmgr.hxx.

◆ m_bNewDests

bool psp::CUPSManager::m_bNewDests
private

Definition at line 43 of file cupsmgr.hxx.

◆ m_bPPDThreadRunning

bool psp::CUPSManager::m_bPPDThreadRunning
private

Definition at line 58 of file cupsmgr.hxx.

◆ m_nDests

int psp::CUPSManager::m_nDests
private

Definition at line 41 of file cupsmgr.hxx.

◆ m_pDests

void* psp::CUPSManager::m_pDests
private

Definition at line 42 of file cupsmgr.hxx.


The documentation for this class was generated from the following file: