xref: /aoo42x/main/vcl/inc/print.h (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SV_PRINT_H
29 #define _SV_PRINT_H
30 
31 #include "vcl/sv.h"
32 #include "vcl/dllapi.h"
33 
34 #include "rtl/ustring.hxx"
35 
36 #include <vector>
37 #include <hash_map>
38 
39 struct SalPrinterQueueInfo;
40 class QueueInfo;
41 class JobSetup;
42 
43 namespace vcl
44 { class PrinterListener; }
45 
46 // --------------------
47 // - ImplPrnQueueData -
48 // --------------------
49 
50 struct ImplPrnQueueData
51 {
52 	QueueInfo*				mpQueueInfo;
53 	SalPrinterQueueInfo*	mpSalQueueInfo;
54 };
55 
56 // --------------------
57 // - ImplPrnQueueList -
58 // --------------------
59 
60 class VCL_PLUGIN_PUBLIC ImplPrnQueueList
61 {
62 public:
63     std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash >
64                                         m_aNameToIndex;
65     std::vector< ImplPrnQueueData >     m_aQueueInfos;
66     std::vector< rtl::OUString >        m_aPrinterList;
67 
68     ImplPrnQueueList() {}
69     ~ImplPrnQueueList();
70 
71 	void					Add( SalPrinterQueueInfo* pData );
72     ImplPrnQueueData*       Get( const rtl::OUString& rPrinter );
73 };
74 
75 // --------------
76 // - Prototypes -
77 // --------------
78 
79 void ImplDeletePrnQueueList();
80 void SAL_DLLPRIVATE ImplUpdateJobSetupPaper( JobSetup& rJobSetup );
81 
82 
83 #endif // _SV_PRINT_H
84