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 Reference

#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
 
bool getUseIncludeFeature () const
 
bool getUseJobPatch () const
 
bool checkFeatureToken (const OUString &rPrinterName, const char *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 ()
 
static void release ()
 

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
 
voidm_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  Type {
  Type::Default = 0,
  Type::CUPS = 1,
  Type::CPD = 2
}
 
- Protected Member Functions inherited from psp::PrinterInfoManager
 PrinterInfoManager (Type eType=Type::Default)
 
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 const m_eType
 
bool m_bUseIncludeFeature
 
bool m_bUseJobPatch
 
OUString m_aSystemDefaultPaper
 

Detailed Description

Definition at line 38 of file cupsmgr.hxx.

Constructor & Destructor Documentation

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

Member Function Documentation

const char* psp::CUPSManager::authenticateUser ( )
virtual bool psp::CUPSManager::checkPrintersChanged ( bool  bWait)
overridevirtual

check if the printer configuration has changed

Reimplemented from psp::PrinterInfoManager.

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

wraps cupsGetPPD, so unlink after use !

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.

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

Reimplemented from psp::PrinterInfoManager.

void psp::CUPSManager::runDests ( )
private
static void psp::CUPSManager::runDestThread ( void pMgr)
static
virtual void psp::CUPSManager::setupJobContextData ( JobData rData)
overridevirtual

Reimplemented from psp::PrinterInfoManager.

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

Reimplemented from psp::PrinterInfoManager.

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

Member Data Documentation

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

Definition at line 44 of file cupsmgr.hxx.

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

Definition at line 54 of file cupsmgr.hxx.

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

Definition at line 46 of file cupsmgr.hxx.

oslThread psp::CUPSManager::m_aDestThread
private

Definition at line 55 of file cupsmgr.hxx.

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

Definition at line 57 of file cupsmgr.hxx.

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.

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

Definition at line 40 of file cupsmgr.hxx.

OString psp::CUPSManager::m_aUser
private

Definition at line 48 of file cupsmgr.hxx.

bool psp::CUPSManager::m_bNewDests
private

Definition at line 43 of file cupsmgr.hxx.

bool psp::CUPSManager::m_bPPDThreadRunning
private

Definition at line 58 of file cupsmgr.hxx.

int psp::CUPSManager::m_nDests
private

Definition at line 41 of file cupsmgr.hxx.

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: