xref: /aoo42x/main/vcl/inc/print.h (revision 24f6443d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SV_PRINT_H
25 #define _SV_PRINT_H
26 
27 #include "vcl/sv.h"
28 #include "vcl/dllapi.h"
29 
30 #include "rtl/ustring.hxx"
31 
32 #include <vector>
33 #include <hash_map>
34 
35 struct SalPrinterQueueInfo;
36 class QueueInfo;
37 class JobSetup;
38 
39 namespace vcl
40 { class PrinterListener; }
41 
42 // --------------------
43 // - ImplPrnQueueData -
44 // --------------------
45 
46 struct ImplPrnQueueData
47 {
48 	QueueInfo*				mpQueueInfo;
49 	SalPrinterQueueInfo*	mpSalQueueInfo;
50 };
51 
52 // --------------------
53 // - ImplPrnQueueList -
54 // --------------------
55 
56 class VCL_PLUGIN_PUBLIC ImplPrnQueueList
57 {
58 public:
59     std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash >
60                                         m_aNameToIndex;
61     std::vector< ImplPrnQueueData >     m_aQueueInfos;
62     std::vector< rtl::OUString >        m_aPrinterList;
63 
ImplPrnQueueList()64     ImplPrnQueueList() {}
65     ~ImplPrnQueueList();
66 
67 	void					Add( SalPrinterQueueInfo* pData );
68     ImplPrnQueueData*       Get( const rtl::OUString& rPrinter );
69 };
70 
71 // --------------
72 // - Prototypes -
73 // --------------
74 
75 void ImplDeletePrnQueueList();
76 void SAL_DLLPRIVATE ImplUpdateJobSetupPaper( JobSetup& rJobSetup );
77 
78 
79 #endif // _SV_PRINT_H
80