2 * Copyright (c) 1997-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
23 Change History (most recent first):
25 $Log: PrinterSetupWizardSheet.h,v $
26 Revision 1.6 2005/01/03 19:05:01 shersche
27 Store pointer to instance of wizard sheet so that print driver install thread sends a window message to the correct window
29 Revision 1.5 2004/12/29 18:53:38 shersche
30 <rdar://problem/3725106>
31 <rdar://problem/3737413> Added support for LPR and IPP protocols as well as support for obtaining multiple text records. Reorganized and simplified codebase.
32 Bug #: 3725106, 3737413
34 Revision 1.4 2004/07/13 21:24:23 rpantos
35 Fix for <rdar://problem/3701120>.
37 Revision 1.3 2004/06/28 00:51:47 shersche
38 Move call to EnumPrinters out of browse callback into standalone function
40 Revision 1.2 2004/06/24 20:12:07 shersche
42 Submitted by: herscher
44 Revision 1.1 2004/06/18 04:36:57 rpantos
53 #include "firstpage.h"
54 #include "secondpage.h"
55 #include "thirdpage.h"
56 #include "fourthpage.h"
57 #include "UtilTypes.h"
62 using namespace PrinterSetupWizard
;
64 // CPrinterSetupWizardSheet
66 class CPrinterSetupWizardSheet
: public CPropertySheet
68 DECLARE_DYNAMIC(CPrinterSetupWizardSheet
)
72 struct WizardException
80 CPrinterSetupWizardSheet(UINT nIDCaption
, CWnd
* pParentWnd
= NULL
, UINT iSelectPage
= 0);
81 virtual ~CPrinterSetupWizardSheet();
84 SetSelectedPrinter(Printer
* printer
);
90 LoadPrinterDriver(const CString
& filename
);
96 // handles end of process event
99 OnProcessEvent(WPARAM inWParam
, LPARAM inLParam
);
102 OnCommand(WPARAM wParam
, LPARAM lParam
);
108 OnSetCursor(CWnd
* pWnd
, UINT nHitTest
, UINT message
);
111 OnContextMenu(CWnd
* pWnd
, CPoint pos
);
121 DECLARE_MESSAGE_MAP()
122 CFirstPage m_pgFirst
;
123 CSecondPage m_pgSecond
;
124 CThirdPage m_pgThird
;
125 CFourthPage m_pgFourth
;
136 InstallPrinter(Printer
* printer
);
139 InstallPrinterPDLAndLPR(Printer
* printer
, Service
* service
, DWORD protocol
);
142 InstallPrinterIPP(Printer
* printer
, Service
* service
);
144 static unsigned WINAPI
145 InstallDriverThread( LPVOID inParam
);
147 static CPrinterSetupWizardSheet
* m_self
;
148 Printer
* m_selectedPrinter
;
149 bool m_driverThreadFinished
;
150 DWORD m_driverThreadExitCode
;
155 CPrinterSetupWizardSheet::GetSelectedPrinter()
157 return m_selectedPrinter
;
162 CPrinterSetupWizardSheet::GetCursor()
170 #define kPDLServiceType "_pdl-datastream._tcp."
171 #define kLPRServiceType "_printer._tcp."
172 #define kIPPServiceType "_ipp._tcp."