xref: /aoo42x/main/vcl/inc/vcl/jobset.hxx (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_JOBSET_HXX
29 #define _SV_JOBSET_HXX
30 
31 #include <tools/string.hxx>
32 #include <vcl/sv.h>
33 #include <vcl/dllapi.h>
34 #include <vcl/prntypes.hxx>
35 
36 class SvStream;
37 struct ImplJobSetup;
38 
39 // ------------
40 // - JobSetup -
41 // ------------
42 
43 class VCL_DLLPUBLIC JobSetup
44 {
45 	friend class Printer;
46 
47 private:
48 	ImplJobSetup*		mpData;
49 
50 //#if 0 // _SOLAR__PRIVATE
51 public:
52 	SAL_DLLPRIVATE ImplJobSetup*		ImplGetData();
53 	SAL_DLLPRIVATE ImplJobSetup*		ImplGetConstData();
54 	SAL_DLLPRIVATE const ImplJobSetup*  ImplGetConstData() const;
55 //#endif
56 
57 public:
58 						JobSetup();
59 						JobSetup( const JobSetup& rJob );
60 						~JobSetup();
61 
62 	String				GetPrinterName() const;
63 	String				GetDriverName() const;
64 
65 	/*	Get/SetValue are used to read/store additional
66 	 *	Parameters in the job setup that may be used
67 	 *	by the printer driver. One possible use are phone
68 	 *	numbers for faxes (which disguise as printers)
69 	 */
70 	String				GetValue( const String& rKey ) const;
71 	void				SetValue( const String& rKey, const String& rValue );
72 
73 	JobSetup&			operator=( const JobSetup& rJob );
74 
75 	sal_Bool				operator==( const JobSetup& rJobSetup ) const;
76 	sal_Bool				operator!=( const JobSetup& rJobSetup ) const
77 							{ return !(JobSetup::operator==( rJobSetup )); }
78 
79 	friend VCL_DLLPUBLIC SvStream&	operator>>( SvStream& rIStream, JobSetup& rJobSetup );
80 	friend VCL_DLLPUBLIC SvStream&	operator<<( SvStream& rOStream, const JobSetup& rJobSetup );
81 };
82 
83 #endif	// _SV_JOBSET_HXX
84